Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects rotate offset

  • rotate offset

    Posted by Susan Lan on August 19, 2015 at 3:01 pm

    I have this position time offset, but, how to turn into for rotation offset, please?

    offset = -.5;

    p = thisComp.layer("My Animated Layer");

    t = time + offset;

    p.position.valueAtTime(t);

    Susan Lan replied 10 years, 9 months ago 2 Members · 31 Replies
  • 31 Replies
  • Walter Soyka

    August 19, 2015 at 3:26 pm

    offset = -.5;
    p = thisComp.layer("My Animated Layer");
    t = time + offset;
    p.rotation.valueAtTime(t);

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Susan Lan

    August 19, 2015 at 4:27 pm

    Thanks Walter! I get this error, I take a capture, can you help me please?

    https://i.imgur.com/YAJqgbm.jpg

    9157_errorrotationoffset.jpg.zip

    View post on imgur.com

  • Walter Soyka

    August 19, 2015 at 4:33 pm

    Since it’s referring to a 3D layer:

    p.transform.zRotation.valueAtTime(t);

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Susan Lan

    August 19, 2015 at 4:42 pm

    I linked the rotation of the 3d null of the ligth
    to the rotation ogf the 3d null (cam control) of the camera

    Both nulls are 3D activated…

    I’m not english, but I undertand “since” as “that is because”, no?

    Corecct me please, Then you are saying that I must write:
    offset = +.5;
    p = thisComp.layer("Cam Control").transform.zRotation.valueAtTime(t);
    t = time + offset;
    p.rotation.valueAtTime(t);

    instead of:
    offset = +.5;
    p = thisComp.layer("Cam Control").transform.zRotation;
    t = time + offset;
    p.rotation.valueAtTime(t);

    yes? Thanks Walter!

  • Walter Soyka

    August 19, 2015 at 9:07 pm

    p refers to a layer, not to the property. You’d need to change the property reference.

    offset = -.5;
    p = thisComp.layer("My Animated Layer");
    t = time + offset;
    p.transform.zRotation.valueAtTime(t);

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Susan Lan

    August 20, 2015 at 6:33 am

    Good mornig Walter! I just try it and, I want to aks you if it is normal this: ¿it is normal that only works: if, in the line “p” that refers to the layer we only write the name of the layer to which we want to follow the rotation (instead of select that line and pick/take the whip to parent to the z rotation)??:

    offset = -.5;
    p = thisComp.layer("Cam Control");
    t = time + offset;
    p.transform.zRotation.valueAtTime(t);

    instead of this in line “p” of layer (this follow get error, ¿the reason is because we tell the “transform Z Rotation in “p” property line and because of that, is not necesary tell to it again in the “layer” line?

    offset = -.5;
    p = thisComp.layer("Cam Control").transform.zRotation;
    t = time + offset;
    p.transform.zRotation.valueAtTime(t);

    Thanks you Walter

  • Susan Lan

    August 20, 2015 at 1:23 pm

    I asked that, also because, it seems that the null of the AE-pointLigth rotates, but I can’t notice the offset, although I change -.5 to +.5
    It still seems that the null of the ligth is linked to the null of the camera, both make the same rotation and position, but, I do not notice the sensation that the camera follows the light, I don’t know how to explain, I imagined to maked the ligth moving a little bit faster (time offset, no?) and that the camera follows, pursues the ligth (which in sometimes “dodge” (I don’t know the word) the camera)…

    🙁

  • Walter Soyka

    August 20, 2015 at 1:34 pm

    I’m getting a little lost. Can you post a screenshot of your entire UI so I can see the comp layers with some keyframes and understand better what you are applying these expressions to?

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Susan Lan

    August 20, 2015 at 2:32 pm

    Good evening Walter!

    Yes, thank you and sorry for the inconveniences, here I upload the image:

    https://i.imgur.com/2GoYZCg.jpg

    I write an expression into the: Position of the null of the ligth, to follow the position of the null of the camera (called “Cam Control”)
    was this
    thisComp.layer("Cam Control"); transform.position + [effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider"),effect("Slider Control 3")("Slider")];

    then I add it, inside the code of “position offset”:
    offset = +.5;
    p = thisComp.layer("Cam Control"); transform.position + [effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider"),effect("Slider Control 3")("Slider")];
    t = time + offset;
    p.position.valueAtTime(t);

    Then I write an expression into the: Rotation of the null of the ligth, to follow the Rotation Z of the null of the camera (called “Cam Control”).

    I got this to the parent-follow:
    thisComp.layer("Cam Control").transform.zRotation
    But when I want to add it, into our expression of rotation offset I must remove the part
    .transform.zRotation
    To add, finally, like this (the expression yo tell me)
    offset = +.5;
    p = thisComp.layer("Cam Control");
    t = time + offset;
    p.transform.zRotation.valueAtTime(t);

    P.D.: It does not looks good, because also I’m trying to turn the cone of ligth (the beam) in a manner that seems firstly that the beam are in Y axis , I mean, lookin at this frist:
    https://cloud8.lbox.me/images/384×384/201203/ultrafire-decreto-xm-1000-l-t6-luz-tactica-linterna-color-camuflaje_anehzq1331188119397.jpg
    and then animate the ligth beam

    View post on imgur.com

  • Walter Soyka

    August 21, 2015 at 10:38 am

    I’ve rewritten your expression to try to make it a little clearer what it’s doing.

    Position:
    timeOffset = -1;
    stopFollowingAtTime = 8;

    referenceTime = Math.min(time + timeOffset, stopFollowingAtTime + timeOffset);
    referenceLayer = thisComp.layer("LEADER");
    positionOffset = [effect("offsetX")("Slider"),effect("offsetY")("Slider")];

    value + referenceLayer.transform.position.valueAtTime(referenceTime) + positionOffset;

    Rotation:
    timeOffset = -1;
    stopFollowingAtTime = 8;

    referenceTime = Math.min(time + timeOffset, stopFollowingAtTime + timeOffset);
    referenceLayer = thisComp.layer("LEADER");

    value + referenceLayer.transform.zRotation.valueAtTime(referenceTime);

    Please feel free to ask questions on anything above that’s unclear.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

Page 1 of 4

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