Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions addressing each point position in a polystar

  • Sebastian Melmott

    June 14, 2010 at 8:19 am

    FIlip – sorry I meant to mention that I did modify the 3D Orbit expression (last 2 lines) to make it rotate in an X, Y orbit and not in Z space…

    ___________________________________________________________________
    Radius = effect(“Radius”)(“Slider”);
    Speed = effect(“Speed”)(“Slider”);
    RotationOffset = effect(“Rotation Offset”)(“Angle”);

    //

    center = [this_comp.width/2,this_comp.height/2,0];
    radius = 200;
    angle = time * Speed RotationOffset;
    x = Radius * Math.cos(degreesToRadians(angle));
    y = Radius * Math.sin(degreesToRadians(angle));
    add(center, [x,y,]);
    ___________________________________________________________________

    Thanks,

    Paul

    Moooooooo….!

  • Filip Vandueren

    June 16, 2010 at 12:10 am

    Okay,

    this will be a lot easier if the expression can access the “angle” part of your orbit expression directly, not it’s position.
    So I suggest you copy the same expression to an expression-control-slider, but without the three last lines. (Last line should be the angle=…)

    Here’s the expression you add to the light intensity of each spotlight:

    thisPoint=1;
    polystar=thisComp.layer("Shape Layer 1").content("Polystar 1").content("Polystar Path 1");

    pts=polystar.points;
    rot=polystar.rotation;
    rds=polystar.outerRadius

    a=((360*(thisPoint/pts))+rot+270)%360;

    orbit=thisComp.layer("orbit").effect("ANGLE")("Slider"); // pickwhip this to your angle

    if ((360+orbit-a)%720 < 360) { // lights off 0; } else { // lights on value; }

    Now there's a few things you can do to "vary the intensity of the lights". It depends on what you mean.
    Right now lights on meansd take the current value, so you can set each light to a different value by just scrubbing it's value in the imeline or even by setting keyframes.
    You can also substitute the "value" with "wiggle(1,50)" to get lights that are shimmering/flickering.

  • Sebastian Melmott

    June 16, 2010 at 7:03 am

    thank you – I shall try it ..!!!!

    Moooooooo….!

  • Sebastian Melmott

    June 16, 2010 at 12:15 pm

    Question Filip:

    Shouldn’t
    a=((360*(thisPoint/pts))+rot+270)%360;
    …really be:
    a=((360*(thisPoint/pts))+rot+720)%360; …..?

    Also in:
    orbit=thisComp.layer(“orbit”).effect(“ANGLE”)(“Slider”);
    // pickwhip this to your angle

    …How do I pickwhip a part of an expression to the slider I inserted ..? I thought you could only pickwhip from and to complete values ..? ( Sorry for the silly question ..)

    Paul

    Moooooooo….!

  • Sebastian Melmott

    June 22, 2010 at 10:18 am

    Sorry Filip – can I “back up ” a bit here..?
    I am getting a little confused on how to calculate the angle of the circulating Null1 layer –
    Would you be kind enough to walk me through the steps necessary to set up the required code with an expression “slider”..?
    And should the expression not be slider control “Angle” as opposed to “Slider” ..?

    thank you in advance,

    Paul

    Moooooooo….!

Page 2 of 2

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