Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Proximity of 3D layers expression: when x=x then z=N

  • Proximity of 3D layers expression: when x=x then z=N

    Posted by Damian Kemp on March 22, 2020 at 3:48 pm

    Hi,

    I’m trying to find custom code but probably searching for it the wrong way so I would like some technical help.

    I have a 3D null that moves from left to right across my comp. I also have an array of layers that I want to reference the null’s X position only as it moves across the comp window. When the layer and nulls’ X are equal the layer’s Z position will change (to a given slider value) and go back to it’s original value after.

    Example
    Keyframe 0: Null (-500,600,5000) – Layer (-10,600,5000)
    Keyframe 49: Null (-10,600,5000) – Layer (-10,600,100)
    Keyframe 99: Null (500,600,5000) – Layer (-10,600,5000)

    I also would like to able to define the layer’s Z animating position to be linear/ease etc and the amount of keyframes this is active over e.g. 25/50/100 frames before and after.

    I imagine this is similar to Dan Ebberts proximity detector but although I have been using expressions for over 10 years I’ve never looked into how to raw code.

    I could hand code this but client’s change their mid all the time, plus I like expressions! Any help is greatly appreciated.

    Thanks,
    Bearwolf

    bearwolfstudios.co.uk

    Tomas Bumbulevičius replied 6 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Tomas Bumbulevičius

    April 4, 2020 at 9:59 am

    Hey Damian, old thread, maybe you sorted out it already.

    Few clarifications:
    1. When the layer and nulls’ X are equal – basically, this does mean only the fact, that animation start point should happen after this condition is met? Because – equal condition itself will be only for a glimpse of a second.
    2. Z layer position size – you said its based on a given slider value. Will it be a single value?
    3. How many layers you planned to have in a comp? What their role in the scene? Are they just sitting there and waiting for value to move?

    Cheers!

    Find out more:
    Motion Graphics Design & After Effects Tutorials
    On YT
    On VH

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