RE: [Algorithms] Dynamic lights with static shadows
Brought to you by:
vexxed72
From: Jason M. (A. Technologies) <v-j...@mi...> - 2000-11-09 19:58:14
|
FWIW, one way that we've been handling this lately is with a 3D texture, as proposed in a .plan by Carmack once upon a time. It's nice because the texture coordinate assignment is easily handled by a texture matrix which transforms the camera space position to the light's coordinate space. This gives you a nice per-pixel distance attenuation term and works equally well for extended light sources. There is a demo here (which also does dot3 bump mapping): http://www.ati.com/na/pages/resource_centre/dev_rel/sdk/RadeonSDK/Html/Sampl es/OpenGL/RadeonDotProduct3.html Beware of the crazy long URL getting truncated. Also, beware of the EXT_texture_env_dot3 usage which I don't think is in the public Radeon driver yet. That is, if you play with this app, hack around that for now to view just the volume light map pass. -Jason > -----Original Message----- > From: Jason Zisk [mailto:zi...@n-...] > Sent: Thursday, November 09, 2000 10:36 AM > To: gda...@li... > Subject: Re: [Algorithms] Dynamic lights with static shadows > > > > Quake3 is done with a separate pass, which really is a more > sensible way > to > > go. > > How does the separate pass affect the lightmaps though? I'd > assume you want > the globe of light to eliminate any shadows under it, is > there a blending > mode that would do this? Somehow keep the texture > information and just > eliminate the lightmap where there is a texel of light. > > Also, how is the globe of light calculated? I can't seem to > figure that one > out. Is it just a texture that looks like a circle of light that is > projected onto the geometry around the light source? I can't > seem to come > up with a way that would work for a complex environment and > point lights. > > Or do you step through each texel on the lightmap calculating > distance to > the light source? That would seem slow but easier to > program, just need to > convert the UV on the lightmap texture to world space to > calculate intensity > of the light at that point. > > Thanks, > > - Jason Zisk > - nFusion Interactive LLC > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |