Forum Replies Created

Page 1016 of 1081
  • Dan Ebberts

    July 6, 2006 at 8:58 pm in reply to: seed random for randomness

    It would indeed be extremely useful if you could force random() to produce the same random sequence in different layers and properties. I think seedRandom needs a third parameter – global = true, but alas, as you discovered, it doesn’t exist.

    Dan

  • Dan Ebberts

    July 6, 2006 at 8:53 pm in reply to: expression for 3D orientation

    Try this:

    L = this_comp.layer(“Layer 1”);
    s = L.scale/100;
    u = L.to_world_vec([s[0],0,0]);
    v = L.to_world_vec([0,s[1],0]);
    w = L.to_world_vec([0,0,s[2]]);
    sinb = clamp(w[0],-1,1);
    b = Math.asin(sinb/this_comp.pixel_aspect);
    cosb = Math.cos(b);
    if (Math.abs(cosb) > .0005){
    c = -Math.atan2(v[0],u[0]);
    a = -Math.atan2(w[1],w[2]);
    }else{
    a = Math.atan2(u[1],v[1]);
    c = 0;
    }
    [radians_to_degrees(a),radians_to_degrees(b),radians_to_degrees(c)]

    Substitute your layer for “Layer 1”.

    Dan

  • Dan Ebberts

    July 6, 2006 at 8:53 pm in reply to: expression for 3D orientation

    Try this:

    L = this_comp.layer(“Layer 1”);
    s = L.scale/100;
    u = L.to_world_vec([s[0],0,0]);
    v = L.to_world_vec([0,s[1],0]);
    w = L.to_world_vec([0,0,s[2]]);
    sinb = clamp(w[0],-1,1);
    b = Math.asin(sinb/this_comp.pixel_aspect);
    cosb = Math.cos(b);
    if (Math.abs(cosb) > .0005){
    c = -Math.atan2(v[0],u[0]);
    a = -Math.atan2(w[1],w[2]);
    }else{
    a = Math.atan2(u[1],v[1]);
    c = 0;
    }
    [radians_to_degrees(a),radians_to_degrees(b),radians_to_degrees(c)]

    Substitute your layer for “Layer 1”.

    Dan

  • Dan Ebberts

    July 5, 2006 at 6:58 pm in reply to: Rearrange all layers in timeline

    If you’re talking about the stacking order of the layers, you can select the bottom one, shift+select the top one, Edit>Cut, Edit>Paste.

    Dan

  • I’m not sure exactly what you’re asking, but wouldn’t you want to do it the other way around? For example, you could put a null at the same position as your footage and make it the parent of the camera, then you would rotate the null to move the camera in a circle. You could time-remap the footage and use an expression to pick which frame to show based on the rotation of the null. Then auto-orient the footage towards the camera.

    Or am I completely on the wrong track?

    Dan

  • I’m not sure exactly what you’re asking, but wouldn’t you want to do it the other way around? For example, you could put a null at the same position as your footage and make it the parent of the camera, then you would rotate the null to move the camera in a circle. You could time-remap the footage and use an expression to pick which frame to show based on the rotation of the null. Then auto-orient the footage towards the camera.

    Or am I completely on the wrong track?

    Dan

  • Dan Ebberts

    June 28, 2006 at 12:19 am in reply to: Expressions question

    I’m guessing that you’re animating the shape of the mask, correct? If so, tracking should work, or a script could apply the position of the end vertex at each frame to your bud layer’s position. A bit of work, but certainly educational. 🙂

    Dan

  • Dan Ebberts

    June 28, 2006 at 12:19 am in reply to: Expressions question

    I’m guessing that you’re animating the shape of the mask, correct? If so, tracking should work, or a script could apply the position of the end vertex at each frame to your bud layer’s position. A bit of work, but certainly educational. 🙂

    Dan

  • Dan Ebberts

    June 26, 2006 at 8:25 pm in reply to: Dely expression in 3D space

    Which expression are you using. If you want each layer maintain its initial relationship to the null, you can modify the last line like this:

    start = 0; //start time of template motion
    end = 4.0; //end time of template motion

    t = thisComp.layer(“template”);
    offset = (t.effect(“offset”)(“Slider”)/100)*(index -1);
    travel = linear(t.effect(“travel”)(“Slider”)/100,start,end);
    value + t.position.valueAtTime(travel – offset) – t.position.valueAtTime(0)

    I think that should do it.

    Dan

  • Dan Ebberts

    June 26, 2006 at 8:25 pm in reply to: Dely expression in 3D space

    Which expression are you using. If you want each layer maintain its initial relationship to the null, you can modify the last line like this:

    start = 0; //start time of template motion
    end = 4.0; //end time of template motion

    t = thisComp.layer(“template”);
    offset = (t.effect(“offset”)(“Slider”)/100)*(index -1);
    travel = linear(t.effect(“travel”)(“Slider”)/100,start,end);
    value + t.position.valueAtTime(travel – offset) – t.position.valueAtTime(0)

    I think that should do it.

    Dan

Page 1016 of 1081

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