Proximity Expression in After Effects

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024

ความคิดเห็น • 57

  • @Michael_Tierney
    @Michael_Tierney  3 ปีที่แล้ว +20

    target = thisComp.layer("Target");
    dist = Math.floor( length(position, target.position) );
    maxSize = thisComp.layer("Target").effect("maxSize")("Slider");
    minSize = thisComp.layer("Target").effect("minSize")("Slider");
    range = thisComp.layer("Target").effect("range")("Slider");
    sensitivity = thisComp.layer("Target").effect("sensitivity")("Slider");
    scle = linear(dist, range, sensitivity, maxSize, minSize);
    [scle, scle];

    • @graemedotwork
      @graemedotwork หลายเดือนก่อน

      Adapted to remove the repetition of thisComp.layer("Target") and to get world position of the target and layer, in case things are parented:
      target = thisComp.layer("Target");
      dist = Math.floor( length(thisLayer.toWorld(anchorPoint), target.toWorld(target.anchorPoint)) );
      maxSize = target.effect("maxSize")("Slider");
      minSize = target.effect("minSize")("Slider");
      range = target.effect("range")("Slider");
      sensitivity = target.effect("sensitivity")("Slider");
      scle = linear(dist, range, sensitivity, maxSize, minSize);
      [scle, scle];

  • @dragoscristea3782
    @dragoscristea3782 9 หลายเดือนก่อน +2

    First tutorial on this effect that didn't gave me headaches and worked perfectly smoothly. Great job man.

    • @LAUZERTV
      @LAUZERTV หลายเดือนก่อน

      100% Totally bro

  • @grhutchins
    @grhutchins 21 วันที่ผ่านมา

    Awesome content and Ctrl+double click the pan behind tool to center the anchor point 🤯

  • @1WillyDAVID
    @1WillyDAVID 3 ปีที่แล้ว +4

    Thanks man, really easy and powerful!

    • @Michael_Tierney
      @Michael_Tierney  3 ปีที่แล้ว +4

      I'm glad you enjoyed it. It sure is :)

  • @jbrizight
    @jbrizight 3 ปีที่แล้ว +4

    This is definitely easier then how I've done this before. Cool vid

    • @Michael_Tierney
      @Michael_Tierney  3 ปีที่แล้ว +3

      Thanls! and SNAP! :) I tried a few different ways and reduced it down to the least clicks possible. Glad you like it :)

  • @lewislatham661
    @lewislatham661 3 ปีที่แล้ว +4

    Absolute life saver thank you!

  • @MayankMishraG
    @MayankMishraG 5 หลายเดือนก่อน

    Have been tired of finding a simpler solution - this video came as a lifesaver. Thanks a lot, Michael! ❤ Subscribed ✅

    • @DashMatin
      @DashMatin 5 หลายเดือนก่อน

      fr

  • @moirahornik4562
    @moirahornik4562 3 ปีที่แล้ว +2

    Such a quick video. Thanks for making it so efficient!

  • @bigneism
    @bigneism 3 ปีที่แล้ว +3

    this is awesome, thanks!

  • @RobertoRodriguez-jw6or
    @RobertoRodriguez-jw6or 2 ปีที่แล้ว

    I´m loving your Domestika course.

  • @filmfoxwell
    @filmfoxwell 3 ปีที่แล้ว

    Holy F that's so cool! Didn't know what was going to happen until the end. Thanks for the tip!

  • @DashMatin
    @DashMatin 5 หลายเดือนก่อน

    fr this is amazing! and free so thank you so much man

  • @Totorus
    @Totorus 3 ปีที่แล้ว +2

    Great tutorial, thank you so much for sharing!!!... Greetings.

    • @Michael_Tierney
      @Michael_Tierney  3 ปีที่แล้ว +1

      No problem at all. Thanks for stopping by :)

  • @ivanmasalitin2394
    @ivanmasalitin2394 3 ปีที่แล้ว +5

    awesome!

  • @benmcdonnell85
    @benmcdonnell85 2 ปีที่แล้ว

    Just discovered your channel, loving your tutorials. I recognise that accent anywhere btw 😁👍🏻

  • @sebastianodibusti
    @sebastianodibusti ปีที่แล้ว +1

    Amazing tutorial 👏🏻

  • @leolego2
    @leolego2 3 ปีที่แล้ว +2

    love this

  • @psypad
    @psypad 2 ปีที่แล้ว

    Thank you. Your video is the very easy to understand.

  • @jamesbrown2285
    @jamesbrown2285 2 ปีที่แล้ว

    *Checked to see if I was subscribed. *Looks To See. Already was!!! Great Content.

  • @anonwaytech
    @anonwaytech 2 หลายเดือนก่อน

    Amazing bro hardly needed

  • @Ολεχ
    @Ολεχ หลายเดือนก่อน

    Thank you 👍

  • @JJB_77
    @JJB_77 5 หลายเดือนก่อน

    Thank you so much man!

  • @adrianfels2985
    @adrianfels2985 ปีที่แล้ว +3

    Hi Michael, could you please help me?
    What should I do if I want to only affect the y scale of an object with the proximity?
    Solution: In the last line set a value for the xScale --> [100,scle]

    • @orkedits
      @orkedits ปีที่แล้ว +1

      Thank you!

    • @adrianfels2985
      @adrianfels2985 ปีที่แล้ว

      You're welcome! @@orkedits

  • @Dante-ps9hd
    @Dante-ps9hd 2 ปีที่แล้ว

    i love your tutorials! you are doing great job!

  • @jervazfernandes2794
    @jervazfernandes2794 3 ปีที่แล้ว

    Love your work!! Please make more! don't Stop 💯

  • @pipzaman123
    @pipzaman123 10 หลายเดือนก่อน

    Thanks for this video, super handy! Curious if you can use this to drive a fill color, or if something is keyframes with 2 values and have it go from one to another? Thanks!

  • @YouAlreadyKnowBabi
    @YouAlreadyKnowBabi 2 ปีที่แล้ว

    Superb tutorial

  • @glvignesh
    @glvignesh 11 หลายเดือนก่อน

    Hi @Michael , Thanks for this great tut! One doubt is that, what needs to be modified in the expression inorder to make the objects move away from the target ?

  • @noordesign9873
    @noordesign9873 ปีที่แล้ว +1

    Hello, I have a problem. I did the same steps, but it gives me an error. Is it possible to solve it, please?

  • @olecaspersen8876
    @olecaspersen8876 3 ปีที่แล้ว

    Hi Michael. Great tutorial, thanx. Comment: How would you make ”reverse” effect?

  • @plush_unicorn
    @plush_unicorn ปีที่แล้ว

    Люблю пересматривать)

  • @adrianfels2985
    @adrianfels2985 3 ปีที่แล้ว

    Wow, how cool is this?

  • @orkedits
    @orkedits ปีที่แล้ว

    Hey Michael, is there a way to also effect the opacity of a layer based on proximity?
    Which code should I add to the expression in order to do that?

    • @orkedits
      @orkedits ปีที่แล้ว

      Never mind found a solution, you can just apply the same expression to your opacity (:

    • @orkedits
      @orkedits 11 หลายเดือนก่อน +1

      @@gregorytzelalidis6007 Hey Gregory, I've had the exact same issue and managed to fix it.
      Try using this expression on opacity:
      target = thisComp.layer("Target");
      dist = Math.floor( length(position, target.position) );
      maxSize = thisComp.layer("Target").effect("maxSize")("Slider"); //when the this object is closest, this is how big it can get.
      minSize = thisComp.layer("Target").effect("minSize")("Slider"); // how small this object can get.
      range = thisComp.layer("Target").effect("range")("Slider"); //how far can the target be before this layer starts to get bigger.
      sensitivity = thisComp.layer("Target").effect("sensitivity")("Slider"); // how fast the layer starts to scale up once the target is in range.
      scle = linear(dist, range, sensitivity, maxSize, minSize);
      [scle];
      In general, what seemed to fix the error for me and was the most important part was to:
      1. Make sure the naming of everything is correct. (minSize, maxSize, range etc...)
      2. Make sure that on the opacity layer there's only [scle]; at the bottom and no y or xscle=100 parameter.
      Let me know if that helps, if not I can go back to my files and look again.

  • @conormurphy7058
    @conormurphy7058 2 ปีที่แล้ว

    So good.

  • @SalvaRegàs
    @SalvaRegàs ปีที่แล้ว

    Hi @Michael_Tierney thanks for sharing your knowledge! Could you help me? I need to keep the original scale of the objects and then scale when the target will be close to them. Many thanks and congratulations for your work!

  • @adrianfels2985
    @adrianfels2985 3 ปีที่แล้ว +2

    The expression doesn't work for me. It seems that AE has a problem with "Slider".
    Edit: My AE was in German so the effect "Slider" in my AE has a German name called "Schieberegler" so I just put the german name in and then I searched how to set AE to english. Now I won't have any of those problems anymore.

  • @everydaysebra
    @everydaysebra ปีที่แล้ว

    how would this work if the shapes are parented to a different null?

    • @everydaysebra
      @everydaysebra ปีที่แล้ว

      Found a solution. Just parent the target to that null as well :)

  • @mehdiarjmandi5280
    @mehdiarjmandi5280 ปีที่แล้ว

    wow

  • @stardust1668
    @stardust1668 2 ปีที่แล้ว

    🙏🙏🙏

  • @Firefox6
    @Firefox6 9 หลายเดือนก่อน

    no sirve