Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
Magua
Topic Author
Posts: 8
Joined: Sat Feb 21, 2009 11:08 pm

Wiggle on Top of a Wiggle... Starting From Initial Position

Tue Jan 21, 2014 4:19 pm

Hi All,
So I've been able to piece part of this together, but there's a portion that eludes me and I'm wondering if others could help out. Basically, I'm looking to add a large drifting motion to a shape layer and then on top of that, have it "vibrate", but all taking place within the Position property (as I'm aware that I could simply add say "wiggle(.2,100)" to the Position property, and "wiggle(35,10)" to the Anchor property...). So far, I came up with this:

(wiggle(.2,100)) - wiggle(35,-10) + wiggle(35,10)


This more or less offset the offset and placed the layer roughly back in the same position it started in and accomplishes the wiggle on top of a wiggle effect I'm looking for. However, I'm looking to additionally have the layer start the wiggle from the initial starting position... say 960,540.... Dan was able to provide me the expression in achieving this second portion in another post, by providing the following:

freq = .2;
amp = 100;
wiggle(freq,amp) - wiggle(freq,amp,1,.5,inPoint) + value


I thought once I had that, I would be able to figure out a way to combine my expression and the one he provided to achieve what I'm looking for, but I've not been able to figure it out... does anyone have any ideas how to do this? I tried the following, and while it's close visually, it doesn't work:

freq = .2;
amp = 100;
ffreq = 35;
famp = 10;
(wiggle(freq,amp) - wiggle(freq,amp,1,.5,inPoint) + value)
+ wiggle(ffreq,famp) - wiggle(ffreq,famp,1,.5,inPoint) + value
- wiggle(ffreq,-famp) - wiggle(ffreq,-famp,1,.5,inPoint) + value


I'm a relative beginner when it comes to expressions work, so thanks for any help.

Cheers,
Magua
 
Paul Tuersley
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Re: Wiggle on Top of a Wiggle... Starting From Initial Posit

Wed Jan 22, 2014 1:21 am

The main problem with your expression is that you're adding "value" three times. "value" represents the pre-expression value of the property. Each of the pairs of wiggles are cancelling themselves out on frame 1 to equal [0,0] so then you just need to add "value" once to offset it back to the original position.

In case you don't understand what inPoint is doing in the expression, that part of the wiggle method specifies time. By default it is the comp (or layer?) time, so a constantly changing value. By specifying "inPoint" this is what cancels out the value on the first frame. It's like saying:
"wiggle by constantly changing amount - the wiggle value used on the layer inPoint frame"

freq = .2;
amp = 100;
ffreq = 35;
famp = 10;
wiggle(freq,amp) - wiggle(freq,amp,1,.5,inPoint) + wiggle(ffreq,famp) - wiggle(ffreq,famp,1,.5,inPoint) + wiggle(ffreq,-famp) - wiggle(ffreq,-famp,1,.5,inPoint) + value;
 
Magua
Topic Author
Posts: 8
Joined: Sat Feb 21, 2009 11:08 pm

Re: Wiggle on Top of a Wiggle... Starting From Initial Posit

Wed Jan 22, 2014 11:39 am

Ah, got it - thanks Paul. What you're saying about the value makes sense now and thanks for clarifying the time parameter. I plugged your code into the comp and while it worked for keeping the initial position intact, it didn't add the "vibration" wiggle on top of the larger "drifting" wiggle. I was able to take what you guided me on, however, and came up with the following and it now works great:

freq = .2;
amp = 250;
ffreq = 35;
famp = 10;
(wiggle(freq,amp) - wiggle(freq,amp,1,.5,inPoint))
+ wiggle(ffreq,famp) - wiggle(ffreq,famp,1,.5,inPoint) +value;


Thanks so much for the help as it's greatly appreciated!

Cheers

Who is online

Users browsing this forum: No registered users and 2 guests