I need to create the static background for my scene at positive parallax

Hello,
We are developing an application where we need background static and 3d objects can freely move with stylus.
Inside the zCameraRig, we have added zCanvas Gameobject. We added UI image on the canvas and it works fine. The image added on the canvas is at zero parallax.

This leaves very little space to position the 3d objects and that too on the negative parallax. Since adding 3d objects on positive parallax will hide them.

We are trying to replicate static image effects as is available in FUN2 apps. where we have image at the background, which is static.

Is there a way to add image on the positive parallax and make it absolutely static and place 3D objects in front of the image.

Any suggestions will be highly appreciated.

Thanks in advance.
Regards
Gautam

Hi Gautam,

My general advice is to not do what you’re seeking, even if you can find instances of other apps doing it. When you say that you want the background to be absolutely static, it is the same as saying that you want it to coincide with the zero parallax plane. By forcing the background to be at zero parallax and placing your stereo content in positive parallax, but drawing the background behind it, you are violating the fundamental rules of depth occlusion. It results in an unnatural and often uncomfortable experience because our vision is not accustomed to interpreting objects that are deeper in the scene than others yet drawing on top of those shallower elements.

I would ask that you please reconsider what you are attempting. I assure you that you can still have a stellar visual quality and user experience without resorting to depth violations.

That being said, if you insist on doing it anyways, I can’t tell you exactly how Fun2 did it because I don’t have access to their proprietary code. I can only offer general guidance. The most obvious way would be to open up ZCamera.cs and find where it is calling Camera.Render. Modify this to do two additional renders for the left and right eyes of just your background plane. Then render the rest of the scene as normal, but with the Render Type property set to “overlay” so that it doesn’t clear out your prior render of the background plane.

Alex S

1 Like

Thanks Alex.

We also internally thought about it and will exactly go with what you said in para 1.