Forum Replies Created

Page 3 of 3
  • At this point I’m pretty lost.

    I keyframed the Rectangular Shape Layer setting the first Vertex in 4 different frames.

    After that I put this expression into the Path property:

    n = Math.round(thisComp.layer(“NullObject_Name”).effect(“SliderControl_Name”)(“Slider”));

    n = clamp(n,1,numKeys)

    valueAtTime(key(n).time);

    I created a null object with a slider control and link that property to it.

    So now I’m able to switch the first vertex where the stroke starts via the slider values.

    I’ve also tried your expression:

    newFirstVertex = 2; // attach to slider
    p = thisProperty;
    r = sourceRectAtTime(0,false);
    pts = p.points();
    pts=pts.slice(newFirstVertex,pts.length).concat(pts.slice(0,newFirstVertex));
    createPath(pts ,[], [], p.isClosed())

    But I can’t get it work.

    Could you please tell me the steps?

    1 – Create a rectangle shape layer

    2 – Convert it to Bezier Path

    3 – Keyframe the first vertex in different positions

    4 – Insert your expression and link it to the slider value

    This is what I did but nothing happens when I move the slider cursor.

  • Thanks for your answer.

    This is pretty confusing to me.

    The issue happens when the Start or the End value is less than 50%.

    At 49 % the Shape Path starts to Expand.

    Something more is needed.

    Something able to constrains the shape size to the comp size even if the End property value goes down to 0% or up to 100 % for the Start property.

    Any idea?

  • Hey Flip,

    did Dan’s expression worked properly for you?

    So that means that I’m doing something wrong.

    I’ve tried to make a brand new composition with a brand new rectangular shape layer and it seems to work well now until I add a Trim Path to animate the End and the Start of the Path.

    When the End’s parameter goest to 0 % an error occur and this happens also on the Start parameter when it goes to 100 %.

    Watch the video I’ve posted and if there’s a solution for this problem, it would be amazing =)

    Video:

    https://www.youtube.com/watch?v=FmgrOoaovRM

    Please tell me if there’s something I can do to fix that problem.

    For the second option with the Null Objects everything is working great so thank you so much for your help !!!

    At this point I have another thing I’d love to do:

    I need to set the first Vertex of the Path changing from one corner to the other one clockwise creating keyframes and link this keyframes to a slider control.

    To do so I would need to set one vertex as first vertex and keyframing it, then move on the second vertex, set it as first vertex and keyframing it and so on.

    So in total there would be 4 Keyframes, as many keyframes as the Path Vertices.<font face=”Courier New, Courier, Lucida Sans Typewriter, Lucida Typewriter, monospace”></font>

    At this point I need to add an expression to the Path property like:

    n = Math.round(thisComp.layer(“NullObject_Name”).effect(“SliderControl_Name”)(“Slider”));

    n = clamp(n,1,numKeys)

    valueAtTime(key(n).time);

    So when changing the slider value from 1 to 4, the path start would perfectly snap clockwise to the 4 different corners one by one.

    Is it possible to merge Dan’s expression with this expression somehow?

    Or is there a workaround?

    I’ve tried to apply the method I explained before on the Offset property.

    So I keyframed the Offset property of the Trim Path at 4 different angles ( 0°, 90°,180°,270°) with the expression linking it to a slider control as I said before but it obviously works only with a square shape not with rectangles.

    Watch this to see what I would be able to do:

    https://www.youtube.com/watch?v=t8OtXayvOYc

    As you can see after I’ve created the path I need to input the comp size values into the Rectangle size.

    I would like to avoid that passage using Dan’s expression but I would also be able to keyframe the path vertex and add the other piece of expression.

    Maybe it’s a bit messy but I hope there’s a way to do that.

    Thanks a bunch in advance for your help guys !!!

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Hi Dan,

    Thanks for your quick response!!

    Unfortunately this solution is not working properly for me.

    Once I change the composition size, the mask size remains unchanged and always centered.

    If I apply the same expression on a bezier path of a shape layer, the expression it’s not working at all.

    So I have another idea but I’m stuck again.

    I’ve created Nulls from path so each Null object is now linked to each vertex of the Path.

    Check the image I upload, I took a snapshot of the shape layer with the 4 Null objects.

    In this case I have a Rectangle path so there are 4 Null objects linked to each point.

    Now I think it could be nice to say to each null object to stay in a precise position reacting to the composition size.

    For example:

    The Top Left point should always react to the composition size and always snap its position to the Top Left corner of the composition itself.

    Same thing for the Top Right, Bottom Right and Bottom Left.

    Do you think there could be an expression to make a null object automatically snapping on a certain position?

    That would be nice because once I change the composition, all the Null objects would snap to the correct position and the path of the shape layer would consequently change.

    I hope you can help me again.

    Thanks for your help and let me know what you think



  • Nick Mara

    May 4, 2020 at 12:45 am in reply to: Fleko preset: Solve 13 expressions errors

    Dan, thanks a million for your help !!!
    All of your suggestions work like a charm, wow !!

    Last week I posted a new thread but anybody answered, so you could possibly be the One again ☺
    https://forums.creativecow.net/thread/227/44700
    If you could solve this, I think that it would be a revolution for me and for many others AE users for sure.
    Thanks again

    Nick Mara

  • Nick Mara

    May 4, 2020 at 12:44 am in reply to: Fleko preset: Solve 13 expressions errors

    Dan, thanks a million for your help !!!
    All of your suggestions work like a charm, wow !!

    Last week I posted a new thread but anybody answered, so you could possibly be the One again ☺
    https://forums.creativecow.net/thread/227/44700
    If you could solve this, I think that it would be a revolution for me and for many others AE users for sure.
    Thanks again

    Nick Mara

Page 3 of 3

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