fluffy September 16, 2000, 04:00 PM 

Oh, and Morgan, sorry for missing your question about the shadow algorithms... I'm not using shadow buffers (I'm actually not sure what you mean by that  perlight zbuffers?), I'm using shadow volumes, which require a stencil buffer (preferrably more than one bit). The basic idea is that you render the scene with only ambient/nonshadowing/etc. lights, extend a shadow volume (i.e. an object describing the object's shadow as a solid with respect to the light) and intersect it with the zbuffer in order to set up a mask in your stencil buffer, then you render the scene with that light.
Mark Kilgard's written up a nice tutorial on it, though his method for calculating the shadow volume is quite slow and has a few rather crippling limitations (like, the light has to be outside the object, and you have to be using a complete implementation of GLU 1.2). A naive approach is to generate one shadow volume per polygon in your objects, but that generates 2+n polygons per ngon, so in a typical model of 600 triangles you end up with 3000 shadow polygons  hardly useful.
My method operates in O(n) time and puts out a nearoptimal shadow volume, though it does require a specific mesh representation scheme (which I use everywhere in my engine). Its excess polygon count is O(sqrt(n)) on average (though for pathological geometry it could conceivably get up to O(n), but that's only a very limited case).
Again, I'll someday get around to finishing a paper I'm writing on my 'miracle' geometry scheme. Or I might put it off even longer and turn it into my dissertation or something. :) This is the same mesh representation scheme which allows me to do arbitrary LOD resampling in O(n) time for n polygons on the output, and other cool shit like that. It's also one of those things which seems incredibly freaking obvious once you've seen it, which is why I'm being so secretive about it until I can get a claim to it by writing a paper...
