Why projected shadows in B3D's SC demo?

Ante P

Veteran
?

A bit confusing perhaps for those not too familiar with the SC specifics?

At least a comment in the readme would be appriciated. :)

I mean it's not like any FX owners will play with projected shadows just to make "it fair" or something. :)
 
If I were to do a comparison review then I'd to a 'like for like' performance comparison and then a full setting as well, showing the IQ differences. This is what I did with the 5200 preview. However, if I weren't using the MX then I wouldn't have used the projector mode at all.
 
DaveBaumann said:
If I were to do a comparison review then I'd to a 'like for like' performance comparison and then a full setting as well, showing the IQ differences. This is what I did with the 5200 preview. However, if I weren't using the MX then I wouldn't have used the projector mode at all.

Yeah I figured it was something similar like that.
I just meant that perhaps you should comment that for those people who want to download your demo.

BTW god damn the game looks ugly when using projected shadows :/
 
Ante P said:
BTW god damn the game looks ugly when using projected shadows :/
Does someone know exactly why though? AFAIK You should be able to have more than one light source and more than one object which casts shadows with projected shadows. Isn't this shadowing technique also used by nwn for instance (without the drawbacks the splinter cell projected shadows have)? Or would the performance hit be too big?
 
mczak said:
Ante P said:
BTW god damn the game looks ugly when using projected shadows :/
Does someone know exactly why though? AFAIK You should be able to have more than one light source and more than one object which casts shadows with projected shadows. Isn't this shadowing technique also used by nwn for instance (without the drawbacks the splinter cell projected shadows have)? Or would the performance hit be too big?
Actually you have scenes with more than one shadow casting light even when running with shadow projection -- sometimes you can have several of those projectors visible at the same time. The following is the shadow projection algorithm used in Splinter Cell :

3 levels projection technique:

-For each shadow projector (shadow casting light) in the scene: (render from the light point of view)

-Render the "Actor" shadow texture, contains every static mesh/object with the tag "cast on static mesh" set to 1 (eg: gates, butterflies)

-Render the "StaticMesh shadow texture, contains every static mesh/object with the tag "cast on static mesh" set to 1 + all dynamic actors (distance check for Sam, not for the other actors)

-Render the "BSP" shadow texture, contains every static mesh/object with the tag "cast on static mesh" and/or "cast on BSP" set to 1 + all dynamic actors (no distance check)

With high resolution shadow textures (512x512), this means 3 of those textures for every shadow casting light. Sometime, there can be several of those projectors visible at the same time. To optimize performance, those shadow textures are stored in a static texture cache if they don't change from frame to frame. This has one serious consequence, it is using a LOT of video memory and this explains why 32 MB adaptors are only able to run the game at 640x480 (800x600 with Patch #2). In fact, it's so much memory that a "Very High" resolution setting with 1024x1024 would require a 256 MB frame buffer. When the light is moving, or something is moving in the scene, it does invalidate the texture cache and everything has to re-rendered again. Generally, that means only the spot Sam is in but if there are soft bodies moving around and are casting shadows, the cost can become pretty high. Several additionnal passes are done on each of those texture:
1) Intensity matching to change the contrast and the brightness of the shadow
2) Shadow blur, based on a large filtering kernel (very expensive (fillrate)), the shadow is blurred in real time. The more blur the artist
wanted, the more expensive it gets (up to a point of course).

Most importantly, in terms of dynamic lighting system, shadow buffer uses EShadowSpotAttenuated light while shadow projection uses, well, projected textures. Shadow buffer uses depth texture creation, rendering from the light POV with Z/stencil only -- for a DX8.1 game like Splinter Cell, depth texture creation is only supported on NV2x/NV3x.
 
A bit off topic but ..

I read a note from Danny with regards on how to properly benchmark Splinter Cell:

http://www.beyond3d.com/forum/viewtopic.php?t=5848

He suggests that you'd try and change some of the shadow settings instead of just changing the resolution (although he mentions that this won't affect the oil rig demo that much but you used the The Chinese Embassy level also). Anyway, i just want to know if you (B3D) tried these different settings in, f.e the Albatron 5200 review ?
 
Bjorn said:
A bit off topic but ..

I read a note from Danny with regards on how to properly benchmark Splinter Cell:

http://www.beyond3d.com/forum/viewtopic.php?t=5848

He suggests that you'd try and change some of the shadow settings instead of just changing the resolution (although he mentions that this won't affect the oil rig demo that much but you used the The Chinese Embassy level also). Anyway, i just want to know if you (B3D) tried these different settings in, f.e the Albatron 5200 review ?

Those suggestions aren't appropriate for a B3D-style fillrate graph, which keeps everything except resolution constant so as to discover the scaling properties at particular settings. Now, B3D might look into benching Spinter Cell at a variety of different settings, either producing a different graph for each, or putting them all on one graph but leaving out competing GPUs, the way they currently do for AA/AF.

Dany's suggestions are great for most sites, which concentrate their reviews on showing how different GPUs match up running common game scenarios. They don't make sense for B3D, which concentrates on identifying the underlying performance characteristics of the GPU, using game (and other) benchmarks as a tool to accomplish this end.

(All this is, of course, IMO; not presuming to speak for Wavey or B3D.)
 
Reverend said:
The following is the shadow projection algorithm used in Splinter Cell :
...
Thanks for the thorough explanation, but it looks like I'm a bit lost there. According to that algorithm, it should be possible that static geometry (such as in the oil rig benchmark) creates shadows, or am I missing something?
 
mczak said:
Reverend said:
The following is the shadow projection algorithm used in Splinter Cell :
...
Thanks for the thorough explanation, but it looks like I'm a bit lost there. According to that algorithm, it should be possible that static geometry (such as in the oil rig benchmark) creates shadows, or am I missing something?
They do but due to the different dynamic lighting systems (in buffer mode and in projector mode) you get very different shadow effects. Does this help any? Also, re-read the part in my post above about how rendering from a light's point of view is done.
 
Reverend said:
With high resolution shadow textures (512x512), this means 3 of those textures for every shadow casting light.
Wouldn't these textures also need to be cubic textures, in the general case? (that is, six 512x512 textures may be needed...)
 
Reverend said:
Shadow buffer uses depth texture creation, rendering from the light POV with Z/stencil only -- for a DX8.1 game like Splinter Cell, depth texture creation is only supported on NV2x/NV3x.

Would utilizing the DirectX 9 API allow the shadow buffer algorithm to be used on the ATI Radeon (and possibly other) cards?
 
The shadow buffer algorithm can be used on all hardware DX8.0 and up, just not in the nVidia specific way that SC implemented (for some unknown reason - I think it would have been much better to do the general support for all cards and only the vendor specific optimizations if time permitted, but oh well. I guess there aren't really enough DX8 cards that aren't nVidia's to warant that.. of course that decision also screws over DX9 cards as well).

Shadow buffers are based around rendering scene depth from the light's point of view to a texture. There is no reason why this has to be done with a depth texture, that's just how nVidia (in a rather hack job of a way) exposes their hardware support for the algorithm. The problem with doing it on DX8 hardware, though, is that DX8 doesn't have too many texture formats fit for depth information (and those that are fit for it aren't supported by any strictly DX8.x cards that I know of - like D3DFMT_G16R16 for instance). So the best you can do is 10-bits of precision (4 8-bit channels) - clearly not enough for all cases when depth information is concerned. But it's still a whole lot better looking than straight projected textures.

Anyhow, yes DX9 "fixes" the problem, though probably in a less direct way than you might think. D3DFMT_G16R16 would be fine most of the time for shadow buffers, and that IS exposed in DX8.1. It's just that no DX8 cards (that I can think of off hand) supported it as a render target. ATI's DX9 class cards DO support it as a render target though, even in DX8. So you don't really need DX9, you just need a DX9 card; if that makes sense :). The problem gets a whole lot better in DX9 with high-precision render targets. You can now use 32-bits of single-channel floating point precision to use as you'd like, which is plenty for any practical case (though you could obviously make stupid design decisions that might require a lot more precision).
 
