Log in or register to post comments

Mirror Video Background Does nothing

August 2, 2018 - 11:59am #1

I'm making a project using Vuforia that actually involves a mirror and all of my problems would be fixed if I could just mirror the camera output. I've read a lot of posts here including https://developer.vuforia.com/forum/faq/unity-how-select-camera-and-mirroring, however when I turn Mirror video background to ON, nothing changes. Am I just not understanding this feature and is there any way to just flip the camera?

Many thanks in advance!

Mirror Video Background Does nothing

June 24, 2019 - 2:55pm #10

So after a bit of debugging I have found that the post processing layer on the camera overrides the mirror camera. After disable post processing stack this worked better.

Mirror Video Background Does nothing

August 6, 2018 - 10:16am #9

another thing to try is rotating the background plane

void Update () { GameObject.Find("BackgroundPlane").transform.localEulerAngles= new Vector3(-90,-180,0); }

 

Mirror Video Background Does nothing

August 5, 2018 - 5:03pm #8

What about setting a layer on your AR model. adding an additional camera as a child of ARcamera, and cull everything but the new layer and set also to a negative scale to flip it back.  Youll also need to have a setup script that matches the ARcamera FOV and such to new camera.  Complicated, but something like this might work for you, i have not tested though.

Mirror Video Background Does nothing

August 5, 2018 - 12:33pm #7

Thanks!! This was very helpful and did work... partially. While the camera was flipped I noticed that the augmented reality things were flipped as well. Usually as you move the camera around the augmented reality objects stay in the same place (relative to the image moves around the phone though), however, when it's flipped the AR camera is in reversed if you move the camera around the AR components just fly everywhere. I thought that maybe this could be what mirror video background helps with, but it still didn't do anything lol. If you don't get the problem maybe make a quick AR project and watch the AR things fly around. I'll keep thinking of a way to get around this problem

Mirror Video Background Does nothing

August 3, 2018 - 11:27am #6

Changing ARCamera x scale to negative 1 in editor seemed to work for me.  Not sure if it helps or not, but the camera image does appear flipped.

Mirror Video Background Does nothing

August 3, 2018 - 9:11am #5

I have observed the same ting although, I've tried getting the transform. And I can get the transform fine, but I can't edit it at runtime.

Mirror Video Background Does nothing

August 3, 2018 - 8:13am #4

What about doing a Gameobject.Find("BackgroundPlane") and giving it a negative x scale?  Seems to work in the editor, haven't tried on device.

Or mirror whole camera? there's a few answers on this page: https://answers.unity.com/questions/20337/flipmirror-camera.html

 

 

Mirror Video Background Does nothing

August 3, 2018 - 6:56am #3

Did you just modify the shader that vuforia already had in there? 

Mirror Video Background Does nothing

August 3, 2018 - 6:40am #2

I was wondering this for a long time, too. I always thought that it would mirror the video background, but it just does - nothing. At least, nothing perceptible.

But I found out that you can manipulate the video image using a custom shader. You can find this setting in the Video Background section of Vuforia Configuration.

I used this to implement a shader that allows me to dim the video background. Unfortunately, my shader skills don't go that far that I would be able to paste code for mirroring the image instead. But maybe you can do this yourself?

Log in or register to post comments