PDA

View Full Version : Are Nvidia cards generally better at rendering shadows?


Decimator
12-13-04, 08:10 PM
I've got a 6800 GT and I remember reading somewhere that Nvidia cards have features built in specifically for rendering shadows more efficiently, is there anything in this? (I'm asking because I've seen a lot of preview footage of Battlefield 2 and there are a lot of new dynamic lighting/shadowing effects in it)

zoomy942
12-13-04, 08:13 PM
if i am understanding your question right, then yes nvidia cards to have a great way of rendering shadows.. but only sort of. it is call Ultra Shadow, and on the nv4x hardware, it is Ultra Shadow II, and on the geforce fx line, it is Ultra Shadow I. i dont know the ins and out of the technology but i do know that it is only used when i game includes it. Doom 3 for example, uses ultra shadow II. but off the top of my head, that's the only one i can think of.

Decimator
12-13-04, 08:27 PM
Yep, that's what it's called, I knew it had some snappy name or other, I've just Googled for it and you're right; all the 6800's have Ultra shadow II but apparently it isn't used by the Doom 3 Engine, I wonder which games do use it?

Dunno if the info in this link is out of date:

http://3dgpu.com/archives/2004/08/18/nvidia-on-doom-3-and-ultrashadow-ii/

http://www.hardinfo.dk/show.asp?page=4402

Quote from the 2nd link:

NVIDIA shows the idea with this figure, where zmin and zmax limits the shadow area, which makes out a small part of the area in the complete scene.
This has not been developed further in UltraShadow II. But the speed has, however. NV40 is up to four times faster than NV35 at UltraShadow calculations. A new feature is also that games do not have to be optimized directly for UltraShadow II for NV40 to utilize it's speed. It would of course speed up further if the programmer optimized the code for it, but the technology itself is "intelligent" and figures out when it worth using the technology.

EciDemon
12-13-04, 09:35 PM
Doom 3 do use Ultrashadow II, it's off by default though

r_usedepthboundstest 1
^^ that's the console command to enable it.

fivefeet8
12-14-04, 01:01 AM
I believe Star Wars KOTOR also uses Ultra shadow to increase shadow performance, but ultra shadow seems to only optimize hard shadows. Like in doom, and not soft shadows.

Decimator
12-14-04, 11:31 AM
IRT # 4 and #5, Thanks for the info, I don't know whether this Ultra Shadow feature is just marketing hype or not, but like I said, Battlefield 2 has a lot of advanced shadowing effects in it, and Dice have been using 6800's to demo the game to people, so hopefullly it will run really nicely on my GT.

Lfctony
12-14-04, 01:53 PM
I believe Star Wars KOTOR also uses Ultra shadow to increase shadow performance, but ultra shadow seems to only optimize hard shadows. Like in doom, and not soft shadows.

If that is true, that would explain the large performance hit when using soft shadows in KOTOR.

jolle
12-14-04, 03:40 PM
UltraShadow is a name for a group of OpenGL extentions related to stencil shadows, ATI supports a few of these but not all, so in OpenGL NV hardware could potentially be better at shadows given that these extentions are used.
In Doom III NV hardware also has the benefit of being able to draw the Z pass at the double of its Pipelines, ex NV40 with 16Pipes draws the Z-pass as 32x0 since its colorless, the part of the pipeline dedicated to colorpasses doubles as a Z pass part (Zrop and CRop if i remember right).
These are very fast passes at anyrate so it might do a whole lot for performance but it helps a bit.

I dont think that any of the "UltraShadow" bits applies for Direct3D tho, perhaps the acctual hardware can be used in a similar fashion via the D3d API aswell tho, but since both ATI and NV develop their hardware along the D3d API then I would assume that both have the same features on shadow rendering exposed in D3d, one might still be faster at it then the other tho.

ATI_Dude
12-14-04, 03:44 PM
If that is true, that would explain the large performance hit when using soft shadows in KOTOR.

Star Wars Kotor doesn't use Ultrashadow. The soft shadows are composed of normal projected shadow volumes (stencil shadows) and a post processing effect which blur the shadows and make them look "soft". The performance hit is caused by the extra fragment program (pixel shader) which generate the post processing blur effect. Kotor uses relatively simple shadow volumes with shadows being cast from static lightmaps and wouldn't benefit from Ultrashadow at all. Ultrashadow is only effective in situations with multiple shadows being cast from multiple light sources where lots of unnecessary shadow calculations will occur. Ultrashadow can effectively discard many of these unnecessary shadow calculations and improve performance. The main reason why nVidia cards don't take as big a performance hit as Radeon cards is the ability to use active pixel pipelines twice when generating shadow volumes thus doubling the fillrate in these situations.

ATI_Dude
12-14-04, 03:59 PM
I dont think that any of the "UltraShadow" bits applies for Direct3D tho, perhaps the acctual hardware can be used in a similar fashion via the D3d API aswell tho, but since both ATI and NV develop their hardware along the D3d API then I would assume that both have the same features on shadow rendering exposed in D3d, one might still be faster at it then the other tho.

