Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cant seem to get this lightmap to work..

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition
View previous topic :: View next topic  
Author Message
danjo
Member


Joined: 20 Sep 2007
Posts: 21

PostPosted: Sat Nov 03, 2007 2:30 am    Post subject: cant seem to get this lightmap to work.. Reply with quote


for some reason it wont soften the edges/fade out.
the settings i have:


would this be because its not a very big area/model?
(that lit section is 40units x 40units)

[edit]
as a workaround, i ended up making multiple lights for the source, 1 with low intensity and larger range with another with higher intensity and smaller range.
Back to top
View user's profile Send private message
danjo
Member


Joined: 20 Sep 2007
Posts: 21

PostPosted: Sat Nov 03, 2007 5:12 am    Post subject: Reply with quote

this is the final ingame look..
Back to top
View user's profile Send private message
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sat Nov 03, 2007 6:16 am    Post subject: Reply with quote

That's because DeleD uses OpenGL's lighting arguments for REALTIME lights, and then mixes it with a hard cutoff. Normally, your light would falloff properly from the start point, to the cutoff limit.

As you can see in your settings dialog, by the time you get to your 50 unit cut off point, the light itself is still at around 80% of it's total brightness.

You will have to play with the quadric attenuation value, and the range, until you can get something that appears to fall off right around the range, but it will never be perfect, and you will mostly always have a hard light edge, unfortunately.

edit This is what I mean by making a proper attenuation to fit your light.

_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
danjo
Member


Joined: 20 Sep 2007
Posts: 21

PostPosted: Sat Nov 03, 2007 10:24 am    Post subject: Reply with quote

ah - that makes sense. ty
Back to top
View user's profile Send private message
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Sat Nov 03, 2007 11:03 am    Post subject: Reply with quote

That looks like an interesting game, could you present it briefly in the user projects forum? Smile
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sun Nov 04, 2007 8:59 am    Post subject: Reply with quote

Yeah, that game looks great! We want to know all about it!

To expand a little on Daaark's great explanation, the 'range' parameter is indeed a little confusing. At first, we only had the OpenGL lighting formula, then we added the range as a way of optimizing the lighting of a map with a lot of lights: any light beyond the range is simply disregarded. So it's not really a lighting parameter, and it should always be kept at a fairly bigger number than any distance you would ever have the light shine, because it cuts it off abruptly and ugly.

This turned out to be a rather poor design decision, as the OpenGL attenuation parameters are not very intuitive, people see a range parameter that looks like it'll do exactly what they want, and then they run into the exact same artifacts as you did in the first post.

We will rewrite the light parameters at some point (with backwards compatability), to make them more intuitive. Probably with only a min. and max. range, and a linear or exponential falloff in between. It's not on the immediate planning, but it is very clear that it needs to be done.
Back to top
View user's profile Send private message Visit poster's website
danjo
Member


Joined: 20 Sep 2007
Posts: 21

PostPosted: Mon Nov 05, 2007 2:52 am    Post subject: Reply with quote

when i realized from daaark's post, that the range is actually the red dotted line, i was able to fiddle with settings until i got the line to curve down to zero as close to that red line as possible.
you can see from my first settings the range was cutting off very early (thus leaving a sharp edge)

it still works ok, just that it requires more tweaking to get what you want.
with large ranges, its a lot simpler to get it right.


just a sidenote regarding lightmapping.
i have Giles aswell, which i started off using, becuase it was a lot faster than Deled. problem was it gave some odd results sometimes, whereas Deled, never failed - Just is SLOW ZZZZzzz..

on one level it took around 20 mins to Lightmap O_o and i have a VERY fast PC.. Razz
Back to top
View user's profile Send private message
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Mon Nov 05, 2007 3:23 am    Post subject: Reply with quote

It is possible to do hardware accelerated light mapping. Render the scene from the point of view of the light, as if you were rendering a cube map. Render depth into the buffer. Then, when sampling the light map, simply compare the distance to light with the depth stored in the buffer. Works best with R32F format render targets :-)

I bet you could get render time down to well under a second per light using this technique. If the light mapping is important in DeleD, I think they should work on this, right after fixing the COLLADA exporter :-)
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum