RE: [Algorithms] Doom lightmaps
Brought to you by:
vexxed72
|
From: Alex C. <al...@ar...> - 2001-03-14 16:08:15
|
> 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, jaggy/blocky edges when the camera is at a bad angle wrt the surface shadows are being projected on. No mip-mapping so that when the shadows should be mapmapped you get the usual unpleasant sampling artefacts. The nasty little problem when the shadows get cropped by the dimensions of the shadow map. Ok all of these probably have work rounds or can be lived with. However I personally _hate_ shadowmaps. I hate the limitations of stencils even more, but when stencil work, but in general I've found that they give far more consistently correct visual results than any of the texture methods, naturally YMMV. > >* 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). Oooh Very interesting! Getting rid of the all the stencil shadow / camera problems would be great since: 1) We can have a sensible near clip plane! 2) We can throw out the extra raycasts. My guess is that Carmack must be doing this, otherwise stencil based shadows are totally inappropriate for a fps... (who wants the ugly camera related artefacts when you step into a shadowy recess?) > 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 How do you go about capping the volumes? Do you just project the back face triangles from the mesh that is casting shadows? Won't this cause problems where the mapping causes triangles to double up on each other? > 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). We attempted this with vanilla stencil shadows and it seemed to burn T&L time, if this could be made to work with acceptable performance than that would be absolutely fabulous, since apart from anything I can save a large chunk of memory for every instance of an object. Alex Clarke, Programmer Argonaut Games PLC |