FORUMS: list search recent posts

Cross fade multiple layers using an adjustment layer with a slider control

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rens Wegerif
Cross fade multiple layers using an adjustment layer with a slider control
on Jul 7, 2014 at 11:45:00 am

Hello everybody,
Have been looking around over here, but just can't seem to find a satisfying code for the following:
I am trying some multiple camera editing in After Effects. The idea is to load in footage of three different camera angles in one compostion. The opacity of the layers is then parented to one adjustment layer's slider control.

What I want to achieve is that when the value of the slider is 1, the first layer is visible. When it then crosses over to 2, the second camera angle footage will gradualy become visible. And so on for the next.

I've found some code that makes it possible to switch between zero and 100, but is it also possible to gradually make this transition...?

Cheers,
Rens


Return to posts index

Dan Ebberts
Re: Cross fade multiple layers using an adjustment layer with a slider control
on Jul 7, 2014 at 2:15:15 pm

I think the simplest way would be to use something like this:

s = thisComp.layer("controls").effect("Slider Control")("Slider");
linear(s,index,index+1,100,0)

so layer 1 disappears as the slider goes from 1 to 2 (so it would be 50% visible at 1.5), layer 2 disappears as it goes from 2 to 3, etc.

The (much more complicated) alternative would be to have the slider value trigger an opacity animation when the slider reaches the layer's index number, if the simple version above doesn't meet your needs for some reason.

Dan



Return to posts index

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