Reverend said:
They do but due to the different dynamic lighting systems (in buffer mode and in projector mode) you get very different shadow effects. Does this help any? Also, re-read the part in my post above about how rendering from a light's point of view is done.
Ok, I can understand why the shadows are less detailed, why they aren't exactly at the same place (because they are mapped differently) and why the brightness isn't the same. Still, some mysteries remain.
Reverend said:
This means 3 of those textures for every shadow casting light. Sometime, there can be several of those projectors visible at the same time.
However (from the link you gave above)
DaveB said:
The number of shadows in Buffer mode corresponds with number of shadow-casting light source (whereas there can ever only be one shadow under Projection mode... a classic example is the second screenshot where you see two shadows of the main character in the Buffer shot and only one shadow in the Projection shot -- this is caused by the twin headlights of a van behind the character which is not seen in the screenshot)
Maybe I'm missing something obvious (he - I'm a n00b) but I really don't understand why there can't be two shadows for one object and two different light sources.
 
Ilfirin said:
The shadow buffer algorithm can be used on all hardware DX8.0 and up, just not in the nVidia specific way that SC implemented (for some unknown reason - I think it would have been much better to do the general support for all cards and only the vendor specific optimizations if time permitted, but oh well. I guess there aren't really enough DX8 cards that aren't nVidia's to warant that.. of course that decision also screws over DX9 cards as well).

Well, the reason seems quite clear and plausible for me: Primary development platform was the XBox - so the shadow buffer algorithm was primarily based on the NV2A capabilities. And time constraints didn't permit implementing a new shadow buffer algorithm in addition to the other methods, I guess.

Someone correct me if I'm wrong.
 
Snyder said:
Well, the reason seems quite clear and plausible for me: Primary development platform was the XBox - so the shadow buffer algorithm was primarily based on the NV2A capabilities. And time constraints didn't permit implementing a new shadow buffer algorithm in addition to the other methods, I guess.

Someone correct me if I'm wrong.

True - I think that it's another case of catering to the "lowest common denominator" - if a second shadow buffer algorithm were added for cards such as the Radeon 9700, it wouldn't work on cards such as the TNT 1/2 and the Voodoo 5, etc. The shadow projection algorithm, however, would work with all cards. The UbiSoft engineers who were working on the PC port (~5 people) most likely didn't have time to do another shadow buffer algorithm in addition to a shadow projection algorithm. Hence, the Radeon owners suffer...
 
Did I miss something? I have a Geforce3 and a 9700 Pro and SC looks better on my 9700 Pro, including the shadows. As a matter of fact, I am seeing environment shadows in games that weren't even rendered on my Geforce3.
 
RingWraith said:
Did I miss something? I have a Geforce3 and a 9700 Pro and SC looks better on my 9700 Pro, including the shadows. As a matter of fact, I am seeing environment shadows in games that weren't even rendered on my Geforce3.
Well, "looks better" is subjective of course.

http://www.beyond3d.com/reviews/albatron/gffx5200u/index.php?p=7

Which of the shadow modes (projected or buffer) images look better to you?

I don't know quite what you mean by "environment shadows" that exists on a 9700 that doesn't on a GF3... could you provide some screenshots?
 
I am in total agreement with the article, I can definitely see a difference between the 2. I only played the demo of Splinter Cell (not my cup of tea but I had to check out the graphics) but it doesn't look as bad as the buffer screenshots in the article. Was projection enabled on ATi cards for the demo maybe?

I apologize for using such a rudimentary description, but what I meant by environment shadows was for example opening a door in a lighted room going to a dark room casts a shadow where the light shines into the doorway. I did not mean to infer the Geforce 3 was not capable of this, I just meant that these shadows aren't present with the drivers I have tried. Its a software issue but it still makes the game look better on my 9700 PRO.

You guys make it sound like real-time shadows aren't possible on the Radeons, LOL thats why I was dumb-founded, because they look great. I don't care what they do with Splinter Cell, I'll never play it so it doesn't matter to me, but I assure all of you, shadows look great on my card.
 
Back
Top