ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How can I reverse layer render order

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
russell birkett
How can I reverse layer render order
on May 23, 2014 at 10:39:37 am

Hi
I have imported a layered photoshop file into After effects. Using a delay slider and expressions, I have the layers' opacity changing from 0 through to 100%. All is well. However the front-most layers of the image are rendering first whereas I actually want the back-most layers to render first with the front layers rending on top of them. I understood that if you select the layers (select from the bottom to the top) and paste them back in, then the order is reversed. The order is indeed reversed in the layer list, but the order in which they are rendered is unchanged. Could it have anything to do with the expression being used?

The expression is . . .

delay = thisComp.layer("Controls").effect("DelayAmt")("Slider");
d=delay*index;
t=time-d;
exp=thisComp.layer("Controls").effect("Opacity")("Slider").valueAtTime(t);
exp

Any thoughts gratefully received.
Russ


Return to posts index

George Goodman
Re: How can I reverse layer render order
on May 23, 2014 at 2:57:41 pm

My guess is that it has to do with your use of index and opacity.

So since you're using the index in your delay, it is determining the order in which the layers will come in. Since the index of 1 is the top most layer, it will come in first, but it will be on top of all the other layers.

"|_ (°_0) _|"

Sincerely,

George

http://www.vimeo.com/georgegoodman
http://www.linkedin.com/in/georgefranklingoodman


Return to posts index

russell birkett
Re: How can I reverse layer render order
on May 23, 2014 at 3:05:30 pm

Thanks for your reply George
OK, let me see if I have this right. Since AE normally draws the layers from the bottom of the list upwards, by using expressions am I over riding these defaults to draw from the top of the list downwards?
Regards
R


Return to posts index


Walter Soyka
Re: How can I reverse layer render order
on May 23, 2014 at 3:15:33 pm

[russell birkett] "OK, let me see if I have this right. Since AE normally draws the layers from the bottom of the list upwards, by using expressions am I over riding these defaults to draw from the top of the list downwards?"

The expressions do not and cannot change the compositing order. Stuff on upper 2D layers are always drawn over stuff on lower 2D layers.

What the expression controls is the timing of the layer -- when it fades in. With your original expression, upper layers receive less delay (assuming a positive delay slider value) than lower layers because their layer indices are lower.

Let's assume your delay slider is set to 0.5. The index of layer 1 is 1; its delay is delay*index, or 0.5 * 1 = 0.5. The index of layer 2 is 2; its delay is 0.5 * 2 = 1.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

George Goodman
Re: How can I reverse layer render order
on May 23, 2014 at 3:16:02 pm

Yes, so the top of the layer stack renders on top of anything below it.

Your expression uses the index of each layer to determine when it is going to come in. The very top layer's index is 1, so it's first, then the one below that is 2, so its second. So the way your expression reads, it's always going to render the top layers first.

And was just getting to an expression alteration, but looks like Walter just chimed in with a fix.

"|_ (°_0) _|"

Sincerely,

George

http://www.vimeo.com/georgegoodman
http://www.linkedin.com/in/georgefranklingoodman


Return to posts index

russell birkett
Re: How can I reverse layer render order
on May 23, 2014 at 3:36:50 pm

Thanks guys.
I'll go away and have a play. will let you know the outcome.
Cheers
Russ


Return to posts index


russell birkett
Re: How can I reverse layer render order
on May 23, 2014 at 4:15:36 pm

Excellent. That's sorted it. Many thanks again guys
Cheers
Russ


Return to posts index

Walter Soyka
Re: How can I reverse layer render order
on May 23, 2014 at 3:11:57 pm

[George Goodman] "So since you're using the index in your delay, it is determining the order in which the layers will come in. Since the index of 1 is the top most layer, it will come in first, but it will be on top of all the other layers."

Agreed.

You can "reverse" the index-based delay calculation by subtracting the index from the total number of elements being delayed.

Something like:
d=delay*(thisComp.numLayers-index+1);

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]