Log in or register to post comments

Multiple Cameras / Depth Only / Ipad Air / No Video Background

August 1, 2014 - 6:58am #1

Hello everybody,

I use several Cameras set to Depth Only in my Scene for layering Effects and for GUI. It works in the Editor but doesn't  on the device, an Ipad Air.

A quick websearch led me to topics like:


I quote from that:

"Essentially, we had to change the native video background to render in OnPreCull() instead of Update() in order to support Unity4.2, where rendering outside the main render loop is no longer supported."

So how do I do that? Can I still do something with the instantiated Background Cam from Vuforia or do I have to write a script of my own for getting the camera image and displaying it on something?

I tried getting the image and displaying it with a shader that uses screenspace Uvs, and it works in Editor, but on the device I get a black background with a small video image in one corner.

This is what I wrote:

    public Renderer backgroundPlane;

    void Start ()
        Texture2D mTexture = new Texture2D(0, 0, TextureFormat.RGB565, false);

        mTexture.filterMode = FilterMode.Bilinear;
        mTexture.wrapMode = TextureWrapMode.Clamp;
        // Assign texture to the renderer

        if (!QCARRenderer.Instance.SetVideoBackgroundTexture(mTexture))
            Debug.Log("Failed to setVideoBackgroundTexture " + mTexture.GetNativeTextureID());
            Debug.Log("Successfully setVideoBackgroundTexture " + +mTexture.GetNativeTextureID());

Sorry if I'm dumb here, but I have to get this project finished in a week, and this is just another thing on my plate that I don't need right now.

Any help or pointers would be appreciated.


Multiple Cameras / Depth Only / Ipad Air / No Video Background

August 18, 2014 - 1:37pm #4

I've had a similar problem on iPad Air,


Resolved by having all of my cameras set to depths higher than that of the AR camera, having AR camera's culling flags set to "nothing", and using a second camera parented to the AR camera to render the augment.

Seems like when built to iPad, the video stream gets rendered directly to the AR cam, causing the BG camera to be hidden or vice-versa.


If you try to go this route, remember to run secondaryCam.projectionMatrix = arCam.projectionMatrix in Update somewhere to match the FOV of the physical camera.

Multiple Cameras / Depth Only / Ipad Air / No Video Background

August 7, 2014 - 9:10am #3

Got a similar problem, several cameras (one for GUI one for a clipping effect and one for the AR).
Works fine with my webcam but on any device I deploy to - background stays black, small video image in the upper right corner.
Translating the videoimage to fit fullscreen affects the augmentation..

thanks for any help

Multiple Cameras / Depth Only / Ipad Air / No Video Background

August 4, 2014 - 11:10am #2

Sorry for bumping this, but there are a lot of Sticky Posts on Page 1 and I really need help with this one.

Log in or register to post comments