It is currently Sat Dec 14, 2019 9:53 pm



 [ 10 posts ] 
 How to modify convergence and separation? 
Author Message
Two Eyed Hopeful

Joined: Sat Dec 22, 2007 3:38 am
Posts: 95
I'm used to the iz3D drivers, that provide extremely intuitive controls to change convergence and separation and which I regularly use with my HMZ-T1 head-mounted display in side-by-side mode; today I tried the Perception drivers, to see how they compare.
In order to have a better idea of their features and limitations, I decided to test them with a program I made, namely this one: http://devilmaster.altervista.org/tadpsid.html

What follows is the profile I have added at the end of profiles.xml:
Code:
   <profile game_name="Tadpsid" game_exe="Tadpsid.exe" cpu_architecture="32bit" shaderModRules="Tadpsid.xml" VRboostRules="" minVRboostShaderCount="40" maxVRboostShaderCount="999999" game_type="99999" rollEnabled="false" worldScaleFactor="57.5001" convergence="16.001" swap_eyes="true" ipd_offset="0" use_sdk_pose_prediction="true" y_offset="0" yaw_multiplier="5" pitch_multiplier="5" roll_multiplier="1" position_multiplier="1" position_x_multiplier="2" position_y_multiplier="2.5" position_z_multiplier="0.5" distortion_scale="-6.55651e-007" hud_3D_depth_mode="0" hud_3D_depth_1="0" hud_3D_depth_2="0" hud_3D_depth_3="0" hud_3D_depth_4="0" hud_distance_1="0.0001" hud_distance_2="0.0001" hud_distance_3="0.0001" hud_distance_4="0" hud_key_swap="0" hud_key_default="0" hud_key_small="0" hud_key_large="0" hud_key_full="0" gui_3D_depth_mode="1" gui_3D_depth_1="0" gui_3D_depth_2="0" gui_3D_depth_3="0" gui_3D_depth_4="0" gui_size_1="0.6" gui_size_2="0.5" gui_size_3="0.9" gui_size_4="1" gui_key_swap="111" gui_key_default="0" gui_key_small="0" gui_key_large="0" gui_key_full="0" VRBoost_key_reset="0" WorldFOV="91.2001" PlayerFOV="70.6005" FarPlaneFOV="95" CameraTranslateX="0" CameraTranslateY="0" CameraTranslateZ="0" CameraDistance="0" CameraZoom="0" CameraHorizonAdjustment="0" ConstantValue1="0" ConstantValue2="0" ConstantValue3="0" edge_peek_key="0" />


And this is the additional Tadpsid.xml (residing into the shader_rules subdirectory) that is referred to within the profile:
Code:
<?xml version="1.0"?>
<shaderConfig>
   <rules>
      <rule constantName="ViewProjectionMatrix" partialName="true" id="1" constantType="MatrixC" modToApply="2" startReg="0" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="9" constantType="MatrixC" modToApply="2" startReg="238" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="2" constantType="MatrixC" modToApply="2" startReg="4" transpose="false" />
      <rule constantName="PreviousViewProjectionMatrix" partialName="true" id="3" constantType="MatrixC" modToApply="2" startReg="12" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="4" constantType="MatrixC" modToApply="2" startReg="8" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="5" constantType="MatrixC" modToApply="2" startReg="5" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="6" constantType="MatrixC" modToApply="2" startReg="1" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="7" constantType="MatrixC" modToApply="2" startReg="235" transpose="false" />
      <rule constantName="PreviousViewProjectionMatrix" partialName="true" id="8" constantType="MatrixC" modToApply="2" startReg="242" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="10" constantType="MatrixC" modToApply="2" startReg="234" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="11" constantType="MatrixC" modToApply="2" startReg="247" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="12" constantType="MatrixC" modToApply="2" startReg="16" transpose="false" />
      <rule constantName="PreviousViewProjectionMatrix" partialName="true" id="13" constantType="MatrixC" modToApply="2" startReg="8" transpose="false" />
      <rule constantName="ViewProjectionMatrix" partialName="true" id="14" constantType="MatrixC" modToApply="2" startReg="236" transpose="false" />
   </rules>
   <defaultRuleIDs>
      <ruleID id="1" />
      <ruleID id="2" />
      <ruleID id="3" />
      <ruleID id="4" />
      <ruleID id="5" />
      <ruleID id="6" />
      <ruleID id="7" />
      <ruleID id="8" />
      <ruleID id="9" />
      <ruleID id="10" />
      <ruleID id="11" />
      <ruleID id="12" />
      <ruleID id="13" />
      <ruleID id="14" />
   </defaultRuleIDs>
   <shaderSpecificRuleIDs shaderHash="236630468" squishViewport="true" />
   <shaderSpecificRuleIDs shaderHash="2720631710" squishViewport="true" />
