Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AE Lens flare to follow still object but react to camera move

  • AE Lens flare to follow still object but react to camera move

    Posted by Andy Gregory on September 4, 2014 at 1:01 pm

    I have a scene with a metallic object that I would like a lens flare to emit from. The object does not move i.e. it’s position values remain static. The camera, however will move (imagine a simple pan over the top looking down) which would of course affect the lens flare. Effectively having the flare source move to follow the object with regards to the camera position.

    I have tried multiple solutions after searching forums but none seem to do the job.

    I have tried…

    this_comp.layer(“Light 1”).to_comp([0,0,0])

    src=this_comp.layer(“Null 1”);
    src.to_comp(src.anchor_point)

    p = thisComp.layer(“Null 1”).transform.position;
    d = valueAtTime(0) – p.valueAtTime(0) ;
    p + d

    But none seem to work.

    Any ideas?
    Thanks

    Andy Gregory replied 11 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 4, 2014 at 3:52 pm

    Depending on what you’re doing, something like this might work:

    L = thisComp.layer(“Null 1”);
    fromComp(L.toComp(L.anchorPoint))

    Dan

  • Andy Gregory

    September 4, 2014 at 5:13 pm

    I am such a fool!
    I have been trying all these solutions and attaching the expression to my camera control null I am using rather than a new 3D null.

    The above solution works a treat.

    Thanks

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