Game Development Community

dev|Pro Game Development Curriculum

Plan for Brett Fattori

by Brett Fattori · 02/26/2004 (7:06 am) · 7 comments

The synopsis says it all. I'm about two weeks away from releasing my stenciled shadows patch. There's two things that I need to get working before it's as done as I want it to be:

Z-fail shadows, and the method to detect them
This one is giving me some pause. I'm trying to determine a clipping volume that starts at the light's position, in world space, and extends to the near plane. Common stuff, but I can't seem to get the calcs right. This is the most important step, and is why Z-fail shadows are so expensive. There's some code that I found in Melv's fxFoliageGenerator that creates a clipping volume from the near plane to the far plane so that it can determine quadrant visibility. I thought a simple adjustment of starting and ending points would make this work, but it doesn't and I'm kinda stumped.

Un-capped and Capped quad volumes
The method you've seen in the shots provided uses a technique called "External Triangles." This cuts down on the required geometry, but my understanding is that it doesn't support front and back caps. Soooo, there's quad based volumes that will cap properly -- but when I use them, they look like, err... crap. Lot's of cracks in the shadows and shadowing artifacts keep showing up.

The feature list is pretty much final, and there aren't going to be too many additions before I release this. Once it's released, I fully expect people to rush to implement this and then be disappointed with the framerate. It can be disheartening to see your framerate drop, but it's understandable when you realize the amount of geometry being process per shadow casting light, per shadow casting object. I've done everything I can think of to keep framerate up, but there's not much more I can do. I've implemented silhouette and shadow caching, scissor testing and depth clamping, added code to use numerous extensions (if they're implemented in the driver), and tweaked the code repeatedly. Not being an expert coder, I've not tried using vertex blending to extrude the shadows on hardware or shaders to assist in silhouette determination. There's one last feature I'm thinking of adding to make transitioning from non-shadowed to shadowed areas more visually appealing, but that would be a last thing if there's time.

Need someone with a Mac and with Linux
I don't have either, so I haven't tested this. There's some code that isn't implemented yet (for extensions and such) that needs to be. It's in the Windows platform code, but not the other two.

Does anyone have a spare NV30?? ;-)
There are some extensions that I coded for, but haven't been able to test due to not having a Geforce FX anything. Anyone have one to spare? (test, send me, blah blah... it's worth a try)

- Brett

#1
02/26/2004 (10:24 am)
Glad to hear it Brett, don't give up! I wish I had a card to send ya, but I don't.
Those videos really got me excited
#2
02/26/2004 (1:52 pm)
Whats NV30? I do have an extra Geforce4. Close enough?
#3
02/26/2004 (2:00 pm)
I appreciate that, but NV30 would be Geforce5 (essentially). It's the Geforce FX series of cards.

- Brett
#4
02/26/2004 (2:10 pm)
well, I have an NV30, not a spare one, but I'd certainly run some tests for you. What you have acheived so far is very impressive, and I'd like to extend my encouragment to say keep up the good work!
#5
02/26/2004 (2:16 pm)
Ah okay. Yeah, the Ultra FX is what I bought to replace the ge4
#6
02/28/2004 (8:27 pm)
Hey Brett, I've been looking into performance issues with acrtoon outlining on the terrain and I ran accross this:

Silhouette Determination Looks like a good way to boost performance.

Have you seen this before?
#7
02/28/2004 (8:35 pm)
He uses a method he called Silhouette Tracking. You can get the demo here.