Orthographic camera's child is not showing up in camera preview or game view

I’m trying to make my own GUI-System with an orthographic cam, separate from the perspective cam that displays the rest of the scene.
I followed the steps that @equalsequals mentioned in the answer to “Custom GUI System RenderTexture (Ortographic Cam) vs Perspective” but I’m running into a problem where I can’t see the object that the orthographic camera is supposed to show.

I created a simple project to test this, where the sphere is parented to the orthographic camera and in a separate TestLayer. I noticed that my Orthographic Camera preview is dark and and doesn’t show the sphere, but I know the orthocam or sphere is in the frustrum because the green outline appears in the frustrum when I select the sphere in the hierarchy.

These are my settings:
[9606-screen+shot+2013-04-01+at+11.58.07+pm.png|9606]
[9608-perspective+vs+orthographic+settings.png|9608]

@equalsequals Would you happen to know what the problem is? I believe I followed the steps you enumerated in your answer to ["Custom GUI System RenderTexture (Ortographic Cam) vs Perspective"][1] [1]: http://answers.unity3d.com/questions/156609/custom-gui-system-rendertexture-ortographic-cam-vs.html

1 Answer

1

Change your culling mask from testlayer to everything, or tag the sphere as testlayer.

I apologise, i meant changing its layer to testlayer. You also need to select the sphere to coorrectly change its layer, from your screenshot i see that you are selecting your camera.

Both the sphere and the orthocamera have layer set to TestLayer, but the sphere is still not showing up.

Hmm, try setting the orthographic camera's clear mode to Depth Only and change its depth so it renders on top of the other one.

Both of those settings already are in place, if you look at the screenshots posted in the question. Orthocam's clearflags is set to Depth Only, and Orthocam depth=1 > Perspectivecam depth of 0, so that Orthocam renders on top of the Perspectivecam

Perhaps you have configured the orthographic camera's view incorrectly, try turning the perspective camera off and see what the orthographic camera "sees". If the orthographic camera can see the object correctly, you can try rendering its render texture as GUI with a GUI.DrawTexture call. (Which is guaranteed to show on top of everything)