Shadows Dependent on Convergence: Why?

Post your recommended stereoscopic 3D separation/convergence settings along with game performance recommendations.
Post Reply
subwoofa
Two Eyed Hopeful
Posts: 57
Joined: Tue Mar 13, 2007 12:44 pm

Shadows Dependent on Convergence: Why?

Post by subwoofa »

Does anyone know why shadows in some games are dependent on convergence?

For Violet Assassin, of which I've read great 3D reviews, some shadows are different and wrong for each eye. I guess I have a different version from the original reviewers.

The important thing is this: if I adjust the convergence, the transforms for the shadows move as well. In other words, it's like the light source is moving as well, but in a totally different direction.

Since supposedly shadow maps are rendered from the light source, why would the location of the convergence-modified "eye" change the result? Is there a DirectX solution? Or a pixelshader solution?

Some games like VioletAssassin have made some of their shadow map code editable, but I haven't made any headway.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Shadows Dependent on Convergence: Why?

Post by Fredz »

Maybe they use forward shadow mapping or shadow volumes ?
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11406
Joined: Sat Apr 12, 2008 8:18 pm

Re: Shadows Dependent on Convergence: Why?

Post by cybereality »

I think this is because when using shadow mapping the final shadow render is projected back unto the game in screen-space and the stereo driver is altering where the "camera" is (and thus where the game engine thinks the screen is). You can see a detailed explanation of one popular type of shadow technique here: http://www.gamedev.net/page/resources/_ ... dows-r2193
subwoofa
Two Eyed Hopeful
Posts: 57
Joined: Tue Mar 13, 2007 12:44 pm

Re: Shadows Dependent on Convergence: Why?

Post by subwoofa »

Thanks. I couldn't understand fully the paper, but you're probably right. I have to figure out how to modify the shader then. I didn't know you could do that until poking around in the game's shader files, but now I realize that it's a text file that gets compiled when you start the game. This game itself seems pretty cool but everything depends on the shadows (so you know where to hide and so on). It might be in vain, but I'm not giving up yet.

Basically I have undo what the paper is doing by either forcing it to use the projection matrix, or transform the viewport coordinates into the projection space. I'm a pretty good programmer, so if I knew more about pixelshaders it would probably be pretty easy, but I'm starting from scratch here.
User avatar
Fredz
Petrif-Eyed
Posts: 2255
Joined: Sat Jan 09, 2010 2:06 pm
Location: Perpignan, France
Contact:

Re: Shadows Dependent on Convergence: Why?

Post by Fredz »

Maybe you could have a look here : http://helixmod.wikispot.org/

They are basically doing what you are trying to do but on a much greater scale, you could probably borrow some useful informations there.
subwoofa
Two Eyed Hopeful
Posts: 57
Joined: Tue Mar 13, 2007 12:44 pm

Re: Shadows Dependent on Convergence: Why?

Post by subwoofa »

Thanks Fredz, this looks promising. Unfortunately, most of their information and documentation is locked up in the nVidia forums, which seems to be shut down because of hackers. I'll have to check back with them later.

Now that I've looked at it a little more, it looks like the stereo camera transformations are being applied to the lights when rendering the shadow maps, when they really shouldn't. This is probably a common problem and I'll find out more once those nVidia forums are back up.
eqzitara1
Cross Eyed!
Posts: 130
Joined: Sun Oct 09, 2011 4:03 pm

Re: Shadows Dependent on Convergence: Why?

Post by eqzitara1 »

@subwoofa

If you know shader language. You can use the helix debugger http://helixmod.wikispot.org/oldvers
Guides on how to use debugger are here http://helixmod.blogspot.com/2012/04/ho ... -game.html
Ignore the end part about removing. Just dump and edit the shaders then inject them back into game using same method mentioned in the posting. If you wish to see how shadows are fixed in other games I recommend downloading one of helix's fixes(amalur, dead space 1/2, etc). Then opening his shaderoverride/pixelshaders + vertexshaders and find the corresponding shadow shaders. This will not be what you need to do since each game has a different engine and different programming but maybe it will help you see what he does. He wrote some guides here but it is down http://forums.nvidia.com/index.php?show ... &p=1365862
and here http://helixmod.blogspot.com/2012/03/dlls-update.html
User avatar
Neil
3D Angel Eyes (Moderator)
Posts: 6882
Joined: Wed Dec 31, 1969 6:00 pm
Contact:

Re: Shadows Dependent on Convergence: Why?

Post by Neil »

Maybe you should reprint the guides here given that the nvidia forums are down for now.

Regards,
Neil
eqzitara1
Cross Eyed!
Posts: 130
Joined: Sun Oct 09, 2011 4:03 pm

Re: Shadows Dependent on Convergence: Why?

Post by eqzitara1 »

Well I cant post it since its down and cant seem to find a cache.
I will dig deeper if when they come up its deleted but otherwise I will wait. Its nothing truly vital. Its just the intro to debugger which I have a more noob friendly guide here http://helixmod.blogspot.com/2012/04/ho ... -game.html

And his how to force 2D -> 3d at certain depth % (what we use for crosshairs/etc)
http://helixmod.wikispot.org/How_To_Make_Your_Own_Fixes
Which I have code examples of before/after. Its in the 2d->3d section.


Everthing else is on blogspot/wiki.
Post Reply

Return to “S-3D Game Settings (NVIDIA GeForce 3D Vision)”