You're correct, Ultrashadow isn't exposed in Direct3D yet, but could potentially be so in a future Forceware driver. Stencil shadows aren't used quite as often in Direct3D games though* which is probably why nVidia has focused primarily on OpenGL support.

*) Many Direct3D games use shadow mapping and other texture based shadow techniques instead.

fivefeet8
12-14-04, 04:06 PM
Star Wars Kotor doesn't use Ultrashadow. The soft shadows are composed of normal projected shadow volumes (stencil shadows) and a post processing effect which blur the shadows and make them look "soft".

KOTOR does have a hard shadows option with Nvidia cards. I remember reading that this mode does use Ultra shadow. Maybe not.

ATI_Dude
12-14-04, 04:48 PM
KOTOR does have a hard shadows option with Nvidia cards. I remember reading that this mode does use Ultra shadow. Maybe not.

Ultrashadow actively cull unnecessary shadow calculations which don't contribute to the final image and isn't directly related to Hard shadows in Kotor. Hard shadows are just stencil shadows with no post-processing effect (soft blur).

As I tried to explain in my previous post active shadow culling isn't necessary in Kotor since it uses mostly static lightmaps (one uniform ligh source) and therefore Ultrashadow is pretty useless in this game. Ultrashadow is very useful in games such as Doom 3 and Chronicles of Riddick where shadows are simultaneously cast from different light sources and where objects and beings in the world cast shadows on themselves (self-shadowing).

noko
12-14-04, 05:08 PM
Interesting, in Doom3 r_usedepthboundstest default was already 1. Must be the new update has it on by default for Nvidia cards. Still with it on or off I still get the same FPS in the Doom3 demo. Tested at 1284x1024, 4x AA, in game Quality setting. 40 FPS is what I get on both settings with my card GT clocked at 400/1100. Doesn't seem to really add anything significant to overall performance for this rather intensive shadowed game.

noko
12-14-04, 05:53 PM
Ahhh, the above benchmark used Dualview since I have a two monitor system. When I use clone mode my benchmarks are different

1280x1024, quality setting in Doom3, with High Quality setting selected in the Drivers:

AA at 4x
r-usedepthboundstest 1 --> 48.2 FPS(three demo runs)
r_usedepthboundstest 0 --> 47.6 FPS(three demo runs)

AA at 0x
r-usedepthboundstest 1 --> 59 FPS(three demo runs)
r_usedepthboundstest 0 --> 58.9 FPS(three demo runs)

Without AA it looks like I am cpu limited, with AA Ultrashadow II looks to have only a minor positive effect. Interesting that Ultrashadow II appears not to work if you have Dualview selected. I may try a single monitor setup but I am in Hell and want to finish this rather fun game (I think) vice watching boring benchmarks ;).

ATI_Dude
12-14-04, 06:07 PM
About Doom 3 and Ultrashadow:

According to nVidia Ultrashadow doesn't need special coding to work in games and will adapt automatically to the game's geometry and lighting. Depth bounds test is only part of the Ultrashadow technology and the only part that requires special coding. In other words Ultrashadow is currently being actively used in Doom 3 although the depth bounds component doesn't improve performance much.

noko
12-14-04, 06:11 PM
Thanks for the clarification, so my conclusion is faulty at best since Ultrashadow II is still being used for both test I ranned and only one component was actually affected. Considering that Nvidia rigs with Ultrashadow does significantly better then ATI solutions probably really tells how effective this technique or technology really is. Meaning UltrashadowII is kickass considering the speed difference between ATI and Nvidia in this one game.

Ruined
12-14-04, 06:16 PM
Yes, they have DST and Ultrashadow II.

Decimator
12-15-04, 08:57 AM
Thanks for all the info, I think I understood about a quarter of it, I was most interested in knowing if it would help out in Battlefield 2, which (AFAIK) isn't going to be Open GL, but will have a lot of self-shadowing effects on the vehicles and player models, so if I've understood it right, the unnecessary shadow culling bit could help speed things up a bit, even though it's Direct 3D.

In fact, here's a quote from an interview where someone from Dice is talking about the new rendering engine:

The new rendering engine, developed from scratch for BF2, is completely shader driven, and is written to utilize the full potential of next-generation graphics hardware. One of the major improvements over the first Battlefield installment is that in the new rendering engine, every pixel you see on screen is dynamically lit and shadowed from multiple light sources. To make lighting in the world of Battlefield both compelling and convincing to the player, and still retain the frame rate required to enjoy the playing experience, we've had to develop several new techniques to compose the end result you see on screen. We've developed techniques that allow us to combine global illumination and hemispherical lighting with per-pixel normal mapping, and we further expanded this by using a new, more realistic looking approach to applying normal maps. Lighting and shadowing such an expansive and dynamical world as Battlefield also meant that we had to come up with new hybrid shadowing techniques which realistically integrate the players into the world

It's also been stated a few times that they've been demoing the game on 6800's.