Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How can I parent the position of a 3D light to the position of a 2D null?

  • Juan Salvo

    March 14, 2012 at 1:34 pm

    Not if you want the 3d light to interact with a 3d object (plexus) while existing in a 3d world and affected by a 3d camera. In that case you need to position the like inside of 3d space not 2d. I will say that if you aren’t using lux or other plugin to make the light visible then you have a lot of forgivenesss for the position of the light. So hand positioning it should work.

  • Jordan Shipman

    March 14, 2012 at 3:34 pm

    What if the light doesn’t have to interact with a 3D object in a 3D world affected by a 3D camera? What if I just want the light to use the same comp space as the 2D null? Essentially I would be making a 3D light “2D.” But it would still be a “light” object. Is this possible? That seems easier! Thankyou so much for your time and help.

  • Dan Ebberts

    March 14, 2012 at 6:58 pm

    Sorry to jump in late on this, but I think you just need the seldom-used fromCompToSurface() transform. Try this for your light’s position:

    L = thisComp.layer(“Null 1”); // your 2D null
    value + fromCompToSurface(L.position);

    Dan

  • Jordan Shipman

    March 14, 2012 at 7:50 pm

    Thanks fo the response Dan! Hopefully I can get somewhere with this.

    here is what I typed in on the lights position:

    L = thisComp.layer(” My Null”);
    value + fromCompToSurface(L.position);

    After effects gives me this error:

    Couldn’t project comp point onto layer in fromCompToSurface

    Any thoughts?

    Thanks for your help?

  • Dan Ebberts

    March 14, 2012 at 8:20 pm

    Ah yes. That’s probably because a light doesn’t have an anchor point. Can you put a 3D null at the same position as the light, parent the light to the null, and apply the expression to the null?

    Dan

  • Juan Salvo

    March 14, 2012 at 8:41 pm

    That’s a clever work around Dan. But won’t that stop working when the cameras z position moves?

  • Dan Ebberts

    March 14, 2012 at 8:43 pm

    I would expect it to work since the comp view is the camera view, but you’d have to try it to be sure.

    Dan

  • Jordan Shipman

    March 14, 2012 at 9:10 pm

    YES! AWESOME! Works perfectly the way I need it to! Thankyou so much Dan!!!! And thankyou for your help as well Juan! I really appreciate it!

  • Juan Salvo

    March 14, 2012 at 11:29 pm

    Dan deserves full credit. That was a very clever workaround he came up with.

Page 2 of 2

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