How to display images from 2 or more cameras?

Hi all!

I’ll try to create scene where placed 2 cameras and I want to display in one window images from this two cameras. It’s possible? Anybody please say me it’s possible or not? :slight_smile:

I try to place 2 main camera on scene on some position. And when I run scene I’ll see render from one camera, but I want see render from 2 camera simultaneously.

It’s possible?

Thanks!

Very doable, but you’ll need to clarify what it is you want.

If you want to show them side by side, then you can use Normalized View Port Rect in the Inspector and have one camera at (0,0,0.5,1) and the second one at (0.5,0,0.5,1)

If you want them stacked on top of each other, you will need to choose A specific Camera render order using Depth, and then make sure the second camera doesn’t clear the color buffer (Set the Clear Flags to Depth Only or Don’t Clear).

Thanks!

I want to see the result picture that contain renders from 2 cameras (yes stacked on top).

There are a number of effects you could get, but the simplest is Probably similar to the GUI camera.

The settings for that would be:
Camera1:
Depth -1
Clear Flags: Skybox or Solid Color

Camera2:
Depth 0
Clear Flags: Depth Only

This will render the entirety of the second camera over top of the first. You can use the Culling Mask on each Camera and the Layer in the upper right of each GameObject to specify which objects to render to which camera.

Should you be rendering 3D geometry on the second camera, you will no get Depth culling, and so regardless of the distance from the camera, the second cameras geometry will always get drawn over the first. To make it so the second camera can be culled by the first, set the second camera’s Clear Flags to Don’t Clear.

Tinker with it enough you can get a portal effect like this:
http://www.tomabaird.com/Prototypes/Portal.html

It’s the same Principle with many more steps.