Forum Replies Created

Page 1 of 2
  • After typing my question I got the answer;
    So if someone is looking through it here it is
    I used this:

    thisComp.layer(“data.csv”)(“Data”)(“Outline”)(idx)

    where idx is the column number starting from 1

  • Frederic Antoinette

    November 7, 2019 at 4:47 am in reply to: Align Paragraph Text to middle of box?

    Hi, I think I figured a way, by using a text box, not sure if it will work if not using a text box.
    Through test I realise that the sourceRectAtTime().top was always fix whatever font, font size or lines there was in my text box.
    Using that info I came out with this code:

    pY = transform.position[1];
    pX = transform.position[0];
    R = thisLayer.sourceRectAtTime(time);
    c = pY + R.top + (R.height/2);
    y = 296 - c + pY;
    [pX,y]

    the 296 value is the Y value i needed my textbox to be vertically centered, since it was a text box and I horizontally aligned and the text itself was horizontally centered I didn’t need to calculate the x value. But I’m sure using the sourceRectAtTime().left and width property, same can be achieve to horizontally center.

    Probably lots of room for improvement, but I hope that this can at least help.

  • Forgot to mentioned that used that code as an alternative for auto orient. In the rotation.

  • It has the opposite effect, it seems to slow down at the turns…

    And with the length of the arrow, not really pretty at all; kind of look like its wagging its tail…
    However I found this:
    cornerEase = 3;
    p = transform.position;
    t = Math.min(Math.max(time,p.key(1).time+.001),p.key(p.numKeys).time);
    pre = position.valueAtTime(t-thisComp.frameDuration*cornerEase);
    post = position.valueAtTime(t+thisComp.frameDuration*cornerEase);
    delta = post-pre;
    orient = radiansToDegrees(Math.atan2(delta[0],-delta[1]));
    value+orient

    there: https://mindfury.com/?p=420

    tweaking the cornerEase I was able to get what I wanted this time.

  • Good catch.
    It worked
    I would have done that if I was using a slider, but I though with a pseudo popup it wouldn’t be needed.
    So I guess I will call it a little bug that the value of these pseudo popup effects are not exact integers and we need to round it.

    Thanks

  • Frederic Antoinette

    June 14, 2018 at 7:30 am in reply to: toWorld valueAtTime

    Feeling a bit dumb here, realise that the toWorld has a time property so I got it working with this

    L = thisComp.layer(“C_Nagoir-Back Tip”);
    L.toWorld(L.anchor_point,inPoint);

    But would still like to understand how it internally works. thanks

  • I believe this would work
    x1 = key(1).value[0];
    x2 = key(2).value[0];
    x3 = effect("Slider Control")("Slider");
    t1 = key(1).time;
    t2 = key(2).time;
    t3 = key(3).time;

    if (time <= t2) {
    x = linear(time,t1,t2,x1,x2)
    }else{
    x = linear(time,t2,t3,x2,x3)
    }
    [x,value[1]]

    change linear interpolation to ease if you are want to ease your animation

  • Frederic Antoinette

    May 28, 2018 at 8:38 pm in reply to: Control Layer copied into various comps

    I can see multiple ways of doing that.

    One would be to have a a control composition;
    In this composition you drop all your finals composition.
    Add a Null and in there the Expression Control “Control Layer”
    Now in your expression use that Control Layer to point your expression to the correct composition.

    Your code for your scale would look like

    C = comp("Control Comp").layer("Null 1").effect("Layer Control")("Layer").name;
    s = comp(C).layer("The layer on which the slider is on").effect("Slider Control")("Slider");
    [s, s]

    You can even user your Control Composition as Final render if you add this code to the opacity of each Finals Comp in the Control Composition, to only render the composition you want.

    C = thisComp.layer("Null 1").effect("Layer Control")("Layer").name;
    If (C == thisLayer.name) 100 else 0

    The only problem with this method is that you cannot render queue multiple composition at the same time. You will have to add to Encoder one by one, or it will only take the latest value of the control layer and use that to all your renders.

    The other method which I use more frequently would be to add a text layer as guide layer in your footage comp. And use the text in there to name the comp you want to use to control it. Then duplicate that footage comp as many time as necessary and change the text in each comp to match the name of the final composition it is nested in.

    This time the code for scale would look like

    C = thisComp.layer("The Text layer").text.sourceText.value;
    s = comp(C).layer("The layer on which the slider is on").effect("Slider Control")("Slider");
    [s,s]

    With this method depending on how many final comps you have it takes time to setup, but you won’t have that render queue problem you have in the first method.

    It’s quite hard trying to explain the method I use. I hope you understood and that it can help.

  • You are absolutely right but in my situation it wasnt a dolphin but a fishing line made with rubberhose and wiggle. So to find where the fishing line crossed the waterline I didnt find any other way to track it due to the curved line.

    Same would be if he is using puppet pin to deform the dolphin the fin position would vary in relation to its position or rotation.

  • If you are looking for a screenshot of your whole application that is with your timeline etc… I’m don’t think you can do that within after effects. You need another application.
    On windows I use snipping tool, or record my whole screen using OBS.
    On the other hand if you want just the compisition, You could simply use Composition -> Save frame as.
    It will add to the render queue. You can create a default template so it automatically makes a png to a location of your choice.
    But then you’ll have to render your queue.

    However I’m pretty sure you can also automate that process through a script so that it does all that at the click of a button.

Page 1 of 2

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