An idea about lightmap usage

Started by
2 comments, last by Alload 21 years, 9 months ago
I''m sure other people must have thought before me of what I''m going to tell, but since I haven''t read it yet I post it. We all know that the biggest issue of lightmaps is that they''re static and thus don''t enable specular lighting. This is bad since the brand new graphic cars are able to compute specular lighting very fast. I think we could change our use of lightmaps, instead of having in them the radiosity color we could put a grey scale which could be the shadow color (if it is black then it is completely in shadow, if it is white it is completely illuminated, ...). If we create for each light a set of lightmaps, we could compute the screen pixel color like this: pixel color for a light = light map of this light * (diffuse with this light + specular with this light) It would be like stencil shadow volume for static geometry but a lot faster and we could have soft shadow. The drawbacks is that it would require a lot of space to hold all the lightmaps, moreover there won''t be any radiosity.
Advertisement
I think Q3 has the capability of using 'specular maps', higher res lightmaps for purely specular effects, but I don't think this is what you are getting. What you describe is basically what lightmaps already are, unless I'm missing something vital in your post.

You could quite happily compute specular lighting with pixel shaders or whatever (don't know much about that so someone might correct me) and combine that with the basic precalced lightmaps.

EDIT:

Ahh no, sorry I just reread and I get what you mean now. You are talking about a kind of occlusion map for each surface for each light. Of course this still means the maps are static because recomputing them for each moving light will involve all the same calculations that 'normal' lightmaps use. Perhaps some sort of hierarchical map which could be incrementally calculated (ie start with 1 ray cast and add more as the required detail increases). Lack of radiosity seems like the biggest thing since you might as well do the direct lighting with some other method (there are lots of methods for faking soft shadows).

[edited by - JuNC on June 29, 2002 2:13:08 PM]
Memory overhead sounds nasty, but if you have implemented it and it works okay, then I would love to see it.
I haven''t implemented it yet, I still thinking about the best way.

This topic is closed to new replies.

Advertisement