ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Rotating objects around Null Gimbal Lock problem

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Nick Huskey
Rotating objects around Null Gimbal Lock problem
on Feb 20, 2013 at 5:14:06 pm

I have an expression set up below that controls the blurriness effect when the Nulls [Rotate Control] rotation reaches inside the specified parameters.

Everything works fine when I test out the Y orientation from 0˚to 360˚ but once I keyframe the orientation of the Null I run into gimbal lock, which messes up when I want the objects that are rotating to be blurry. I don't know how to fix this or create a work around.

Also, I am not sure if this is relevant info, but I have a camera in my scene controlled by a separate Null object [ShotCam_Control]. And all 3 of my objects that are rotating around the Null are set up to auto-orient towards the camera using the Transform->Auto-Orient drop down menu.

please help

minDeg = 90;
maxDeg = 160;
easeDeg = 15;
wheel = thisComp.layer("Rotate Control").transform.orientation[1];
if(wheel &lt; (minDeg+maxDeg)/2)
ease (wheel,minDeg,minDeg+easeDeg,50,0)
else
ease(wheel,maxDeg-easeDeg,maxDeg,0,50);


Nick Huskey
CG Artist


Return to posts index

Nick Huskey
Re: Rotating objects around Null Gimbal Lock problem
on Feb 20, 2013 at 6:07:21 pm

I can change the expression to effect the yRotation like below. The only problem I face with that is after the Y rotates past 360˚ I don't know how to have the expression reflect this and still work since now it shows a 1x+0.0˚.

I also tried to plug in multiple minDeg and maxDeg like this:

minDeg = 70; 200;
maxDeg = 150; 270;

But that is not the right format because it did nothing.

Any help with this problem would be appreciated!

minDeg = 70;
maxDeg = 150;
easeDeg = 15;
wheel = thisComp.layer("Rotate Control").transform.yRotation;
if(wheel &lt; (minDeg+maxDeg)/2)
ease (wheel,minDeg,minDeg+easeDeg,50,0)
else
ease(wheel,maxDeg-easeDeg,maxDeg,0,50);


Nick Huskey
CG Artist


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]