So I have a scene. I want to slide out a text, for example, as if it was hiding behind an invisible wall. I know that you can achieve this effect with a boolean modifier... but I can't use it in this case. Plus to make it happen with a text you need to convert it into a mesh first - no good.

How to make so that when an object, partially or completely, is inside another object that this makes that part invisible? (The other/masking object is completely invisible all the time, of course)

I sense that it has something to do with a clever Light Path and Mix Shader nodes arrangement.

(Made with a boolean modifier) enter image description here

To achieve this with nodes... Something along the lines of this? enter image description here

How it looks in the viewport: enter image description here


1 Answer 1





For Masking Object - cube in this example just use Transparent BSDF with pure white color.

For object being masked - text - use mix between chosen shader (Diffuse here) and Transparent by Light Path > Transparent Depth:


Of course object being masked should be inside masking object.


  • $\begingroup$ Exactly what I was looking for. Thank you. $\endgroup$ Jan 24, 2018 at 16:22
  • $\begingroup$ Pretty clever solution, nice answer $\endgroup$ Jan 24, 2018 at 17:19
  • $\begingroup$ Can i have a graduated edge or fall off to the mask? $\endgroup$
    – 3pointedit
    Jan 24, 2018 at 23:00
  • $\begingroup$ You could also do this with render layers using mask layers. $\endgroup$
    – Jeff Lange
    Jan 24, 2018 at 23:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .