Replace the camera's depth field view with another camera's view ?
Hello everyone,
I hope I don't post a doublon question but i didn't find an exact answer for it, so here I am :
I would like to know if it's possible to simply replace the depth field view of a camera (the Z buffer) with his "Clear mask" set as "Depth only" or "Don't clear" with the view of another camera.
In others words, for example, I have two cameras :
Let' say that the blue and red objects are at the same distance from their camera.
Even if I set the camera 2 with a lower Depth, I will see the blue object inside the red one (because of the distance from their camera), i don't understand why.
The result I'm looking for, is the "grey" in the camera 1 (because it's set as Depth Only, so the skybox is not rendered) is replaced by the view the camera 2 so : I get the reb object and the skybox as an immobile background even when the camera 1 or the blue object moves.
Thanks you for your help :)
Hello! If you set the depth of the camera 2 lower to the camera 1, you will get the image of the camera 1 rendered on top of the camera 2. So the engine renders the camera 2's image and on top of that it renders the camera 1's image. this means that you will see the blue object. In your example given that these objects are spheres and the blue sphere is a bit smaller. Rendering the camera 2 it will give you the skybox and the red sphere as a circle. After rendering the camera 1 it will give you the blue sphere as a blue circle and the rest of the image will be the same as it was in the camera 2.