PDA

View Full Version : Bumpmapping large scenes



sualkdimsch
04-02-2001, 09:27 PM
Hello out there

There has been a lot of talking about bump mapping and per pixel lighting in general. But has any body considered yet what to do it in a real life level with ~100's Lightsources. If you want to use bump-mapping there you can't do a pass for every source so you have to combine real time per pixel lighting with your precalculated lightmap. What I'm currently doing is I precalculate lighting thereby choose a few lights per polygon that "mainly" contribute to its intensity and at rendering time I apply the lightmap and then modulate the Lightmapped polygon with the bumpmap light information. In an equation that means:
Frag.Color = Tex*Lightmap * N*L
Where N is the bumpmap normal and L = Sum of all the lightvectors of the choosen lightsources for the current polygon.
I admit that this is basically wrong since it sort of double modulates the polygon with diffuse lighting and will darken it. But I compensate that with an appropriate Ambient light offset.

My question is are there (and I suppose there are) any better ideas ?!

Thanx

GeLeTo
04-02-2001, 11:01 PM
I think there's nothing wrong with that formula as long as you put in the lightmap only the light attenuation value (e.g. don't put N.L in the lightmap).
Frag.Color = Tex * Attenuation * N*L

kaber0111
04-02-2001, 11:08 PM
Originally posted by sualkdimsch:
Hello out there
But has any body considered yet what to do it in a real life level with ~100's Lightsources.
My question is are there (and I suppose there are) any better ideas ?!


cull light sources, simple as that