zSpace Stereoscopy - Unity

Having some trouble displaying stereoscopy within Unity to replicate some of our older applications; the viewport will switch to stereoscopy and will have depth but there is no negative parallax.

Additionally, the previous applications would ‘pivot’ the camera around the centered model when the glasses move closer to the screen or further, this no longer seems to be the case as moving towards the screen seems to destroy the field of view and the model starts to stretch in the expected direction.

I have pieced together all the related suggestions and tried those based on the documentation and the answers posted here.

Another note is that this is having to use OpenGL (GLCore). It says that DX11 is supported but running DX11 will not render stereoscopy with it in the PlayerSettings or by the additional -vrmode stereo command line.

Anyone had this issue and solved it?

zSpace 200 by the way.

Thanks

Some additional information after editing the core:
The frustum gets altered but the camera or viewport don’t account for it, that’s what my stretching issue is, I looked at the camera navigation example and noticed that you are manually updating the viewport when the camera is told to move, I tried to apply that to my own camera so that the viewport would update with the rotation and position of the glasses but different attempts showed different results:
Tweening like it is in the sample made it spin violently
Setting the position of the main camera made it spin violently
The working non-working solution has been to do:
ZCore.Pose pose = _zCore.GetTargetPose(ZCore.TargetType.Head, ZCore.CoordinateSpace.World);
_zCore.SetViewportWorldTransfom(pose.Position, pose.Rotation, _zCore.ViewerScale);
And that just does nothing
What is the correct way to do this? The camera should naturally alter with the frustum changes I think

Also noticed there’s a _screenRayCamera which is disabled after creation, but when I enabled it I actually had expected functionality, the camera correctly rotated the viewport and screen separation still appeared correct, the only issue was the positioning of things in the world and of course the stylus has a wrong position; so inevitably that is the wrong solution.
Not sure why it’s disabled.
There’s also a few things that are guarded by preprocessor UNITY_EDITOR not sure which one of these are important, the game view resources and preview things are necessary.

Hey there,

If you’re on Windows 7, then you’ll be limited to OpenGL, if you’re on a newer OS we’ll have to look closer at why D3D isnt working for you.

In regards to camera positioning, Normally, you position the camera directly, however, as you’ve found, the helper function SetViewportWorldTransform is available which sets the camera’s position relative to a desired viewport position. In the two line snippet you provided, it leads me to believe there may be confusion as to what “viewport” means considering you’re trying to set the viewport’s position to that of the user’s tracked head position. The viewport is the position of the physical display relative to the user’s head.

The viewport should be set to the position of the object you want the user to focus on. So, if there’s an animal you want the user to look at you’d set it like so.
_zCore.SetViewportWorldTransform(animal.position, angle to view animal from, scale big enough to fit animal to screen);

Thanks Alex,

Is that animal to be represented in a static scene where a user does not move? Or would applying it to my project be what I am looking for?

So having the glasses still control necessary head movements and then SetViewportWorldTransform constantly so that the new ‘view’ is still attempting to match the users position as if they were in the world, thankfully the project only has one object to be focused.

And yes the laptop currently operating the zspace is windows 7.

Additionally is there any information you could provide with the negative parallax?
The viewport and positive parallax renders fine but the negative parallax does not seem to be drawn (model clips the edge of the screen but there’s no extrusion for the stereoscopy)

Hi again,

The animal can be static or not. If not, and you want the user’s view to follow the animal, then you can continuously update the user’s view position. Calling SetViewportWorldTransform works for either situation just like updating a camera’s position would work in more typical 3d experiences.

I find it best to think of it as positioning the user’s display in 3d space rather than their head/camera since the head has a certain range of freedom whereas the display/viewport is static aside from how developers want it positioned.

I don’t think I’ve experienced negative parallax clipping you’re speaking of. It sounds like it isn’t something as simple as camera near/far clipping. Sharing a screen capture would probably be best to convey what’s going on.