Forum Replies Created

Page 979 of 1081
  • Dan Ebberts

    April 12, 2007 at 1:58 am in reply to: Syncing Heartbeat with Glow

    In general, you would convert the audio to keyframes, then link the value of glow parameters to the keyframes via expressions. You might need to scale the keyframe values and you might want to add them to the existing values of your parameters. It all depends on what you’re trying to do.

    If you need help with the specifics, please post more details about the relationship you want to establish between the audio and the glow parameters.

    Dan

  • Dan Ebberts

    April 12, 2007 at 1:51 am in reply to: changing time elapsed based on camera angle

    Assuming that you are rotating the camera on its y axis, your time remapping expression will look something like this:

    camera_angle = thisComp.layer(“Camera 1”).transform.yRotation;
    (Math.floor(Math.abs(camera_angle%360 + 360)/90)%4)*thisComp.frameDuration

    If you have it set up so your camera is the child of a null positioned at the center of the scene and you are rotating the null on its y axis, the expression should look like this:

    camera_angle = thisComp.layer(“Null 1”).transform.yRotation;
    (Math.floor(Math.abs(camera_angle%360 + 360)/90)%4)*thisComp.frameDuration

    Dan

  • Assuming you used Convert Audio to Keyframes, you probably want something like this:

    mult = 0.5;
    value + [0,thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”)*mult]

    Adjust the value of “mult” to set the magnitude of downward movement. Change it to a negative number to generate upward movement.

    Dan

  • Dan Ebberts

    April 10, 2007 at 8:34 pm in reply to: Second Thing…

    Something like this should work:

    numCol = 12; // number of layers in one row
    origin = [width,height]/2; // center of upper left layer

    row = Math.floor((index-1)/numCol);
    col = (index-1)%numCol;
    x = col*width + width/2;
    y = row*height + height/2;
    if (col%2) y += width/2;
    [x,y]

    Dan

  • Dan Ebberts

    April 10, 2007 at 7:58 pm in reply to: First thing…

    Try this:

    freq = 2; //2 changes per second

    cycle = Math.floor(time*freq);
    seedRandom(cycle,true);
    ((Math.floor(random(4)) + 1)%4)*90

    Dan

  • Dan Ebberts

    April 10, 2007 at 3:27 pm in reply to: expression to determine topmost visible layer ?

    Try this one”

    txt = “”;
    for (i = 1; i <= thisComp.numLayers; i++){ if (i == index) continue; L = thisComp.layer(i); if (! (L.hasVideo && L.active)) continue; if (time >= L.inPoint && time < L.outPoint){ txt = "" + L.position[1]; break; } } txt Dan

  • Dan Ebberts

    April 9, 2007 at 9:42 pm in reply to: AAE Won’t Import Scripts (*.jsx files)

    You should save your scripts with a .jsx extension (from whatever text editor you’re using) so they’ll be recognized as scripts, but you should still be able to run it as a text file. Are you sure it didn’t run?

    Dan

  • Dan Ebberts

    April 8, 2007 at 6:46 am in reply to: Mask size(width x hight)via script

    In scripting you do have access to mask info, but I don’t think there’s a way to detect which mask is selected.

    If you could specify the mask by number, it would be a bit of work, but you could set up a loop that would check each mask vertex for min x, min y, max x, and max y. It would then be easy to calculate the width and height of the bounding box.

    Then what would you want to do with that info?

    Dan

  • Dan Ebberts

    April 5, 2007 at 6:33 pm in reply to: Using expressions to constrain IK limbs?

    You might parent a “heel” and a “toe” null to the foot and use something like this:

    floor = 400; // y coordinate of floor
    L = thisComp.layer(“right_heel”);
    P1 = L.toWorld(L.anchorPoint);
    L = thisComp.layer(“right_toe”);
    P2 = L.toWorld(L.anchorPoint);
    maxY = Math.max(P1[1],P2[1]);
    if (maxY > floor){
    value – [0, maxY – floor]
    }else{
    value
    }

    Dan

  • Dan Ebberts

    April 5, 2007 at 5:10 pm in reply to: Using expressions to constrain IK limbs?

    What you want to do can likely be done, it’s just hard to say how though, without seeing what you have so far.

    Dan

Page 979 of 1081

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