Hi guys,
i am trying to apply 2d-effects, such as stylize- and blur-effects, to only some 3d-objects of a scene. I hope this is not too confusing. I know 2d effects only work on 2d-objects, like a composition. Because there are other 3d-objects in the same scene, that i dont want to apply these effects to i cant just put the whole scene in one compo and apply the effects. Instead i tried putting them in two separate compos. But then of course, one 2d layer is always on top of the other.
So i thought it should be possible to mask one of these compos with a combination of depth maps of both compos, to have it only be visible, where it is actually in the foreground.
For testing purposes i put a 3d plane with a character-image in compo "characters" so it intersecs a cube that is in compo "world".
In this example no mask is active, so the "character"-compo always appears on top of the "world"-compo.
Then i tried to blend depth masks, so where the depth map of "characters" is lighter (further away) than the depth map of "world" the resulting mask should be black, everywhere else the mask should be white.
But i couldn't find a combination of fitting blending modes.
The mask i want to achieve would look something like this:
Maybe someone has an idea, how this might work. Thanks for your help!
Best regards!