ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

wiggle control

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dave Hiebert
wiggle control
on Jun 6, 2012 at 7:40:40 pm

I have a null object with a light emitter parented to it. I have a wiggle expression on the null for position ( wiggle(.2,450) ) which allows this light emitter to fly around the screen smoothly and randomly which is exactly what I want. There are times when the emitter leaves the screen completely, although only for a second or so at most before returning. Is there some way to create an area that the emitter will stay within?

I tried to search for this but am not sure how to put it into a few keywords.


Return to posts index

Dan Fredley
Re: wiggle control
on Jun 6, 2012 at 10:35:36 pm

The trick is to separate the wiggle dimensions.

Assuming that your 3D null's original position is at the center of the comp and the light's z depth stays at 0 you can use this:
x = wiggle(.2, thisComp.width/2)[0];
y = wiggle(.2, thisComp.height/2)[1];
z = 0;
[x,y,z]

Once you start going back and forth in Z-space it's a lot harder to limit the movement to comp space. Maybe somebody else has an expression for that.

You can play around with Z wiggle values to see if it gives you what you want:
x = wiggle(.2, thisComp.width/2)[0];
y = wiggle(.2, thisComp.height/2)[1];
z = wiggle(.2, 450)[2];
[x,y,z]


Return to posts index

Dave Hiebert
Re: wiggle control
on Jun 7, 2012 at 4:23:42 pm

very cool....thanks


Return to posts index

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