Forums » CentiLeo for Cinema 4D
Pages: 1
How to mask out objects using a plane to hide them?
I wish to have dynamics play out and at times to have some objects disappear behind other objects for compositing.
For example, I have a 3D ball be thrown over a fence from a 2D video. I would usually place a plane the same size and shape of the fence that would only hide objects that pass behind it when obscured from the camera view.

I found a way to almost do this with centileo, however, I get some odd reflection from nearby objects I cannot get rid of.
I have a plane I made into a shadow catcher to block this tank, as an example, and I want to hide the tank (or any object that is also behind that plane). I get my result except look at the soldier in front of the plane; he is casting a reflection I cannot get rid of. It is not a reflection property on the material (I removed that and it did nothing), and changing any setting under the diffuse does not remove the reflection.
Any ideas?

I would normally apply a shadow catcher to a plane like this and use a compositing tag to hide the object from camera.
I tried having no HDR Sky to light the scene and there is no reflection anymore, and the object is invisible behind the plane. So it is something with the HDR.

by going to the HDR sky tag and putting matte shadow weight to 0.01 (0.00 removes the plane and makes it totally black but not invisible) I am able to get the plane to be invisible as well as any object behind it.
There is still a small outline of the plane in AE, but I can maybe manage. A tag to uncheck and makes things hidden from camera would be nice in the future.
Edited: ssjenforcer - Nov 21, 2021 23:03
Administrator  Posts: 774
Nov 23, 2021 11:46
Hi ssjenforcer, it looks like you are doing smart experiments with shadow catcher! :)
Actually the cast from soldier shadow catcher plane behind him is a shadow. And it looks like the light source is emitting from the direction close to camera position.
To change this I suggest to add the second Sky object + CentiLeo Environment tag to the scene without HDR image file but just with a white color.
This second Sky object should be placed in the scene next to or as a child to the main Sky object. This second Sky object is placed as the override to Shadow Catcher / Matte of the first Sky object. The override settings are placed in CentiLeo Enviroment tags. The HDR file and direction of the first main Sky object may be not changed and lighting of objects (diffuse / reflection / sss, etc) will not be changed when Shadow Catcher / Matte slot is overrided by the second Sky. This matte ovveride will only affect the shadows casted to shadow catcher plane by the Sky.

Actually CentiLeo is currently constructed so that all scene objects and light sources influence on each other in a physically based way with a few overrides. Making the masks to exclude objects from camera view, making light source include/exclude lists and/or masks is thing that we need and of course it will be implemented into our engine too. Fortunatelly, this is not a very complex feature/
Pages: 1
Users browsing this topic