Mark Kilgard and I have a paper on robust stenciled shadow volumes that’s probably a good read for anyone thinking of implementing them. We’ll be talking about this at the Advanced OpenGL course at GDC next Wednesday. So come and bring your questions.
Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you
I really wanted to make it to the conference, but it costs too much for a plane ticket from this side of the world to san jose and im just a poor University student, so this is the next best thing, yay!
Also, how long will it be before the material covered in the conference becomes availabe to those of us who couldn’t go?
[This message has been edited by robert (edited 03-13-2002).]
We should have all the material that we present at GDC on the NVIDIA web site within the following week.
Glad you like the paper. The demo(s) used to generate the images need a little bullet-proofing before we release them, but hopefully in the same timeframe.
Well i think that paper is just awesome! You guys did an excellent job on it and the demos. I was kind of suprised on the low framerates on that one demo with the q2 models, but its just a demo, its not like that is a fully optimized game engine. But even then, i would have figured the geforce 4 could push it faster with what it was having to do. Oh well. Speaking of that, i sure hope my geforce 4 ti comes in this week. Yay!
I’ve had the paper for just over a month now and was also surprised by the simplicity of this new method. Mark Kilgard gave me a thorough explaination of a particularly obscure technical point. I was expecting this technical point ( with Mark’s detailed explanation ) to have been included in the paper. Personally, I think it’s an important point.
The only thing that I was worried about was the performance. It definitely consumes more fill but it can be implemented entirely and robustly on the GPU. And that’s a good thing.
Originally posted by PH:
[b]I’ve had the paper for just over a month now and was also surprised by the simplicity of this new method. Mark Kilgard gave me a thorough explaination of a particularly obscure technical point. I was expecting this technical point ( with Mark’s detailed explanation ) to have been included in the paper. Personally, I think it’s an important point.
The only thing that I was worried about was the performance. It definitely consumes more fill but it can be implemented entirely and robustly on the GPU. And that’s a good thing.[/b]
Cass has a copy of the e-mail I got from Mark too. You could try to convince him to post the explanation here . Mark said they really wanted to address the technical point in the paper but wanted to keep it 8 pages ( the newly released paper is slightly different, so I wonder why it wasn’t added ).
Now some questions, hints and calculations…
From The Paper:
In the case of a directional light, all the vertices of a possible silhouette edge loop project to the same point at infinity. In this case, a TRIANGLE_FAN primitive can render these polygons extremely efficiently (1 vertex/projected triangle).
This would also mean, that it isn’t necessary to draw the light-backfacing polygons of the occluder to save additional fillrate, or am i wrong there?
In my current approach i use a special edge structure, where i only have those edges that could get possible silhouette edges. That means i pre-filter edges out, that connect triangles which have the same face normals.
This is a very common case, and saves some CPU computations.
But i also see the problem of the fillrate hit. If i summerize all drawing operations i get the following:
ambient pass (no backfaces)
The Volume sides (only stencil but very unpredictable in their size, and also front and back)
volume caps pass (only stencil, but front and back)
This would mean a maximum of over four times the passes then without shadows.
And i don’t know how much you gain by only drawing to the stencilbuffer, is it a relevant factor in the equatation ?
Thanks
Lars
[This message has been edited by Lars (edited 03-13-2002).]
That’s right. No reason to draw a projected end cap on the shadow volume because they’d all be degenerate triangles anyway.
Shadow volumes definitely eat fill. If you’re working with bounded light sources, be sure to use the scissor test to avoid wasting fill on regions that cannot be illuminated. There are additional tricks for limiting the geometry you actually send down too.
The real potential for making shadow volumes fast is figuring out when you don’t have to draw a shadow volume. Some approaches will take advantage of early culling hardware. Others will require detailed scene-level analysis of occluder geometry.
Because stenciled shadow volumes are becoming commonplace (especially in future games), you can expect the mode of writing stencil only to get faster as well.
Looking forward to it. There are 8 guys in my group that will be presenting at the OpenGL course. Lots more for other sessions and the dreaded booth duty.
Thanks for releasing this paper. However, could you please make it available in a PDF format that is readable by recent versions of GhostView ? Not everybody runs Windows here.
It’s sad but true, many NVidia papers are unreadable without the PDF reader from Acrobat
The fill rate savings from clipped shadows is quite a lot for common bounded lights.
The difficulty with the clipping approach lies in trying to avoid clipping the front faces of the shadow volumes. If front faces are clipped, the original occluder geometry must be modified to avoid cracks.