leading question about shadow volumes.- Should I make a tutorial?

Graham

Hello :-)
Veteran
Supporter
Hi.

this is a question more for the experts here, basically I want to find out if I can help anyone.
I know that sounds odd, but I'll explain the situation:

first, the backstory.

Nearly 3 years ago I was struggling terribly with getting shadow volumes to work in a quake3 map renderer. To cut a long story short, I was using the 'classical' algorithm that you will find in many papers/articles (such as those on developer.nvidia.com). Triangles with 3 edge pointers, 3 vertices, Edge with 2 triangle pointers, 2 vertices, etc.

I spent a long time, never managing to get it to work. Too many problems with non-2-manifold geometry, generating from triangle sub-sets (space partitioning), etc. Trying to get a robust completly optimal SV seemed to be impossible the way I was going.

So, I spent a few months going quite insane, until one day, in the middle of a lecture I had an idea just hit me, absolutly out of nowhere. To which I immediatly got up and ran out, back to my room and PC, where I had *optimal* SSVs working perfectly in about 10 minutes, and much less code.

I eventually wrote a small paper for a even smaller conference. I'm not all that proud of it, since I was unsupervised and I was younger. So I don't recommend that.


I've thought it over a lot, had others give advice, etc... The conclusion I've come to is I'm thinking of making a small flash-based tutorial on the subject. Stepping through a visualisation of why classic SSVs break, and how to go about solving it all.
The idea being implant the algorithm in peoples heads, and why it works, not just shove code at them.


The reason for this all, was because when I read the cro-team interview on this site, he includes the very problem I had as one of his reasons for not liking SSVs ("closed meshes only"). Since he also meantioned cpu skinning, that made me pretty sure he doesn't know about this way (or any other way that is similar?)

So the question is,
am I wasting my time if I do this? ie was the paper also a waste of time. Can anyone honestly say they are interested - or would even use it?
I was always very worried I had missed something blindingly obvious somewhere else that solved the same problems.? Because when it comes down to it, it's actually a bloody simple algorithm.

I would assume that there is something else out there. I'd be very intereseted to know the algorithms used in doom3/fear for example.

I can pretty much guarentee that the algorithm works perfectly, I've never seen a dodgy shadow using it in nearly 3 years.
It can't be done 100% on the gpu (except xenos/dx10 should be possible), but it can be done with just generating an index buffer on the cpu for it (if vertices are duplicated with w=0, and you use a v-shader). So it's very appropriate for static lights.

For an example, using the ultra-detailed quake3 map 'NV15 bunker', my current little test app (for testing HDR), which I didn't even try to optimise, generates SSVs for the 1000+ lights in the map in about 5 seconds.

I would greatly appreciate feedback.

Thanks for your time.

It's a hard thing to ask because I feel like I'm either going to be patronising or feel like I'm showing off... I don't know.. :/ while I do sometimes like to show off, this isn't one of those times :p
 
I'm sure we'd love to discuss this here. I'm just a mildly interested spectator, not a dev, so my vote doesn't really count though.

I'd suggest naming the PDF with a more descriptive name, e.g. your surname-SSV- shadowing-paper or something. Helps it not get lost when peeps download it.

Jawed
 
Hi Graham,
I intend to read your paper when I get a chance (but I'm somewhat busy at the moment) as shadow volumes have always interested me.

I personally don't understand why there should problems with volume generation from 'arbitrary triangle sets', as long as you generate "closed" volumes. ( "Closed" can mean that the faces extend out to infinity. This is what I used back in PCX1/2 days). Perhaps when I read your paper I'll see the problem you're describing.

Thanks
Simon
 
Did read it quickly, it's interesting, and amazingly simple...

I'm more into Shadow Maps myself (find Stencil Shadow Volume way too expensive in fillrate & cpu time), but I might consider implementing it in a doom3 renderer test app.
 
Hello Graham

When i was reading your post, i remembered a pdf (and a ppt of the same content) that i read some time ago and was claiming the same. After downloading your paper, it turned out to be the same one :))

I've implemented it back then, and it indeed works like a charm. I discussed it with a collegue who showed me a paper from a few years back, that had the exact same conclusion, but it was so over-complicated and obscure, that nobody really got the main idea. Your paper is clear and to-the-point, i would definitely be proud of it, and recommend it to anyone interested in the subject.

Good work, and thanks!
 
Graham said:
I would assume that there is something else out there. I'd be very intereseted to know the algorithms used in doom3/fear for example.

I can pretty much guarentee that the algorithm works perfectly, I've never seen a dodgy shadow using it in nearly 3 years.
It can't be done 100% on the gpu (except xenos/dx10 should be possible), but it can be done with just generating an index buffer on the cpu for it (if vertices are duplicated with w=0, and you use a v-shader). So it's very appropriate for static lights.

If you have D3 open \Doom3\Base\pak000.pk4 in winzip, navigate to \glprogs and take a look at "shadow.vp".

Oh and I'd also be interested. Stencil based shadow volumes in games have become far more widespread than what people thought they would a year or so ago.
 
reptile said:
Hello Graham

When i was reading your post, i remembered a pdf (and a ppt of the same content) that i read some time ago and was claiming the same. After downloading your paper, it turned out to be the same one :))

I've implemented it back then, and it indeed works like a charm. I discussed it with a collegue who showed me a paper from a few years back, that had the exact same conclusion, but it was so over-complicated and obscure, that nobody really got the main idea. Your paper is clear and to-the-point, i would definitely be proud of it, and recommend it to anyone interested in the subject.

Good work, and thanks!


WooHoo! thats made my day
thanks :) :)

Once again I do appologize for how poorly written the paper was. (to me). Especially the slides, I had to make the slides so rediculously quickly... I didn't even have fancy pictures to throw in (well I had the background I downloaded off my website, and I had a borrowed laptop with photoshop for about 1 hour). It made for an interesting presentation thats for sure, lots of hand waving and jumping about... :smile:


I think I'll still look into making a flash tutorial for it. My boss back home is something of a flash/media expert, so we can probably knock something pretty professional looking together.

I greatly appreciate the replies.
I shall now proceed to dance.
 
Last edited by a moderator:
I haven't used shadow volumes (yet) and I am not an expert, but you should definitely make the tutorial just for this:
Graham said:
Stepping through a visualisation of why classic SSVs break, and how to go about solving it all.
The idea being implant the algorithm in peoples heads, and why it works, not just shove code at them.
 
righto righto :)

I'll start work on it when I get home from boston in about 3 weeks. :D No eta on when it will be done however.
 
Back
Top