Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Auto orient expression

  • Auto orient expression

    Posted by Peter Menich on October 31, 2007 at 8:16 am

    Hi All,

    I’m trying to do a 3D arrow in AE using 3D Stroke.

    I’ve set up a null on a motion path and pick whipped the position to the arrow head sucessfully, but I’m having trouble with the orientation.

    I’ve tried Dan’s expression to ‘reveal’ the orientation so its pick whippable,

    https://forums.creativecow.net/readpost/227/42

    but I’m having a couple of problems with it…

    1) it seems to alter the alignment of the null object.

    2) the motion path is a spiral, so I’m getting the old gimbal lock flipping thing – which try as I might I can’t find a solution to online anywhere.

    I’ve tried using a camera instead of a null, so I can use the point of interest to look at a null a few frames ahead, but when I apply the expression it alters the alignment.

    Any ideas where to go next?

    AE7

    Peter Menich replied 18 years, 6 months ago 2 Members · 9 Replies
  • 9 Replies
  • Dan Ebberts

    October 31, 2007 at 1:17 pm

    Which layer are you applying the expression to? From your description, it sounds like you should be applying it to the arrow head.

    Dan

  • Peter Menich

    October 31, 2007 at 2:11 pm

    Hey Dan,

    Yeah, I am applying it to the arrowhead, but its a 3D Stroke object.

    So I need to pick whip the nulls orientation to the transformations within 3D Stroke effect rather than the layer transformations.

    Here’s a link to the reduced project…

    https://www.zedzero.co.uk/Arrow_Project.aep.zip

    Does this make sense?

  • Dan Ebberts

    October 31, 2007 at 3:01 pm

    You don’t want to apply that expression to Null 1. You could create another 3D null (Null 2) and apply the expression to that null’s orientation. Then link the 3D Stroke rotation properties to the corresponding Null 2 orientation. That should work.

    Dan

  • Peter Menich

    October 31, 2007 at 3:37 pm

    I may be being dumb here (its possible!)

    But how does that differ from what I’ve already got?

    If I create a new Null (Null 2) with a motion path and add Auto Orient, and add your expression to the orientation parameter; won’t I just have the same thing as Null 1?

  • Dan Ebberts

    October 31, 2007 at 3:42 pm

    No motion path, no auto orient – just create the null, make it 3D, apply the expression (so that it picks up the orientation of Null 1) and link the 3D Stroke rotation to it.

    Dan

  • Peter Menich

    October 31, 2007 at 4:15 pm

    Ah, Gotcha!

    It works!

    except that it doesn’t!

    I think because 3D Stroke doesn’t have an ‘orientation’ parameter, and I’m doing individual links from the 3 rotation parameters, its getting cocked up because of the difference between rotation and orientation (which is something I’ve yet to fathom)

    Sorry to be a pain in the arse Dan – but any other ideas?

  • Dan Ebberts

    October 31, 2007 at 4:24 pm

    Hmm…. it works for me (with your project). Do your rotation expressions look like this?

    for x:

    thisComp.layer(“Null 2”).transform.orientation[0]

    for y:

    thisComp.layer(“Null 2”).transform.orientation[1]

    for z:

    thisComp.layer(“Null 2”).transform.orientation[2]

    Dan

  • Peter Menich

    October 31, 2007 at 4:35 pm

    Yeah, it works like that.

    But the arrow head is then flat against the null.

    I need to add some extra rotation to get the ‘sharp end’ pointing in the direction of travel.

    As soon as I add some extra rotation like this…

    thisComp.layer(“Null 2”).transform.orientation[0]+90

    it gets screwy!

  • Peter Menich

    October 31, 2007 at 4:39 pm

    Sussed it!

    I just change the orientation[0] of Null 1 to 270 and bingo! we’re in the tulips.

    Cheers Dan – as always, you rock

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