Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects rotate offset

  • Susan Lan

    August 21, 2015 at 11:43 am

    Hi walter! Million of thanks!!

    I wanted to ask about line 5, because I’m not sure how to write the slider of offset position (and also because I have also a slider for Z position, but in your code tyhere is not Z position)

    It is good one of these tryes? For POSITION

    MY TRY 1)

    positionOffset = [effect(“Slider Control”)(“Slider”),effect(“Slider Control 2”)(“Slider”),effect(“Slider Control 3”)(“Slider”)];

    MY TRY 2)

    positionOffset = [effect(“offsetX”)(“Slider Control”)(“Slider”),effect(“offsetY”)(“Slider Control 2”)(“Slider”),effect(“offsetZ”)(“Slider Control 3”)(“Slider”)];

    MY TRY 3)

    positionOffset = [effect(“offsetX”)(“Slider Control”),effect(“offsetY”)(“Slider Control 2”),effect(“offsetZ”)(“Slider Control 3”)];

    Thank you Walter

  • Susan Lan

    August 21, 2015 at 11:52 am

    When I try the
    MY TRY 2)
    AND
    MY TRY 3)
    a error windows says:
    “could’n find effect named ‘offsetX” Expression disabled”

    But I’m not sure if MY TRY 1) Is correct the add of Z?

  • Walter Soyka

    August 21, 2015 at 12:07 pm

    I named my control effects — so my sliders are named offsetX, offsetY, etc. If you rename those slider control effects in the Effects Control Panel (ECP), you’ll see the names update in the expressions, too.

    So your Try #1 is correct for now, but I’d suggest renaming the effects as I did so the names are meaningful in the ECP and timeline, without digging through the code.

    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 21, 2015 at 12:13 pm

    You’re an Hero for me Walter!!

    I change -1 to +2 to be the ligth in frotn of the camera, to feel that the camera behind it, is pursuing the ligthy, but in some time the ligth stop (it is not second 8 yet) and the camera continuous, Can I upload into dropbox to you can see the ligth and camera layers only, or it will be inconvenience?

  • Walter Soyka

    August 21, 2015 at 12:24 pm

    [Susan Lan] “Can I upload into dropbox to you can see the ligth and camera layers only, or it will be inconvenience?”

    Sure, but it will be a couple of hours before I’ll have the chance to review it.

    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 21, 2015 at 12:31 pm

    Then best I take a photo/capture, one moment

  • Susan Lan

    August 21, 2015 at 12:36 pm

    The follow though make sense? (is correct?)

    I think that because of I have change the offset tiem from -1 to +2 (in order to make the ligth in front the camera and not behind it)

    For that, the ligth “stops” 2 seconds before the camera stops (althought is not yet second 8 to stop as says the expression)

    Can be that the reason why the ligth stops 2 seconds before the camera? How can I fix it?

    Or better I don’t touch -1 and I offset the position of the ligth in front?
    But if I don’t change -1, who pursues to who? the ligth pursues to the camera?

  • Susan Lan

    August 21, 2015 at 12:52 pm

    the null of ligth (where I write your code) stops at 0:00:02:23
    and the layer “LEADER”, that is the Cam Control stops at 0:00:04:23

    The capture:
    https://i.imgur.com/t28qeqM.jpg

    It is possible to tell to the code, to this line:
    referenceTime = Math.min(time + timeOffset, stopFollowingAtTime + timeOffset);
    that we don’t want to take the offset value for stop? Or it is not for that reason why the ligth stops 2 seconds before the camera stops, since the time offset is 2 seconds (in order to make the ligth in front of the camera, and make the camera pursuing the ligth)

    View post on imgur.com

  • Walter Soyka

    August 21, 2015 at 3:01 pm

    [Susan Lan] “It is possible to tell to the code, to this line:
    referenceTime = Math.min(time + timeOffset, stopFollowingAtTime + timeOffset);
    that we don’t want to take the offset value for stop?”

    Yes, make it this instead:

    referenceTime = Math.min(time + timeOffset);

    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 21, 2015 at 3:31 pm

    Good evening Walker!

    I’m thinking, because although I turn this lines:
    referenceTime = Math.min(time + timeOffset, stopFollowingAtTime + timeOffset);

    into this one:
    referenceTime = Math.min(time + timeOffset);

    it still do the same: the ligth stops 2 seconds before the camera stops ( because the time offset it is 2 seconds) and when I put +1 of time offset, then the ligth stops 1 second afther the camera stops.

    Then, if we imagine that we don’t want to stop never, the the code you gave me, how will be?

    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;

    __________________
    and then can we make to stop the expression in another way: creating a New layer Null Object, adding there a fx Checkbox Control and then adding to your code that when the Checkbox is ON we must obey the expression, and we it will be OFF we can do wahtever manually (with values attached to sliders) some like this?:

    control = thisComp.layer("Null").effect("Checkbox Control")("Checkbox") ;

    if (control == 1)
    {
    thisComp.layerblablablabla//can we add here your fantastic code?;
    }
    else
    {
    [640,360,0];//this linked to news slider to continue manually?
    }

    can we? can you, please?

Page 2 of 4

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