Adobe After Effects Forum
3d masking when in different planes
3d masking when in different planes
by Gareth Little on Jan 14, 2020 at 1:17:44 am

I've hit a bit of a wall in trying to work this out myself. I have a simple 3d scene of a character sat behind a desk. The desk top is at 90° to the character. There are two effects I'd like to achieve in this scene. I've had limited success on individual static shots, but I have several camera angle changes and the whole thing falls apart scene by scene.

I'd like to have the character reflected on the desktop.
The characters arms (separate layer) should show above the desk

When it was 2d, there were no problems, but I'm not sure how to have the arms (at 0°) show through the desk (at 90°), specifically the bottom of the arms sometimes go below the level of the desk.

As for the reflection, the tracking mattes don't seem to have the desired effect, I'm guessing because the character copy is again 90° to the table. Is this setup just a recipe for disaster? I put the reflection onto the same plane as the table but that reflection looks unnatural, it should go straight down instead of jutting out with the table. Here is a drawing of the scene from the side, front and 3d. I trying to have the red arms always show above the black table and the blue reflection be masked at the boundaries of the table.

I'd greatly appreciate any pointers anyone can give me,


Re: 3d masking when in different planes
by Cassius Marques on Jan 14, 2020 at 8:28:35 pm

That can get complicated, I know.

If the mattes aren't working you could try two things. Use masks or a better option that I constantly use: Mattes!

...The secret is to use them on split copies of uncollapsed 2d compositions. Meaning you would have a table composition only with the duplicates of your camera and table layers. This would be the matte for the reflection (which would in turn be a single composition of just the inverted 3d character with a copy of the cam and so on).

If you lack the knowledge that there is a copy with property links shortcut. Structuring the project in that way can seem very complicated. But once you get the feel of it. Its pretty robust and serves many purposes for compositing.

Cassius Marques

Re: 3d masking when in different planes
by Gareth Little on Jan 15, 2020 at 10:57:52 pm

Thanks so much for your help. Your advice worked perfectly for getting the arms to show above the desk.

When it comes to the reflection, if I'm understanding you right I need a separate composition with just the inverted character (2d) and a copy of the camera. Then I would put this comp into my main timeline. After this I'm a bit confused as to how I then use this as the matte. Currently the layers are:

desk matte (alpha inv arms)

No matter how I arrange it, I can't seem to successfully add the reflection into the mix. If the camera angle changes, do I need separate comps each time this happens with the reflection and camera copy?

Thanks again for your help,


Re: 3d masking when in different planes
by Cassius Marques on Jan 16, 2020 at 6:07:50 pm

Without actually seeing whats wrong it really is just a guess but I'd think it your stack would be something like:

comp with subject (so it always shows above everything)
comp with table used as matte for
comp with reflected subject
comp with table

The thing is your comp with the table used as a matte for the reflection should really just be a flat color of the table's reflective area, so you can use its alpha to mask the reflection. This compositions I'm advising you to use don't necessarily need to be an exact copy of the layers you have. They just need to inherit their transformations so they match.

For example I usually tint things black and white and use as luma mattes to control my effects.

Cassius Marques