Can you make mesh invisible from certain angles?

So I am building a scene to render as a diorama. There’s a building on a ground plane, with a basement entrance. The only problem is, you can see the basement through the backfaces when you look at the scene from the side.

If it’s at all possible, I’d like the basement to not be visible at all from this angle, as it’s my main camera angle. I was curious if it’s possible to make this part of the mesh invisible when viewed THROUGH the backfaces? Either through material work or even scripting if necessary. I want to avoid just covering it up because I like my composition… Thoughts?

You need to create a mask within the material that can control the visibility. The pixels do not know arbitrary things like if it’s being viewed through a different backface.


This node setup will create a circular mask you can use to control the opacity of a masked material. Anything inside the radius would be visible, anything outside would be invisible.


Then, combine that with a world position mask to make anything above ground always visible fully opaque.

Combine the masks together (ie with the max node), and everything above ground, and/or within the circle will be visible.

The problem area can be defined as neither above the height threshold, nor within the circle and so it can be masked out.