4
$\begingroup$

This question already has an answer here:

I want to use an object as a clipping mask for another object. So that the sound waves take on that wedge shape and can be animated as moving through the wedge shape, but of course you don't see the wedge, only the red sound waves.

wedge and sound waves objects

I need this to be a node setup, probably with ID Masks, Object passes, etc. and not with a boolean modifier as those are unpredictable.

I've done a lot of research and gotten very close but still can't quite figure it out!

$\endgroup$

marked as duplicate by Ray Mairlot, VRM, Leon Cheung, p2or, user7952 Feb 3 '15 at 17:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4
$\begingroup$

With a scene set up like your image, a wedge shape and the curve shape with an array modifier; I created the mask with the compositor.

I have a fully transparent material on the wedge, and the material pass set to 1 (object index pass would work here as well.) Do note that the wedge's top face has to be above the curve shape for the IndexOB or the IndexMA to give a usable mask.

In the compositor use the material, or object index pass as a mask by multiplying (a Mix node) it with the image's alpha (because the material index pass is set to one there is no need for a Id Mask node). Then take the black and white masked image from the mix node and use it as the image's alpha with a Set Alpha node. compositor nodes

Here is the result after using the IndexOB as a mask.
result

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.