Skip to main content
Participant
November 2, 2021
Answered

Help Appling Solid to Backside of Layer

  • November 2, 2021
  • 1 reply
  • 193 views

I used to be able to add a solid color to the backside of a layer but for some reason this set of instructions is not working. Anyone have an idea why? 

 

Apply Fill to your layer. Then apply CC Composite to the layer and apply this expression to the CC Compsites Effect Opacity parameter:

if (toCompVec([0, 0, 1])[2] > 0 ) 100 else 0

This topic has been closed for replies.
Correct answer Roland Kahlenberg

Just noticed you are missing Curly Braces, which is required for AE's Javascript Expression Engine when the expression is entirely on a single line. 

The following should work - 
if (toCompVec([0, 0, 1])[2] > 0 ) {100} else {0}

1 reply

Roland Kahlenberg
Roland KahlenbergCorrect answer
Legend
November 2, 2021

Just noticed you are missing Curly Braces, which is required for AE's Javascript Expression Engine when the expression is entirely on a single line. 

The following should work - 
if (toCompVec([0, 0, 1])[2] > 0 ) {100} else {0}

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
chrisc59063722
Participant
November 2, 2021

That did it thanks!