RE: [Algorithms] Doom lightmaps
Brought to you by:
vexxed72
From: Eric H. <er...@ac...> - 2001-03-14 15:01:13
|
Alex wrote a great summary of shadow volume headaches (some I hadn't heard before): >We don't use shadow maps (== nasty horrible artefacts). Which ones? Biasing headaches (objects self-shadow, or float, depending on the bias), or shadow edges looking jaggy, or is there some third headache I don't know about yet? >Adding full on volumetric shadows to an engine is not a >light weight thing to do. > >Depending on the method used, they tend to: > >* Burn fill rate >* Stencil methods in particular have very variable fill rate cost >* Require skinning to be done CPU side (so you can calculate the silhouette) >* Require fancy silhouette extraction algorithms (brute force extraction = >expensive) >* Require extremely accurate raycasts (to determine if the camera is shadow) This is not necessary if you draw the shadow volume polygons only where their Z depth is beyond the surface (vs. in front of the surface, as is normally done). A guy named Bilodeau from Creative Labs explained this technique at GDC 1999 (and I didn't learn of it until a few months ago, from the BioWare team, who are using it in Neverwinter Nights). Basic idea is to cap the shadow volumes against (or at least somewhere near) the eye's far plane, and render to the stencil buffer only when the shadow volumes are beyond the stored z-buffer depth values. We'll be talking about it in our GDC talk on real-time shadows, and it'll be in the GDC proceedings. Has its own problems, but all the headaches of "eye inside the shadow volumes" problems go away! So far it's the cleverest graphical thing I've learnt this year. The Bioware guys also have some clever tricks for culling out content and for using a vertex shader program to generate shadow volumes (at the loss of no character self-shadowing, though). >* Require a very near clipping plane (so you _have_ to use a z-buffer) >* Mess up loads of lighting optimisations (coalescing multiple lights into >an average light doesn't work well due to the shadows affecting the >blending) >* They only really work for dynamic lights and typically you can only >have a few on screen before your frame rate suffers very badly. >* Force the artists to cap objects Not sure what you mean here... >* Make it essential for all meshes to be manifold >* May make lit semi-transparent materials a total nightmare >* Require the artists to be very careful when modelling to avoid >unfortunate self shadowing. What's this? >* Require that the artists and designers don't try to use too many >polys. You can forget about having 100k triangle / frame scenes with >full on volumetric shadows > >However, > >They are quite pretty. > >Alex Clarke, Programmer >Argonaut Games PLC Eric |