Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Adding this wiggle expression to position

  • Adding this wiggle expression to position

    Posted by Matthew Russell on September 27, 2018 at 7:00 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

    Matthew Russell replied 7 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 27, 2018 at 7:27 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

  • Matthew Russell

    September 27, 2018 at 7:46 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!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy