It is currently Wed Nov 20, 2019 5:11 pm



Reply to topic  [ 9 posts ] 
 Shadows Dependent on Convergence: Why? 
Author Message
One Eyed Hopeful

Joined: Tue Mar 13, 2007 12:44 pm
Posts: 48
Reply with quote
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.


Tue Jul 10, 2012 3:30 am
Profile
Petrif-Eyed
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 2255
Location: Perpignan, France
Reply with quote
Maybe they use forward shadow mapping or shadow volumes ?


Tue Jul 10, 2012 11:59 am
Profile WWW
3D Angel Eyes (Moderator)
User avatar

Joined: Sat Apr 12, 2008 8:18 pm
Posts: 11394
Reply with quote
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

_________________
check my blog - cybereality.com


Tue Jul 10, 2012 6:15 pm
Profile
One Eyed Hopeful

Joined: Tue Mar 13, 2007 12:44 pm
Posts: 48
Reply with quote
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.


Wed Jul 11, 2012 11:35 pm
Profile
Petrif-Eyed
User avatar

Joined: Sat Jan 09, 2010 2:06 pm
Posts: 2255
Location: Perpignan, France
Reply with quote
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.


Thu Jul 12, 2012 2:21 pm
Profile WWW
One Eyed Hopeful

Joined: Tue Mar 13, 2007 12:44 pm
Posts: 48
Reply with quote
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.


Sun Jul 15, 2012 2:41 pm
Profile
Cross Eyed!

Joined: Sun Oct 09, 2011 4:03 pm
Posts: 130
Reply with quote
@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


Tue Jul 24, 2012 11:17 am
Profile
3D Angel Eyes (Moderator)
User avatar

Joined: Wed Dec 31, 1969 6:00 pm
Posts: 5717
Reply with quote
Maybe you should reprint the guides here given that the nvidia forums are down for now.

Regards,
Neil


Tue Jul 24, 2012 5:31 pm
Profile WWW
Cross Eyed!

Joined: Sun Oct 09, 2011 4:03 pm
Posts: 130
Reply with quote
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.


Wed Jul 25, 2012 1:50 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.