FORUMS: list search recent posts

3d Layers Pop up when a numerical value is getting close

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jeff Bobbington
3d Layers Pop up when a numerical value is getting close
on May 2, 2012 at 2:29:21 pm

Hey all,
I'm sure this will be an easy one for some of you..

I'm creating a scrolling gallery where the images rise closer to the camera, when it passes.
The camera flies to positions designated by a #NUMBER value (in the Sure Target 2 script). I want to control the image rise based on this #NUMBER value.
The images need to pop up when the camera is approaching from the last image. Kind of like a menu select screen or scrolling album gallery.

So, when the camera flies to image 4, #NUMBER is changing from 3.0 to 4.0.
I want the image to begin rising (by 900 on its Z Anchor Point) from #NUMBER=3, be fully raised by #NUMBER=4 and then return to zero by #NUMBER=5.

This will obviously need applying to the hundreds of image layers im working with. Each one represented by a different #NUMBER.

I'm not sure how to tell the layer that it needs to go from 0-900 in the space of #NUMBER=3 to #NUMBER=4, and then back down in the space of #NUMBER=4 to #NUMBER=5.

Any ideas?


Return to posts index


Dan Ebberts
Re: 3d Layers Pop up when a numerical value is getting close
on May 2, 2012 at 5:34:29 pm

I have no idea how to get access to the #NUMBER value, but once you have that, the expression should look like this:


num = #NUMBER; // I don't know what this is
if (num < 4)
z = ease (num,3,4,0,900)
else
z = ease(num,4,5,900,0);
value + [0,0,z]




Dan



Return to posts index

Jeff Bobbington
Re: 3d Layers Pop up when a numerical value is getting close
on May 3, 2012 at 3:45:31 pm

Hi Dan,

Firstly, many thanks for the reply, you're an inspiration to many AE'ers!
Keep up the great work in helping the community!

The expression worked great, so I replaced any values which were unique to that layers number, to a slider number to match the #NUMBER of that layer.
The result was as follows! So I could just paste it on each layer.

Would you happen to know where I can learn more about what expressions to use and when, most of the time I know what I need to do, just not the language!

num = thisComp.layer("Sure Target").effect("Sure Target")(18);

if (num &lt; effect("Slider Control")(1))

z = ease (num,effect("Slider Control")(1)-1,effect("Slider Control")(1),0,900)

else

z = ease(num,effect("Slider Control")(1),effect("Slider Control")(1)+1,900,0);

value + [0,0,z]


Return to posts index



Darby Edelen
Re: 3d Layers Pop up when a numerical value is getting close
on May 5, 2012 at 5:45:26 am

[Jeff Bobbington] "The expression worked great, so I replaced any values which were unique to that layers number, to a slider number to match the #NUMBER of that layer."

If the #NUMBER of the layer has a predictable relationship to the index of that layer then you could automate this in the expression.

index returns the index of the layer as seen in the timeline.

Darby Edelen


Return to posts index

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