</shaderConfig>


The effect of this profile is that the virtual environment is actually displayed in 3D (a partial success), but everything looks way too small and close to my eyes. The farthest possible distance is at screen depth, which is completely unlike what I want (I want the closest possible distance to be at screen depth, and everything else to be farther away).
With the iz3D drivers, I would simply modify the convergence (so that the closest possible distance is at screen depth) and the separation (so that the farthest possible distance is not too close and not uncomfortably far), but how do I achieve that with the Perception drivers?
I have noticed that modifying the ipd_offset parameter (which, I presume, is supposed to modify the interpupillary distance) has no effect at all (I've tried values of 0, 1, 10 and 1000, and there were no changes at all in the scene). Then I tried the worldScaleFactor parameter, but this just changes the scale along the depth axis. Further tests with it (adjusting it with LCTRL+ALT and the mouse wheel) make me guess that this is the equivalent of the separation parameter in the iz3D driver... but what is the equivalent of the convergence parameter? The actual convergence parameter of the Perception driver has no noticeable effects: I tried changing its value to 0.001, 0.01, 0.1, 1 and 10, and the scene remains absolutely identical in every case!

What am I missing?


Fri Jan 02, 2015 11:27 am
Vireio Perception Developer
Vireio Perception Developer
User avatar

Joined: Wed Aug 14, 2013 6:20 am
Posts: 328
Location: London
Hi

Great idea using Perception to add HMD support to your game. I hope it works out!

I saw that your world scale value is around 57, world scale will directly affect camera separation (essentially it is a multiplier on the IPD value to figure out how separate the eyes should be), obviously this value will change from game to game, the bigger the value the further apart the cameras will be and the more of a toy-town effect you'll get if it is too big.

Convergence should be the value you need to change, so it surprises me it doesn't appear to be making a difference. However as your world scale value is so big (most games appear to have a value in the 1-5 range) setting a convergence of even only 10 might not make an apparent difference (I think it is coupled to the world scale value), try something bigger to see if that makes a difference. I have seen convergence have an effect (if it is too low, then you get a cross eyed effect going on), so you might just need to have a bit more fiddling.. otherwise there might well just be a bug.

When adding game support I usually just start with a convergence a couple of times larger than the world scale value and then tune things.

Good work on creating the shader rules and getting proper stereo though. Good luck, I hope you manage to solve the issue. You could always take a look at the code by the way, it's open source, so it might tell you something you need to know:

https://github.com/cybereality/Perception


Mon Jan 05, 2015 7:19 am
Two Eyed Hopeful

Joined: Sat Dec 22, 2007 3:38 am
Posts: 95
As a test, I have "reset" the profile for Tadpsid.exe to undo possible screwups, copying and pasting the Rainbow Six Vegas profile (which I had originally used to start experimenting), then modifying the profile name and executable name. Since the world scale value was lower, the resulting depth was lower as well, as expected. But then I attempted more changes to the convergence: 10, 100 and even 1000. This, I did by editing the profile directly, for the reason I'll explain in the next paragraph. Anyway, those values produced no difference at all. To be sure of that, I grabbed stereo screenshots for each of those values, then I compared them with the Difference function in Paint Shop Pro, which shows all pixels that are different between two images. The obtained image was completely black, which means that the source images were identical.

Another strange thing I noticed: if I try to adjust the convergence from the menu, the left arrow brings it down as expected, but the right arrow brings it down as well, just more slowly. And if I bring it down to 1.001 meters, then it remains stuck there, and pressing an arrow key won't change the value anymore. At that point, the value won't change even if I quit and relaunch the program: to make it "unstuck" I must copy and paste a working profile, like I mentioned at the beginning of this post.

Checking the code... eh, that's quite a proposition, considering that I've never worked at the API level. :oops:
All programs I ever wrote are either at a higher level (controlling properties of objects in a virtual environment with an already established engine, like in TADPSID, which we are discussing here) or a much lower level (parsing and interpreting tokenized programs for 8-bit machines or devices of comparable complexity). I'd need months to make sense of it. :(


Tue Jan 06, 2015 4:22 pm
Vireio Perception Developer
Vireio Perception Developer
User avatar

Joined: Wed Aug 14, 2013 6:20 am
Posts: 328
Location: London
OK, no worries, You could try adjusting convergence in-game using LCTRL+SPACE and using mouse wheel to increase and decrease, just to see if that has any effect.

Out of interest, how did you generate the shader rules file that gives you stereo separation?, did you use the shader analyser? If you didn't, then you could try generating one using the shader analyser and then see if that enables you to alter the convergence.. not sure why it would make a difference if you already have stereo but worth a try.

Sounds like there is a bug in the world scale/convergence editor anyway.. will have to take a look into it.


Wed Jan 07, 2015 3:30 am
Two Eyed Hopeful

Joined: Sat Dec 22, 2007 3:38 am
Posts: 95
Quote:
You could try adjusting convergence in-game using LCTRL+SPACE and using mouse wheel to increase and decrease, just to see if that has any effect.

No, it doesn't. I go all the way through, from 1.001 to 10.000, and everything in the image remains identical.
Quote:
Out of interest, how did you generate the shader rules file that gives you stereo separation?, did you use the shader analyser?

Yes. Before trying to modify the convergence with the mouse wheel I deleted it and recreated it, and nothing changed.


Thu Jan 08, 2015 5:52 pm
Vireio Perception Developer
Vireio Perception Developer
User avatar

Joined: Wed Aug 14, 2013 6:20 am
Posts: 328
Location: London
Something very odd going on.. I'll add it to my list of things to look at. I thought I had seen convergence working at some point, but now I am having doubts.


Fri Jan 09, 2015 8:08 am
Two Eyed Hopeful

Joined: Sat Dec 22, 2007 3:38 am
Posts: 95
Was this problem ever fixed?


Mon Jun 15, 2015 6:47 am
Vireio Perception Developer
Vireio Perception Developer
User avatar

Joined: Wed Aug 14, 2013 6:20 am
Posts: 328
Location: London
Next release will remove convergence for HMDs, as the intention is your eyes should be converging at infinity (I believe).

There are other changes to the projection and things like that, so there's a good chance your issues are resolved.

Can't give an ETA on the next release though, there's a lot going in.


Tue Jun 16, 2015 3:05 am
3D Angel Eyes (Moderator)
User avatar

Joined: Sat Apr 12, 2008 8:18 pm
Posts: 11394
The DK2 does not actually focus at infinity (as may have been said before) but rather at around 1.5m.

I'm not sure what that means in terms of rendering, so it may not even make a huge difference if the end result is comfortable to view.

_________________
check my blog - cybereality.com


Tue Jun 16, 2015 9:36 pm
Vireio Perception Developer
Vireio Perception Developer
User avatar

Joined: Wed Aug 14, 2013 6:20 am
Posts: 328
Location: London
Interesting!, Did not realise that. The infinite convergence point seems quite comfortable, and certainly makes a lot of the maths easier.


Fri Jun 19, 2015 1:47 am
Display posts from previous:  Sort by  
   [ 10 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.