After Effects Tutorial - Scale Path and Maintain Stroke Width

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 113

  • @NicolasGavrilenko
    @NicolasGavrilenko 5 лет назад +97

    *If you don't want to use nul apply*
    alt-click on the stopwatch icon of the stroke width and paste this into the expression field:
    value = value/(transform.scale[0]/100);
    (it will link the scale value of your layer to the stroke width)

    • @Flimmerzimmer
      @Flimmerzimmer 4 года назад +8

      got to tattoo this to my forearm! literally every day I'm here because I can't remember these clever lines of code :)

    • @leoLorenzi
      @leoLorenzi 4 года назад +14

      or even
      value = value/(transform.scale[0]/100);

    • @tiaghanson2946
      @tiaghanson2946 4 года назад

      is negativ/downscaling also covered by this expression?

    • @tiaghanson2946
      @tiaghanson2946 4 года назад

      ps. negativ and unproportional

    • @kemal_punkt
      @kemal_punkt 3 года назад +1

      you're a life-saver, many many thanx

  • @georgekmsmythdesign
    @georgekmsmythdesign 6 лет назад +2

    Thanks, good tip. Heads up - when copying expressions you can right-click the property and select 'Copy Expression Only', then select the remaining properties and paste.

  • @PeterMansour-u1f
    @PeterMansour-u1f 9 месяцев назад

    Thank you so much for this tutorial. I've been stuck on this for two days and this helped me finally solve the issue.

  • @J0onAa
    @J0onAa 3 года назад +24

    2021 Edition: Simply alt-click on the stopwatch icon of the stroke width and post this into the expression field:
    value / length(toComp([0,0]), toComp([0.7071,0.7071])) || 0.001;
    Done!

    • @vjuncker
      @vjuncker 3 года назад

      Is this because the expression language in AE changed? Or is it shorthand version?
      Asking because I know nothing of programming and I am still using the 2018 version.

    • @jamskof
      @jamskof 3 года назад +1

      well done sir! why on earth adobe just done help out and give us a tick box for stuff like this i dont know

    • @clemcast2852
      @clemcast2852 3 года назад +1

      THANKS!!!!!! I had problem with negative scales values and your expression fixed it!

  • @rh9967
    @rh9967 5 лет назад +2

    This is a great workaround - thank you! With how much this is used you would think that Adobe would have implemented a solution by now. Although the expression works great, it more than doubles my layers since every single shape needs a Null Object. And, if I want to attach the parent null to another null, I have to copy the layer, split the two, and then parent it to another null.

  • @understandinc
    @understandinc 5 лет назад +43

    thanks! but holy crap! can something SO simple in every other program really be SO convoluted in AE?
    you'd think adobe would have by now implemented a "maintain stroke width" check box

    • @CampKeyframetutorials
      @CampKeyframetutorials  5 лет назад +3

      Yeah it's kind of dumb actually that it's not in there. Luckily this tutorial works but I agree Adobe should make more of these little things just standard in After Effects with a checkbox or something. But anyway, thanks for watching! :)

    • @vjuncker
      @vjuncker 5 лет назад

      I believe this happens because AE uses scale as the size property, since you don't get the chance to use absolute width and height values. It annoys me that the same happens with the text size as well.

    • @emilianorodriguez2096
      @emilianorodriguez2096 5 лет назад +2

      illustrator has that function

    • @clintflix
      @clintflix 4 года назад +3

      Probably because it's not so convoluted as this makes it out to be. You don't need any expressions to do this. Jut put all your paths in groups within the Shape Layer, and put your strokes below (after) anything you're wanting to scale. Then use the group transform controls instead of the layer transform controls.

    • @tiaghanson2946
      @tiaghanson2946 4 года назад

      @@CampKeyframetutorials not for me sadly :(

  • @nematurd
    @nematurd Год назад

    Lifesaver. This is a game changer. Thank you!!!!

  • @anastasiiaandriichuk8732
    @anastasiiaandriichuk8732 2 года назад

    Thank you for this tutorial! It really helped me. And also - your dutch accent, it's so beautiful, love it!

  • @M1klashevskii
    @M1klashevskii Год назад

    Лучший дядь, обнял, поднял, покружил

  • @OddBoxMediacom
    @OddBoxMediacom 4 года назад

    INCREDIBLY HELPFUL PROBLEM FIXED THANK YOU

  • @jimphillips6379
    @jimphillips6379 5 лет назад

    Thank you so much! Your tutorial saved my skin on a project this evening. Exactly what I needed. Cheers!

  • @mwmingram
    @mwmingram 4 года назад

    Great. Very helpful. Thank you.

  • @maxhalley7579
    @maxhalley7579 6 лет назад

    Very happy I found this channel. Keep up the great work!

  • @Luckeydogs
    @Luckeydogs 5 лет назад

    Thank you! Worked perfect for my project

  • @nickoloriage
    @nickoloriage 4 года назад

    Thanks, you really helped me for my project :)

  • @sandrogygli5764
    @sandrogygli5764 6 лет назад +14

    That's a nice solution but it does't work if i want to scale something unproportionally. Do you have something on mind how this could be fixed - maybe just a minor change to the expression? I would really appreciate your help. I'm experimenting on a hairline typeface which can be given thickness by text shape and therefore stay monolinear when extended/condensed.

    • @CampKeyframetutorials
      @CampKeyframetutorials  6 лет назад

      Hey! If you want to scale something unproportionally, I think you can change the '100' number to something else to do this. You can experiment with that a bit, maybe that will do the trick :)

    • @AmobeTv
      @AmobeTv 4 года назад +1

      Instead of animating the scale you can animate the Size property.

    • @maxdavids5445
      @maxdavids5445 3 года назад

      @@AmobeTv This is okay if you don't have something parented to the layer.

    • @clemcast2852
      @clemcast2852 2 года назад

      3 years too late but :
      sfx = thisComp.layer("control").transform.scale[0]/100;
      ovx = value[0];
      nvx = ovx / sfx;
      sfy = thisComp.layer("control").transform.scale[1]/100;
      ovy = value[1];
      nvy = ovy / sfy;
      [nvx,nvy]

    • @edgelll
      @edgelll 2 года назад

      @@clemcast2852 “The result cannot be converted to a numeric value ”in the first line, how to resolve it?

  • @motionsam
    @motionsam 6 лет назад +1

    DUDE THANKS A LOT! You literally saved me

  • @rmrmrm3974
    @rmrmrm3974 4 года назад

    Thank you ! It's very helpful :)

  • @krishnas4583
    @krishnas4583 4 года назад

    You are a life saver.....thanks a lot

  • @tomjackson3377
    @tomjackson3377 5 лет назад

    Well that worked brilliantly! Thanks!

  • @vmartme
    @vmartme 2 года назад

    Thanks mate!

  • @alimigunani
    @alimigunani 6 лет назад +1

    Thanks!
    My problem solved 🙂

  • @kutanay
    @kutanay 6 лет назад

    thank you for this quick expression tutorial

  • @pascalinelefebvre2264
    @pascalinelefebvre2264 6 лет назад

    Woa! Thank you so much for this tutorial!

  • @KieranJB
    @KieranJB 2 года назад

    Really useful, thank you!

  • @basschellekens7024
    @basschellekens7024 3 года назад +2

    So apparently, this method, and the '2021 Edition' mentioned below, only Works when you scale the object proportionally. So if i want to scale an object like a square for example, and transform it a into rectangle, the stroke width will not stay the same. Bummer.

  • @JhoniMusic
    @JhoniMusic 5 лет назад

    Amazingg!!
    Thank you so much you saved me with that Expression!

  • @julianafv
    @julianafv 5 лет назад

    great tutorial!

  • @kevinfoster6673
    @kevinfoster6673 5 лет назад +1

    Very cool, but trying to figure out how to maintain stroke weight on a 3D object rotating on Y axis. C4D lite?

  • @alexeygolovko8567
    @alexeygolovko8567 5 лет назад

    Thanks! You really help me!

  • @CaineMcGinley1
    @CaineMcGinley1 2 года назад

    thanks

  • @emilianorodriguez2096
    @emilianorodriguez2096 5 лет назад

    right button mouse click in expression parameter -->> copy expression only --> Then, select ALL the stroke width -->> edit / paste (or cmd+V)
    More easily than one by one.. alt+click cmd+v... alt+click cmd+v... alt+click cmd+v... alt+click cmd+v...
    alt+click cmd+v...
    alt+click cmd+v...
    alt+click cmd+v...
    alt+click cmd+v...
    alt+click cmd+v...
    alt+click cmd+v...
    alt+click cmd+v...

  • @robdiaz
    @robdiaz 4 года назад

    Thanks dudeeee

  • @Chewbacca2000
    @Chewbacca2000 5 лет назад

    Thanks so much man!!

  • @Mickeysid
    @Mickeysid 3 года назад

    kan je hierna ook nog een slider control toevoegen aan de nul layer om de stroke width van alle slaved layers te wijzigen? zo ja hoe?

  • @tiragotadesseofficial
    @tiragotadesseofficial 6 лет назад

    simple but nice

  • @christopherphilip4485
    @christopherphilip4485 3 года назад

    will it work when we use on 3d layer and camera movements?

  • @hnarment
    @hnarment 5 лет назад

    THANKS SO MUCH!!!

  • @soniamorarka
    @soniamorarka 5 лет назад

    magic thank you

  • @kiasbeatzz
    @kiasbeatzz 5 месяцев назад

    is there a faster way?

  • @eti360
    @eti360 5 лет назад

    omg i love you so much

    • @eti360
      @eti360 5 лет назад

      you just made me level up my design so much

    • @CampKeyframetutorials
      @CampKeyframetutorials  5 лет назад

      ​@@eti360 Thank you so much for watching :)

  • @MrSinousinou
    @MrSinousinou 3 года назад

    Hey thanks for this one. But one more question : I am using sliders on the parent's null object (instead of the transform option) to scale my shape. Is there an other expression for that? Thanks a lot **

  • @chiribimchiribim
    @chiribimchiribim 3 года назад

    does it only work for shape layers? I'm working with PNG files, thanks

  • @MohamedSabry-fy4td
    @MohamedSabry-fy4td 4 года назад

    How to use this with camera?

  • @tiaghanson2946
    @tiaghanson2946 4 года назад

    Do you have any idea how to adjust the expression to maintain the stroke width when the shape layer is scaled down and the proportion parameters are unlinked?

    • @joshpaulsound
      @joshpaulsound 2 года назад

      @Tom Pendleton not sure if you still need help but try parenting to a null object and changing the scale of that instead of the object itself

  • @SJ-fg6nc
    @SJ-fg6nc 4 года назад

    Thanks for the tutorial.. but it's not working in my case...

  • @vfdifwfeljsvfghdf2054
    @vfdifwfeljsvfghdf2054 4 года назад

    Hi, thanks for the tutorial. I keep getting this orange pop-up error message: "couldn't turn result into numeric value." how do i fix it?

    • @vfdifwfeljsvfghdf2054
      @vfdifwfeljsvfghdf2054 4 года назад

      Noticed the expression error hits when the parent scale is keyframed to 0%.

    • @CampKeyframetutorials
      @CampKeyframetutorials  4 года назад

      @@vfdifwfeljsvfghdf2054 Yeah you can ignore that message. In your expression you divide by the scale. Dividing by 0 is impossible so the error pops up. but if the scale is 0, the object won't be visible, so no problem there. Cheers!

  • @zn1481
    @zn1481 4 года назад

    please help! im new to ae and last week it was working fine and when i came back now, i cant scale! i can add a keyframe but i cant see the robot thing the slanting line thing near the layer or photo, is it a window, that thing on the right side of ur layer, (layer name) (robot like thingy) (bullet like thingy) (slanting line) and the fx they arent in my ae please help! i need ur help asap! T^T i cant see any tutorials on how to fix it or stuff! please help!

    • @CampKeyframetutorials
      @CampKeyframetutorials  4 года назад

      Hey! You need to right click on the bar above your layers (where it says 'Layer Name' and 'Mode' etc) and then you can turn those icons back on! Right click and then go to: Columns -> Switches. That should do it :)

    • @zn1481
      @zn1481 4 года назад

      @@CampKeyframetutorials OMG TYSM! YOU SAVEED ME

    • @CampKeyframetutorials
      @CampKeyframetutorials  4 года назад

      @@zn1481 Awesome! :)

  • @handofdecay
    @handofdecay 6 лет назад +1

    The windmill is turning in the wrong direction.

  • @ccaallipari
    @ccaallipari 4 года назад +2

    4 minutes and 17 seconds to Scale Path and Maintain Stroke width... Thanks anyway.

  • @prathmeshmahajani
    @prathmeshmahajani 4 года назад

    Thank you!!