Tim Sweeney on shadows and HDR rendering on ATi cards

ChrisRay said:
Probably because its unlikely a dev will comment on a competitor devs engine. I mean why ask Tim Sweeney what he thinks of Carmacks engine anyway?

Nah, Cevat Yerli told someone I know in an email that Doom 3's Engine was more "advanced" than CryEngine (not in those exact words). Actually he said that "It could be if we wanted it to".
 
DaveBaumann said:
"but only affects total performance by 20% or so"
Yes, total performance (overall average framerate) in comparison to the "standard mode", which is FP blending. Since blending isn't always required, the overall performance hit is much lower than it is in the very moment of blending.
 
You'd probably want to turn off effects like ground foliage when using HDR rendering on an ATI card, then (assuming the engine will use similar ground foliage to UT2k4 and many other games released in the last few years).

But the real problem would appear to be particle effects and explosions. You could, for instance, render these effects to an off-screen 8-bit buffer, then blend that result with the FP16 frame buffer via a shader, but that's going to preclude the use of high dynamic range for particle effects.
 
Mordenkainen said:
XxStratoMasterXx said:
Would dynamic, soft-shadow buffers be possible (from an actual functionality standpoint) to be cast from everything onto everything?

That's possible, but to get good results (and avoid aliasing) you need *extremely* high-resolution shadow maps, such as 2048x2048 or higher. And the performance impact of rendering shadow buffers for all objects in the scene for every light (as opposed to only dynamic lights or dynamic objects) is fairly high. This seems like it will be a viable technique in the future, perhaps when GPU's are 4X-10X faster and state-change overhead is further reduced.

So... hummm, what does Tim think of the engine JC is working on now. Or better yet, of JC's build of D3 where he could toggle between stencils and shadow buffers?

Nice mini-Q&A, XX.

Not only did that build just have the basic shadow-buffers in them like he mentioned, but this experimental path has high-dynamic-range rendering as well.
Best of all, licencees get access to all this EXP code when they get the Doom 3 engine :)
 
XxStratoMasterXx said:
What exactly is a "pre-computed shadow mask"?


This is a single-component, 8-bit-deep texture map applied to surfaces in a similar way to a lightmap (though lightmaps store 3-component RGB values). A shadow mask's greyscale values indicate the percentage occlusion from the light to each texel on a surface, independent of the light's attenuation, color, and brightness. The shadow mask stores the shadow part of a lighting computation in a precomputed way, while the per-pixel normal-mapping, specular lighting, and attenuation are done dynamically.

Since attenuation functions tend to be very well-behaved, it seems like you would want to multiply that into a precomputed mask as well. Saves a few pixel-shader intstructions, certainly.

The only reason I can think to not do this would be if you had really massive offsets from parallax maps, and then you used those to compute a significantly different world-space position for determining attenuation. Wonder if he's doing that?

Maybe I should just email him too. 8)
 
Andrew Meggs said:
The only reason I can think to not do this would be if you had really massive offsets from parallax maps, and then you used those to compute a significantly different world-space position for determining attenuation. Wonder if he's doing that?
Ah ha. "Massive" is kinda subjective though.
 
Xmas said:
Yes, total performance (overall average framerate) in comparison to the "standard mode", which is FP blending.

Careful, your assuming thats what he ment to say. When truth of it is, only Tim knows exactly what he ment to say :)
 
Andrew Meggs said:
Since attenuation functions tend to be very well-behaved, it seems like you would want to multiply that into a precomputed mask as well. Saves a few pixel-shader intstructions, certainly.

The only reason I can think to not do this would be if you had really massive offsets from parallax maps, and then you used those to compute a significantly different world-space position for determining attenuation. Wonder if he's doing that?

Maybe I should just email him too. 8)
The only reason I could think of to not do this would be if the shadow mask were a projected texture, which could be used to simulate the shadowing of partially-transparent objects. One might use it for a light source (lantern, flashlight), or just something like a stained-glass window (though you would want to use more than just a luminosity mask there).
 
DaveBaumann said:
Alstrong said:
a 20% hit is quite huge....

If you consider the performance hit for FP16 Blending/Filtering in Far Cry on the GeForce 6 series, 20% sounds optimistically small under this method.

Not to mention D3's tripled fps in case of disabled dyn shadowing...
 
jb said:
Careful, your assuming thats what he ment to say. When truth of it is, only Tim knows exactly what he ment to say :)
Ah, it would have been so simple if he had just said what he meant to say in the first place :D

But he does say it's slower than blending, and he does say it's a workaround for lack of blending, so I'm pretty sure the performance hit is meant in relation to real FP blending. What else could he compare to?
 
If the question was specifically to do with performance on R420/R300, as the question was framed, then the "total" performance talked about can't include FP blending and filtering. If the "total" performance drop is in relation to FP blending/filtering and filtering in the shader then this must be only the performance difference between NV4x running the two modes, which doesn't really give any performance indicators for R300/R420.
 
DaveBaumann said:
If the question was specifically to do with performance on R420/R300, as the question was framed, then the "total" performance talked about can't include FP blending and filtering.
So you think he compares the performance of 32bpp non-HDR rendering, and 64bpp HDR-rendering with "ping-pong blending", and the performance drop is only around 20%? I don't believe that.
 
Andrew Meggs said:
The only reason I can think to not do this would be if you had really massive offsets from parallax maps, and then you used those to compute a significantly different world-space position for determining attenuation. Wonder if he's doing that?

Maybe I should just email him too. 8)

Usually, you will never use a massive offset during parallax mapping, because that'll give you a very annoying result(the surface becomes too "bumpy" to be real).

I think attenuation can be baked in the shadow mask when needed, but it's only 8 bits, I'm not sure if it's precise enough. Moreover, not all lights in the game attenuates with the distance(particular when you want to use the light in a relatively big environment), it's more of an artist's choice.
 
DaveBaumann said:
Thats why I said I though it was optimistic.

Perhaps so optimistic that it's much more possible that he was talking about 20% in comparision to FP blending ?
 
And if that is the case the 20% figure doesn’t really tell us much in relation to the question since it can only come from a comparison of two things: either NV4x running the two modes, which doesn’t give an indication of performance for R300/420, or comparing NV40 with FP filtering/blending against R420 with the shader filtered method which is a performance comparison between these two boards and not indicative of the “total performance differenceâ€.

I’m not at all convinced that the normal rendering is with HDR enabled either, seeing as the majority of the demos so far have been without it (obviously because they were done before NV40’s availability), and because the boards that support FP filtering and blending at the moment are in the minority and will remain that way for some time with no inclusion of it on the 6200’s – I have trouble seeing either modes of rendering being a viable proposition on lower end boards for some time to come.
 
Back
Top