Log in or register to post comments

AR Background plane free positioning

May 10, 2016 - 7:33am #1

Hello:

I am using Vuforia and Google Cardboard as part of a VR/AR system and I am trying to position the background plane such that it appears in front of other objects in my VR scene. I need to do this because I am working on a project where I have to display part of the camera video blended with the virtual reality environment. However, I haven't been had much success at doing this because the background plane always goes straight to the back of the Cardboard camera's FOV.

Is there anything I can configure to be able to position the background plane such that it appears at the foreground of my other VR objects? Are there any other alternatives on how I can do this?

I will be thankful on your prompt reply.

Regards

AR Background plane free positioning

May 12, 2016 - 3:52am #2

Hi,

Vuforia sets the video background position at the far cliping distance of your camera, cause that's ensure correct rendering in 'standard' AR.

However, you could modify this behaviour by:

- modyfing the VideoBackground shader (you can find this shader under Assets/Vuforia/Shaders); for example you could change the "Queue" parameter so that it is rendered and you may be able to add a Depth Offset of selected fragments of the image, see the Unity doc: http://docs.unity3d.com/Manual/SL-CullAndDepth.html

 

or

- you could create your own Game Object with a Plane Mesh and set a Texture on it; you could then bind this texture to the Vuforia Camera image;  you would then be in full control of how and where such Plane object is rendered;  the OcclusionManagement Sample App of Vuforia provides an excellent example of this technique, so definitely worth taking a look at it.

 

Hope this helps.

 

Log in or register to post comments