Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Targeting a Light at a 3D child layer // world coordinates

  • Targeting a Light at a 3D child layer // world coordinates

    Posted by Eric Chard on June 13, 2013 at 5:19 pm

    (another user suggest I repost this here….)
    I wanted to target a light at a layer, so I used the pickwhip to substitute the layer’s position for the lights POI.

    This worked fine.

    However, I wanted greater control, and the ability to fine-tune and otherwise animate the lite’s target, so I did something that would work perfectly in my 3D app, but doesn’t in AE:
    I created a Null, and parented it to the moving layer.
    I pickwhipped the Null’s position the same way I did before, for the lights POI position.

    Sadly, this did not work. In 3D terms I need the ‘world coordinates’ of the null, not the keyframed coords, since they just sit at 0/0/0.

    How can one get the light to follow the NULL, with the null parented to the moving layer?

    Since I imagine this will require expressions, I disremember how you can build an expression library so I don’t have to type/remember this technique– how is that done?

    Suggestions?

    Thanks.

    ++++++++++++++++
    “Putting the HARM in ‘harmonica’ since 2005.”
    ++++++++++++++++

    Darby Edelen replied 12 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Darby Edelen

    June 13, 2013 at 6:22 pm

    [Eric Chard] “Sadly, this did not work. In 3D terms I need the ‘world coordinates’ of the null, not the keyframed coords, since they just sit at 0/0/0.”

    This would give you the world coordinates of a layer named “Null” in your composition:


    l = thisComp.layer("Null");
    l.toWorld(l.anchorPoint);

    [Eric Chard] “Since I imagine this will require expressions, I disremember how you can build an expression library so I don’t have to type/remember this technique– how is that done?”

    There is some simple reference available for expressions if you use the fly-out menu from the expression box. This helps to explore the methods available for various object types but may not help if you’re not already familiar with expressions.

    Alternatively you can create an Animation Preset of the expression using Animation > Save Animation Preset… You’ll likely need to adjust the expression when applying the preset to new properties/new layers in new contexts.

    Darby Edelen

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