Virtual Reality Support for Stereo Displays

Hi Guys,

i’m using Unity 2017.1.0f3 and a Acer H7550STz DLP Projector pulg in a Nvidia Quadro K5200 (2x SLI) and a Nvidia 3D Vision 2 Kit.
I’ve created a Testproject with some spheres, cubes and one movable camera. I also activated the Virtual Reality Support for Stereo Displays (non head-mounted) and the camera’s “Target Eye” is set to “Both”. The build of this project look good, i’v got a stereoscopic picture and Camera.stereoEnabled returns true.

But when i’m trying to manipulate the left and right eye’s projection matrix it seems to have no effect. For instance when i set the porjection matrices as the following

Matrix4x4 projectionLeft = Matrix4x4.Perspective(90.0f, 16.0f / 9.0f, 0.3f, 1000.0f);
Camera.SetStereoProjectionMatrix(Camera.StereoscopicEye.Left, projectionLeft);
Matrix4x4 projectionRight = Matrix4x4.Perspective(45.0f, 16.0f / 9.0f, 0.3f, 1000.0f);
Camera.SetStereoProjectionMatrix(Camera.StereoscopicEye.Right, projectionRight);

each eye should see a completely different picture but they dont. It seems they have no effect. I’ve tested the projection matrices with the “Split Stereo Display” option for the Virtual Reality Support.
Further more Camera.stereoActiveEye returns always Camera.MonoOrStereoscopicEye.Left for both pictures (left and right).
I always tested my changes with a build of the project.

I need to manipulate the left and right eye’s projection matrix for a CAVE setup. In our actual setup each video wall got its own eye pair no matter how the user turns his head (the head is tracked via kinect). When you look at any cornor the pictures of each wall do not fit together properly (see picture).
Inexperienced user didn’t notice the problem but when you spend some time in the CAVE the problem gets annoying. The solution is that every video wall (unity → camera) share the same eyes couple and therefor i need to manipulate the left and right eye’s projection matrix.

Any help is welcome. Thanks!

Greetings

3190742--243677--CAVE_top_down.jpg

I just discovered this thread. Have you solved your issue? I have a couple suggestions but it’s moot if you’ve fixed the problem.

Looking for a solution on this myself… Any successes out there?

As far as I know the projection matrix is locked by the virtual reality support. There is no way of changing this.

I’ve not used the Split VR mode, but I do use the Stereo (non head mounted) VR option and the camera stereo view and projection matrix calls were working the last time I worked on it. You need to enable the Stereo (non head mounted) and either set it as the first option or request it on the command line. If the start/resolution window doesn’t give you a 3D stereo option, your not in stereoscopic mode.

I set the perspective matrix fields manually from near, far, top, bottom, left and right frustum parameters that I calculate from an eye position and extents of a display wall. I’d suggest working the algorithm in mono using the camera projectionMatrix property to verify your algorithm. The camera gizmo will show the view frustum so you can see if it’s what you expect for each eye. Then you can modify the code to support stereo.

I don’t have a sample I can post just now, but I made this video to show my students what view frustums in a CAVE setup should look like.

Hi @mikewarren , I am trying to get my set-up to work as you have demonstrated within your video. Would be much appreciated if you could share the code/details that you have used for achieving the CAVE frustum.

@HoloLens_Developer
Unfortunately, I don’t own the code and it’s not an open source project. Sorry. I’ve started re-implementing it as part of a tutorial / article, but haven’t finished it.

Camera.SetStereoProjectionMatrix() will only work when using multi-pass rendering. If multi-pass is not used for the stereo rendering mode, set in the xr player settings, then the vr device will force its own projection matrix.

@BrandonFogerty

Is this a limitation in Unity or some underlying graphics API?
And, is it true of all graphics APIs (D3D, OpenGL, etc.)?
How does this apply to non HMD stereo devices like projection wall where there is no device specific projection matrix?