We had our project with the zSpace 5.0 version. Our setup had the ZCore controller in the scene and two separate cameras, the behaviour of the game was based on modifying the Culling Mask of said cameras independently to show/hide objects and create multiple effects.
After updating the zSpace libraries/plugins, this setup stopped working, rendering a grey screen, prompting no errors and the game was running on the background.
We changed this for the new ZCameraRig setup, the rendering and tracking of the eyes work but we can no longer set the Culling Mask of the cameras individually, they are shared with their parent camera (ZCamera object).
Does anyone know if there is a way to fix this?
The documentation regarding the latest version of zSpace are very lacking, it is very confusing too that the first search found in google is the legacy documentation PDF that feels very outdated.
If you read through ZCamera.cs, you’ll notice in the UpdateSecondaryCameraPerspectives() method that it is calling .CopyFrom() on the individual left and right cameras to copy the properties of the singular camera. This happens to also copy the culling mask properties of the single camera which is probably why your attempts to set them individually is failing. To overcome this you will have to modify ZCamera directly. Cache the culling mask of the left and right cameras before the CopyFrom() call and restore it after.
Which documentation are you reading? Are there any specific gaps in knowledge that you can comment on?
When migrating from zCore 5 to 6, there is a supplementary document that may be of additional assistance located at the following link.
Thank you very much for pointing the .CopyFrom() call from the ZCamera script, I don’t know how I missed that but after storing the left and right culling mask values in the script and overwriting them it works as I want it to.
Regarding the documentation issues I mentioned: I have been using the zCore 6.0 online documentation.
Both this doc and the Unity 3D Programming Guide Version 1.0. I believe the new documentation and features are a bit basic; I fully understand it because they cover what 99% of the users would need from it.
At the moment I am having trouble trying to move forward the cameras and increasing their FOV due to the ZFrame and ZProvider dictating how they are placed.
Before updating I had my cameras placed at -0.25z with an FOV of 60 and now it is positioned at -0.60z with an FOV of ~26. I can’t manage to adapt it manually; I assume in this case I have to modify the ZCamera script again, the UpdateStereoPerspective(). But this is a different topic I believe.
I’m glad that helped regarding the culling masks.
In terms of how to manipulate the FOV, this is essentially counter to how zSpace stereo works. To achieve the stereo effect that is characteristic of zSpace, the four edges of the frustum must line up with the corners of the display and the user’s eye as the apex. If you’re aware of the implications and intend to diverge anyways, then you’re getting into unsupported use-case territory. Your best option will be to write a custom version of ZCamera to do what you intend. Be aware that unlike zCore 5, which used Unity’s built-in support for quad-buffered stereo, 6.3 draws to a custom render destination. You’ll at least want to preserve that portion of ZCamera.