View Full Version : Masking zones to hide a object behind ?

10 October 2005, 02:29 PM
Hi everyone !

I have a simple but for me hard to solve problem !

I have made a video of a street with trashcans and other objects in it. I want a man walk down that street. The man is in a seperate video (wich I make with color keying).
My problem is, that the man seems to walk "over" the trashcans but those should be in front of him so he can walk behind it.

My question in general is: Can I mask zones in AfterFX to hide objects behind it ?

Like in this quick drawing:

You can also donwload a video that shows my problem :-)
(use rightclick to save!)

I hope this is possible at alle in AfterFX. I have searched the net and a lot of tutorials, but I found nothing at all.

If AfterFX is not capable of this feature... how can I solve my problem ?

Thanks !

10 October 2005, 03:05 PM
You'll need to load your background video in 2 layers. If you're doing any processing on it you'll want to do that in a seperate composition, and the load in that comp into the main comp twice.
Put the 2 background layers on top and bottom, with you're guy in the middle layer.
Use the pen tool on the top layer to make only the foreground objects visible. You won't see a difference until the guy walks by, then he should pass behind the foreground objects as expected.
If your background footage is from a moving camera it gets more tricky and you'll need to automate the pen tool to follow the foreground objects.

Hope this helps!

10 October 2005, 03:19 PM
Thank you Kevin !
As I thought... a simpel solution for my problem ! :-)

But... to you know any good tutorials for the automation of the pen tool ?
My background scene is quit complex so this would be useful.

But I wonder if there is no way to to this with masks?
I know this function from various effect tools I have used in the past.

Best wishes !

10 October 2005, 03:25 PM
Do the same like told above, only use the mask tool instead of the pen tool.
If you are referring to mattes, then grab a screenshot, block it with black and white in PS or simliar, import it into AE and use it as a Luma Matte above your foreground layer.

10 October 2005, 03:28 PM
He beat me to it! I've got an example of this here (
It's a cartoon I did. The characters, background, and sky were all done in seperate programs, and then composited in after effects.

CGTalk Moderation
10 October 2005, 03:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.