2 Cameras in Unity (2D+3D)

Hi to all!

I want to know if its possible to display 2 cameras (one with the Holoplay script) and one normal Camera, to display 2D and 3D content at the same time in the Looking Glass screen. I’ve tried doing it with the Culling Mask option of the camera and using Layers but as soon as i activate the Holoplay Camera, it hides the normal one.

Would be easier to use a Quilt? Can Quilts be supperposed laye-like if you have alpha in the picture?

Thank you to everyone in advance!

Hi @jmar95, do you want the 2D camera to render on a different screen or both on the Looking Glass? Unity doesn’t support two cameras rendering to the same window unless they only take part of the screen, which won’t work with Unity. What exactly are you trying to achieve? Is it perhaps a UI issue?

1 Like

Thanks for the response @alxdncn!!

Yes, i’m trying to render both cameras on the Looking Glass, the thing is that i have a plane that works as a road which if I render with Holoplay Camera it does not display well, because it has to move from back to front, even if i give it some angle the result isn’t very well.

My goal is to display some content on 3D and also some content on 2D . What i’ve done is make a Render Texture that displays the content of that 2D Camera, right now I successfully can display the content of the 2 cameras on the Looking glass display, but the rendering order is inversed, and i can’t modify the Canvas Render Mode (if you change it to other thing that isn’t Overlay, it does not display anymore). Any tip on displaying that content behind the Render of the Holoplay Camera?

If you set holoplay-capture->target-display to 1
And from a new camera the target-display to 2

Then you can choose in the top of the game window for display 2

1 Like

Hi @RichardS, if you set the “2D” camera to another display, then you can’t display the content of the two cameras in the Looking Glass display.

If you render to the same display, does setting a higher “depth” of the front camera give you the desired outcome?

Nope, it doesn’t do anything at all :cry:

Hi @jmar95, I’m not sure I completely understand the use case but I’d highly recommend using a canvas element (ie UI) rather than another camera rendering geometry to overlay 2D content on top of 3D content in the Looking Glass. You could also render what you have in your render texture for the 2D camera onto a quad. I would recommend one of these two approaches rather than trying to render two cameras onto the same screen.

Hope that helps!

The quad solution just worked perfectly!! Thank you! :heart_eyes:

1 Like