ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Adding this wiggle expression to position

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matthew Russell
Adding this wiggle expression to position
on Sep 27, 2018 at 7:00:31 pm

I'm fairly certain this is a simple answer, but I'm having trouble with this expression.

Ctrl = thisComp.layer("Light Wiggle Controller");
WiggleControl = seedRandom(1000,true);
wiggle(Ctrl.effect("Frequency")("Slider"),Ctrl.effect("Magnitude")("Slider"),1,.5,time - (Ctrl.effect("Time offset")("Slider")*index));
Path = Ctrl.transform.position;

Path + WiggleControl


I get this error.
"After Effects warning: Expression Disabled. Error at line 6 in property 'Position' of layer 9 ('Stardust 1') in comp 'Color_Ribbons_v06'. Undefined value in expression (could be an out of array subscript?)."


What I'm trying to do
I have several Lights in my scene driving a particle spline emitter using Stardust from Superluminal. They form a "C" shape in 3d space and currently I have this wiggle expression to each light to give it an adjustable Magnitude, Frequency and Time offset. Based on the same wiggle seed. This works at the moment.

seedRandom(1000,true);
wiggle(thisComp.layer("Light Wiggle Controller").effect("Frequency")("Slider"),thisComp.layer("Light Wiggle Controller").effect("Magnitude")("Slider"),1,.5,time - (thisComp.layer("Light Wiggle Controller").effect("Time offset")("Slider")*index));


These 9 lights should follow the same motion path. Normally I'd just parent this, but the parenting function doesn't translate the motion data to help affect the particle's velocity, inertia, etc. It just moves the system as whole as if it were precomped.
So my hopes are that I can connect them to the null's position in order to affect the atrribute of the particle system. While holding its shape and keeping this wiggle active. I'd also be able to change the entire motion path a single time instead of many times over after duplicating this comp anoth 6 times.

I hope this makes sense, and I attached an image for reference.
Thanks!

12751_stardustsplineemitter.png.zip

Ctrl = thisComp.layer("Light Wiggle Controller");
WiggleControl = seedRandom(1000,true);
wiggle(Ctrl.effect("Frequency")("Slider"),Ctrl.effect("Magnitude")("Slider"),1,.5,time - (Ctrl.effect("Time offset")("Slider")*index));
Path = Ctrl.transform.position;

Path + WiggleControl


Return to posts index

Dan Ebberts
Re: Adding this wiggle expression to position
on Sep 27, 2018 at 7:27:19 pm

I haven't tested this, but see if it helps:

Ctrl = thisComp.layer("Light Wiggle Controller");
seedRandom(1000,true);
w = wiggle(Ctrl.effect("Frequency")("Slider"),Ctrl.effect("Magnitude")("Slider"),1,.5,time - (Ctrl.effect("Time offset")("Slider")*index));
Path = Ctrl.transform.position;

Path + w - value;

Dan



Return to posts index

Matthew Russell
Re: Adding this wiggle expression to position
on Sep 27, 2018 at 7:46:40 pm

This worked perfectly!
It also worked to give my particles inertia!

Thanks a bunch Dan!

Also I use your alpha triggers animation expression all the time! Great stuff!


Return to posts index

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