How can I make object visible when it intersects with a view of another obect?

I have invisible circle in front of colored square. I need to make it so when circle intersects with a view of a square (not with a square itself) it becomes visible (only that part of circle which already intersected view, the other is still invisible). How can I do so?

Pic 1 is setup I have.
Pic 2 is close to what I need to achieve.


You could create an invisible cubic boolean object that keep the intersection of your circular one.
Hope it helps

Thanks. I thought that it could be the only solution, but perhaps there is another and I just don’t know about it

You can also do this with compositing. Although the terminology differs between 2.7x and 2.8x, the essential concept will be the same:

Put all of the squares in one layer, and the circle in a second. Now, AlphaOver the circle layer, using the alpha-mask of the squares layer so that the circles will appear only where the squares are.

2 Likes