|
Author Topic:   Lightmap generation Algorithms
JamesC
Member
posted June 25, 2000 05:40 PM            
Anyone want to throw me a bone to a better approach to do this? Currently, I'm using an algorithm simmilar to this one http://www.egerter.com/articles/land/land1/land1.htm to generate a light/shadowmap for my terrain, but it is very, very, slow... I'm not trying to do anything fancy, just 1 static lightmap texture streached across the entire terrain...

IP:

Bryan T
Member
posted June 26, 2000 01:12 AM            
JamesC,

That algorithm is more 'correct' in that tall peaks throw shadows over valleys, however it is not optimal by any means. A simpler method will do just as well for you in most cases.

Simply shade each texel based on its angle from the lightsource. For lightsources that are sufficently high enough (shadows are no longer cast long), this method will do just fine. Only when you want a lightsource near the horizon does it show up as being unnatural (and even then, many people might not notice unless the terrain itself showed off this feature regularly.

Here's a link to another shader scheme, this one is much fancier, but allows real-time dynamic shading from infinite point sources. http://www.dgp.toronto.edu/people/JamesStewart/papers/

Especially: http://www.dgp.toronto.edu/people/JamesStewart/papers/tvcg97.html

Don't have time to implement this one right now. It's been put on the back burner.
--Bryan

IP:

JamesC
Member
posted June 26, 2000 01:15 PM            
thanks for the pointers, It's good to see these boards stay active. I'll check them out today.

IP:

JamesC
Member
posted July 13, 2000 03:05 PM            
Hmm, tried that link Bryan sent.. the ps file transfers about 4x faster than my connection can handle, when I get it the file size is 5.4 megs instead of 1.2.. I tried to open the gz file, but WinZip brings up the add file dialog when I do.. would anyone happen to have this paper elsewhere on the net maybe?

IP:

haktan
New Member
posted July 13, 2000 04:04 PM            
Rename the file to *.ps. It is likely that the filed is the uncompressed postscript-file.

IP: