Tim Sweeney on Shadow Maps, stencils and unified lighting!

How about overlaying a precedural 3D texture onto the stencil shadow volume, then at the face of every polygon inside blend the procedural texture (which will be of intensity) with the surafce texture?
 
Dave B(TotalVR) said:
How about overlaying a precedural 3D texture onto the stencil shadow volume, then at the face of every polygon inside blend the procedural texture (which will be of intensity) with the surafce texture?
How would you generate the procedural 3D texture, though? I mean, it'd work great, I just don't know how you'd do it.
 
MfA said:
A lot of game developers dont seem to think those are nearly robust enough for the general case ... and are relying on the rather expensive use of multiple shadowmap Z-buffers, sectioned according to depth from view.

True, but with higher res shadow buffers and those techniques, you should be able to at least get away with less of them. It's just sampling density. As that goes up, the problem gets smaller.
 
I've always thought that the best idea is using stencil shadows for large long range objects, because they maintain their sharpness for much larger distance and steep angles. To get the softness you can use pnumbra wedges too. Of course that's very costly performance wise which is why you would only use it on very simple geometry, the kind that would be used for things like HOM or collision detection, it maintains the basic shape of the object but has no details. This would give you your large, long range shadows.

Then for the local area immediately surrounding the viewpoint shadowmapping would be used to pick up the intricate details of the scene. Since these shadows are very localised, aliasing is not a big issue. Then you simply blend those shadow results with the results from the stencil shadows to get your final shadowing. I think this would lead the best quality with the best performance, as it uses the advantages of each type of shadowing to their fullest.
 
I haven't coded a single 3D code line in my life, so please forgive me if this questions is stupid.

Aren't ATI/NVIDIA/Others working on any shadow techniques that makes it easier for developers to get high quality soft shadows? Seems like devs have to resort to all kinds of hacks to get the best possible shadows without sacrificing preformance too much.

One technique is rather fast but not very pretty looking.
Others are pretty but expensive.
 
Well, sure. The problem is that computing shadows is just not an easy thing to do.

For instance, nVidia allows for what is called percentage-closer filtering on shadow maps, which smooths the jagged edges, essentially for free.
 
Chalnoth said:
For instance, nVidia allows for what is called percentage-closer filtering on shadow maps, which smooths the jagged edges, essentially for free.


And what was the cost in terms of transistors? Something ATi could do easily?
 
Hasn't nVidia had dedicated shadow buffer hardware since the advent of programmable GPU's with the GeForce 3? Why wouldn't ATi have introduced something similar to this in the R3x0 cards and R4x0 cards? This is why I believe nVidia is superior to ATi. They always have the new technology for developers out first.

Also, here's what John Carmack has to say about sampled and jittered stencil shadow volumes;

John Carmack to XxSMxX via email said:
Jittering the light position for entire volumes doesn't work nearly as well as jittering per-pixel with shadow buffers. Four samples looks decent with buffers, but like crap with volumes. You need to go to at least 16 samples with volumes, and even than it often isn't very good. We made a lot of cover image renderings with 128 samples with the stencil volumes.

John Carmack
 
XxStratoMasterXx said:
Also, here's what John Carmack has to say about sampled and jittered stencil shadow volumes;<snip>

:Yawn:

Now that he's replying to your mails, you might as well have asked him what he thought about "shadow buffers and unified lighting systems" and whether we'll only see them in "10 years".
 
XxStratoMasterXx said:
Hasn't nVidia had dedicated shadow buffer hardware since the advent of programmable GPU's with the GeForce 3? Why wouldn't ATi have introduced something similar to this in the R3x0 cards and R4x0 cards? This is why I believe nVidia is superior to ATi. They always have the new technology for developers out first.

JC - Quakecon 2004 keynote said:
With shadow buffers, the new versions that I've been working with, there's a few things that have changed since the time of the original Doom 3 specifications. One this that we have fragment programs now, so we can do pretty sophisticated filtering on there, and that turns out to be the key critical thing. Even if you take the built in hardware percentage closer filtering [PCF], and you render obscenely high resolution shadow maps (2000x2000 or more than that), it still doesn't look good. In general, it's easy to make them look much worse than the stencil shadow volumes when you're in that basic kind of hardware-only level filtering on it. You end up with all the problems you have with biases, and pixel grain issues on there, and it's just not all that great. However, when you start to add a bit of randomized jitter to the samples, you have to take quite a few samples to make it look decent, it changes the picture completely. Four randomized samples is probably going to be our baseline spec for normal kind of shipping quality on the next game.

Looks like the NV Hardware PCF is not so good.
 
V3 said:
Looks like the NV Hardware PCF is not so good.

Are you expecting a good PCF implementation can make the shadow look good without adding jitter ?

From what I see about current H/W PCF is that it's fixed, so no ;)

What I'd like to see (from both main IHVs) is more focus on filtering of shadow maps. I'm not sure which route will be chosen - dedicated transistors for 'Fixed Function' PCF like solutions or more focus on using filtering using fragment shaders?
 
PeterAce said:
Looks like the NV Hardware PCF is not so good.

It may not give as high qualuity as the shadow volume approach as mentionened in your quote from JC. It does however produce better looking images than hardware without PCF when shadow buffers are used so to call it not so good is wrong IMHO.
 
rendezvous said:
PeterAce said:
Looks like the NV Hardware PCF is not so good.

It may not give as high qualuity as the shadow volume approach as mentionened in your quote from JC. It does however produce better looking images than hardware without PCF when shadow buffers are used so to call it not so good is wrong IMHO.

Ok 'not so good' is a bit harsh, how about 'not good enough' or 'we still need better'.

Alstrong said:
forgive my ignorance, but how many ways are there for filtering a shadow?

Beyond3D really needs a 'shadow methods and alogrithm overview' article.

What I mean an articles that cover 'shadowing algorithms like; stensil, shadow buffer, PSM (and their different filtering possibilities). An example 'test app' could demonstrate the different methods and filtering **Hint to Rev or one of the game devs here**.
 
well, I wasn't going for the different shadow methods. :p



I was wondering why you'd want to do PCF with fragment shaders versus fixed function.


:?:


Good idea though. It'd be neat to have a demo with different shadow rendering algorithms.
 
My point was that fillrate is largely the limitation for stencil buffers, so limiting them to only objects that cast large shadows wouldn't help much.
 
True, but then again there wouldn't be a huge amount of those objects. When I say large I mean like 3m cubed and bigger, perhaps larger. I suppose you would have to experiment to find a balance.
 
Back
Top