render object on top of other objects even if it's behind something in 3d space

I want to make an animation which is a first person perspective with augmented reality. I need to have a triangle indicator above an object inside a room. I was just going to do a triangle image on a plane parented to the object then use track to constraint to keep it facing the camera. What I don’t know how to do is make it so say, the camera is outside the room in the hallway, I want the triangle to appear in front of the hallway wall.

I guess I could render the animation, then copy the camera and it’s animation to another layer, which just renders the triangle image, then composite them together. If there is another method without compositing, I would prefer to do that. Any ideas?


Without compositing it is not possible afaik. Put the triangle on separate layer, create new renderlayer for it and composite the two renderlayers together with other footage. No need to copy camera animation anywhere, active camera is used for all render layers. Render layers just control what is rendered and what is not.


I decided to have the planes with triangle indicators on a separate layer (not a renderlayer) and put the camera on both layers. Then I can render the scene once, save as pictures, and then switch to the second layer and render the augmented reality. Then I combine them in the Video Editing screen using Alpha Under for the Blend option. I like this approach better than compositing because it saves the real render and augmented reality render separately. This will allow me to make changes to the augmented reality render without redoing everything.

You are still doing it unnecessarily complicated. Create two render layers for your two elements. No need to duplicate camera, the layer where camera is is irrelevant, active camera will render anyway. For saving use exr multilayer format, this will save both renderlayers into one file which you can use in compositor to separate the elements again and do your magic. Or, if you want to save some other format than exr, in compositor, add two RenderLayer nodes for each render layer and a File Output node. Add two inputs to that, set the formats as you wish and connect RenderLayer nodes outputs to these inputs. This will save each RL as a separate sequence with specified format. After this use video editor or compositor to do the comp.