• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bringing a layer forward via expression in After Effects

Explorer ,
May 23, 2023 May 23, 2023

Copy link to clipboard

Copied

I'm relatively new to After Effects, but I've searched quite a bit and can't figure this out.

 

I have two solids right next to each other.  At certain points in the timeline, I'll increase the scale of one or the other for emphasis - making it pop out for a second and then return to normal size.

 

This works just fine for the solid layer on top, but the lower layer gets partially blocked.  I thought it would be trivial to move the lower layer up when needed via expressions, but I can't find a way to do that.

TOPICS
Expressions

Views

312

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , May 23, 2023 May 23, 2023

That's just how 2D layers work in After Effects. Moving a layer on top of another in the layer stack can't be done by expressions, only scrpiting, but in your case that wouldn't work anyway since it needs to switch back and forth.

 

Easiest fix is make them 3D layers instead. Or you could have a Background and Foreground versions of one of the layers and toggle on and off their opacity as needed.

Votes

Translate

Translate
Community Expert , May 23, 2023 May 23, 2023

You can only use expressions on properties that you can keyframe. Layer Order is not one of those properties. 

 

If you make the layers 3D and animate the Z position of the layer, you want to move in front of the other. Moving a layer closer to the camera has the same effect as increasing the scale, but the speed of the transformation is more natural.

 

If you want to stick with 2D, you could add animated masks or use a copy of one of the animated layers as a track matte for the other.

Votes

Translate

Translate
Community Expert ,
May 23, 2023 May 23, 2023

Copy link to clipboard

Copied

That's just how 2D layers work in After Effects. Moving a layer on top of another in the layer stack can't be done by expressions, only scrpiting, but in your case that wouldn't work anyway since it needs to switch back and forth.

 

Easiest fix is make them 3D layers instead. Or you could have a Background and Foreground versions of one of the layers and toggle on and off their opacity as needed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2023 May 23, 2023

Copy link to clipboard

Copied

You can only use expressions on properties that you can keyframe. Layer Order is not one of those properties. 

 

If you make the layers 3D and animate the Z position of the layer, you want to move in front of the other. Moving a layer closer to the camera has the same effect as increasing the scale, but the speed of the transformation is more natural.

 

If you want to stick with 2D, you could add animated masks or use a copy of one of the animated layers as a track matte for the other.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 23, 2023 May 23, 2023

Copy link to clipboard

Copied

LATEST

Thank you, both.  That makes perfect sense.  For a quick fix I'll probably just duplicate the layer and change its opacity when I need to animate, but it sound like 3D is the "right" way to manage this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines