Hi!
I found mistakes in the iZ3D settings source code, fixed it, and now S3D settings working perfectly as required with ZOOM:
By default, iZ3D has an unsymmetric shift(shifts only one frame for eye priority) but must be always symmetric(like NVidia) as user position in front of the center of the monitor, and all eye priority must be done INSIDE VR otherwise you get geometry distortion and off-center drift effect while running in FPS games for example. Also problems with settings derived from mixing stereo base shift with frame off-center shift:
One_div_ZPS(I guess `Zero Parallax Shift`) is the `convergence` in the settings panel. `A` is _31(frame off-center shift) and `B` is _41(viewpoint shift) parameters of projection Matrix4x4 and don't need to mix it!
1) _31 parameter shifts final(not changing) view relative viewport frame X-axis(off-center) as part of its width and this `User IPD` in my system, `Separation` in NVidia driver. No need to have _31 larger than 1 but iZ3D defined redundant +-1e+7f.
Also as already exists `swap Left-Right` then not need negative part of it and correct settings show as negative in OSD(but positive in XML profile) so it should be also fixed later.
This setting gives maximum depth and for realistic S3D with infinity depth, must make the off-center images shift the same as user IPD(or lower for `aquarium effect` with limited not realistic max depth) but not higher(feel discomfort due to unusual negative outside angle of eyes). So how to find value for a max realistic setting:
a) Find viewport width(window width if it not fullscreen): viewport width = pixel pitch(step) * number of viewport width in pixels, I have 96 PPI LG D2342P so 25.4/96*1920= 508mm
b) Find shift as part of the viewport: User IPD 66mm / 508mm = 0.129921
You can set a calculated value directly to the global XML profile or per game. If you want to change it more precision in-game then increase `Separation` to large values first(larger `Separation` - smaller `Convergence` changing step) then return `Separation` back. But not all games have correct settings due to different matrices and pipelines in iZ3D.
2) _41 parameter shifts camera X position(stereo base) in a virtual world and required to make S3D from one mono camera(no need when already 2 cameras in-game make S3D and not using in my system in Unity).
Problem with Zoom in S3D drivers because they using _41 as fixed `convergence`, but it also shifts as part of a frustum and when FOV increasing stereo base also increasing and this looks like static fixed convergence on-screen and the reason why S3D not working correctly with zooming in all of this 3rd party S3D drivers. But the solution is VERY SIMPLE - for keeping static stereo base while zooming just do `_41 = cameraShift * _11` for projection matrix
_11 is X scale in cotangent of half FOV(FOV and aspect changed in games using _11 and _22(Y scale)). When _11 = 1(90 degrees horizontal FOV) then _41 match real units of a virtual world, so for set real 66mm stereo base in meters game world set
<StereoBase Value=`0.066000` /> in
C:\Users\YourUserName\AppData\Roaming\iZ3D Driver\UserProfile.xml. Percents which you see in the iZ3D settings panel is just translation of 0.066 /((defined 40 units max stereo base
) / (defined 5000% panel settings max)) = 8.25% of 5000% max. It also has a huge changing step 2.5 and should be fixed later so usually keep it around 7.5% for realistic S3D when the game world in meters or better set it precisely in XML profile.
`scale` is a correction multiplier useful when the game world not in meters but in the source code it's defined as fixed = 1 for D3D10-11 wrapper and will not working by default.
I began testing default iZ3D with `Arma2 OA` and found these problems:
a) Ignited only with WinXP version D3D9 ``Path to Arma 2\arma2.exe` -winxp` command of shortcut.
b) Not correct depth of personage, clouds, and random huge changes(jitter) in the stereo base(not playable, worse than autofocus and the same problem was in Arma3 with TriDef).
Later I found a mess of matrix multiplication that caused this:
The first two lines are not needed for Arma2 but it does not cause problems as calc result = 0 but all 4 unchanged lines required for `Microsoft Flight Simulator 2004` and `FSX` working correctly;
The problem is different games with different matrix types going via this pipeline so to keep `MSFS` working `Arma` must go to the different pipeline via the "<CheckOnlyProjectionMatrix Value=`1`" option.
This second pipeline of iZ3D working correct and no jitter - I added the line
<CheckOnlyProjectionMatrix Value=`1` /> to the Arma2 XML profile.
This option and others you can find in global
C:\ProgramData\iZ3D Driver\Config.xml and apply per game in
UserProfile.xml like this:
Code: Select all
<Profile Name="arma2">
<File Name="arma2.exe" />
<SwapEyes Value="1" />
<LaserSightEnable Value="0" />
<Presets>
<Preset Index="0">
<One_div_ZPS Value="0.129921" />
<StereoBase Value="0.066000" />
<AutoFocusEnable Value="0" />
</Preset>
<Preset Index="1">
<One_div_ZPS Value="0.129921" />
<StereoBase Value="0.066000" />
<AutoFocusEnable Value="0" />
</Preset>
<Preset Index="2">
<One_div_ZPS Value="0.129921" />
<StereoBase Value="0.066000" />
<AutoFocusEnable Value="0" />
</Preset>
</Presets>
<CheckOnlyProjectionMatrix Value="1" />
<SeparationMode Value="2" />
<ShowWizardAtStartup Value="0" />
</Profile>
`Orbiter 2010` also ruined in the default pipeline(not adequate shifting behavior when moving far from the ship while in Nvidia S3D it's OK) and not have _11 of the projection matrix, so I get it working perfectly by replacing 4th line with this genius one
:
So if someone wants to fly in `Orbiter 2010` with perfect S3D let me know, I'll give you an exclusive S3DWrapperD3D9.dll.
I made a `Dynamic Test`(DTest.exe) utility mod with added zoom by `+,-` keys and start/stop 3D model rotation by `Space` key.
I make the S3D settings fix directly in the original S3DWrapperD3D9.dll but it was required to shift CPU instructions in the file and it becomes crash due to the memory relocations table, for fast testing, I just remove the .reloc table and testing it on Win7 Arma2(Vanilla) while fixing and S3D now works perfectly. But I found that *.dll not working with many other games without a relocation table(Arma2 OA not ignite), so I fixed the .reloc table and now it works as the original file!
For working Arma2 with iZ3D need to set the Direct3D9 WinXP version via launch shortcut command line -
"Path to Arma 2\arma2.exe" -winxp -nosplash (`-nosplash` is not required).
Set `Separation mode` to `Left shift` in iZ3D `Advanced/In-Game Settings/Game` tab for correct right eye weapon scope aiming.
Testing in `Microsoft Flight Simulator 2004` iZ3D only the driver that allows seeing S3D in MSFS with correct lighting effects but S3D zooming does not work at all by default. 1st pipeline - 3d models and clouds, 2nd pipeline - terrain and sun.
I fixed these 2 default pipelines and now zoom works perfectly!
Download iZ3D fix - https://drive.google.com/file/d/13vp2ac ... sp=sharing
Install `iZ3DDriverSetup_1_13(5443).exe` on Win7
Make a backup of the original files then unpack the zip to `C:\Program Files (x86)\` and replace files.
Some games still not working correctly(Arma3 works with `<AlwaysModifyShaders Value="1" />` and no jitter from 3rd person view but changing stereo base while zooming).
Also, the x64 iZ3D version does not have all outputs methods except anaglyph and two others and you will see the `can't load output DLL` message with x64 games until select one of the output methods corresponding to existing x64 DLL's in `iZ3D Driver\Win64\OutputMethods`.