How to mask an object inside of another object?

Hello, so basically I have a semi transparent object (A) of any shape (cube, sphere, etc) but I want another object (B) again, of any shape to be masked within A so I can scale it accordingly but not see any of B outside of A.

All of the objects may or may not have textures as well.


Is this possible and if so, how? And what are the compromises, if any.


Examples got you covered - using MaskPass postprocessing you can clip the next rendering pass to a stencil defined by a separate Scene (if you use other postprocessing remember to also unclip the mask after applying it.)

1 Like

Thanks man. I appreciate the fast response. You’re awesome!