Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Rotating a sign on the Y axis

  • Rotating a sign on the Y axis

    Posted by Alex Dinnin on April 7, 2008 at 3:57 pm

    OK.. Picture this..

    I have a sign that needs to spin round its pole on the Y axis.

    I have shifted the signs anchor so it is in the centre of the pole, and am using 3d rotation in y.

    I am looking for an expression that when the sign is spinning round the back, the pole is in front, and when it is spinning round the front.. the pole is behind.

    So I just need two pole layers. one above the sign and one below . And a linear expression on the top layer.. but I am really struggling. any help would be great !!

    thanks in advance

    Alex

    Dan Ebberts replied 18 years, 3 months ago 3 Members · 5 Replies
  • 5 Replies
  • Filip Vandueren

    April 7, 2008 at 4:07 pm

    I’m not sure if I’m following ?

    If your two layers are 3D, then the pole should automatically appear to be in front of the sign, when it’s swiveled behind it.

    Perhaps you’re applying effects to the pole that break the 3D pipeline.

  • Alex Dinnin

    April 7, 2008 at 4:16 pm

    ok.. sorry didn’t explain myself very well..

    the pole is made using cc cylinder… I really don’t want this to rotate in 3d space. as this needs to look solid.. and everything is rotating around it..

    does this make more sense ?

  • Dan Ebberts

    April 7, 2008 at 5:33 pm

    Maybe you could make a copy of your post layer to use as a track matte for your sign and add an expression like this to the track matte’s opacity:

    yRot = Math.abs(thisComp.layer(“sign”).transform.yRotation%360);
    if(yRot > 90 && yRot < 270) 0 else 100 Dan

  • Alex Dinnin

    April 8, 2008 at 8:39 am

    Thanks ever so much Dan, that is exactly what I was trying to do.

    I had managed it to rotate 360 degrees, and the pole to over lap but as soon as it did one revolution it stopped working.

    I was obviously going down the wrong route with a lin (t,0,0).

    what part in your expression, tells it continue after one revolution.. so lets say I rotated it 690 degrees.. your carrys on working..

    so much to learn !!! so little time..

    thanks again !!

    Alex

  • Dan Ebberts

    April 8, 2008 at 1:06 pm

    The key is the modulo 360 division (%360) that keeps the values to less than one revolution.

    Dan

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