Activity › Forums › Adobe After Effects Expressions › 3D Orientation
-
3D Orientation
Posted by Michael on June 8, 2005 at 5:42 pmhello all
I am working on a project where I need to move a camera with 3D-Auto-Orientation on a coil. It moves from outside to the center. Everytime the camera is crossing the middle (Y) of the comp the orientation flips by 180Michael replied 21 years, 1 month ago 4 Members · 5 Replies -
5 Replies
-
Mylenium
June 8, 2005 at 5:54 pm[michael] “It looks like a bug to me.”
That’s no bug, it’s a simple mathematical problem (internally rotations are calculated in radians and yield the same results every 180 degrees
, in 3D circles this is referred to as gimbal lock). Unless you use an conditional expression, you can’t really resolve this and even then it’s going to cause problems. Maybe Dan can come up with something, but it’s the end of the day for may and my brain ‘s too munched… Sorry to not be more helpful. Mylenium
[Pour Myl
-
Filip Vandueren
June 8, 2005 at 10:35 pmAs a work around,
you usually get good results if you do this:
create a 3d null layer, copy the position keyframes of your camera.
Then nudge the null a few frames earlier.
set the camera’s auto-orient to “point of interest”
Pick-whip the point of intrest to the null-layers-position.or use this expression for point-of intrest:
position.valueAtTime(time+0.2)try different values for the 0.2
The upside of the non-expression methid is that you can’t subtly alter the keyframes or their timing to get more of a “looking around whilst in the cockpit” effect, instead of the “camera bolted to a helicopter’
😎
-
Yoondo
June 9, 2005 at 1:09 amSimply speaking, I say the camera flips over because the camera body has crossed over
the POI; the POI is located halfway inside the coil. Look at your comp from multiple
views and you will see the problem. If you are doing a simple flythru, just turn off
the poi in the camera layer; the POI can throw you off sometimes.Hope this answers your question.
-
Michael
June 9, 2005 at 3:50 pmthank you all for the quick help.
I tried all your suggestions. with more or less success. but it isn
-
Michael
June 9, 2005 at 5:35 pmmy collegue here in the office;-)
if (thisComp.layer(“Green Solid 3”).position[0,1] > thisComp.layer(“Null 10”).position[0,1]) {
radiansToDegrees(Math.acos(dot(normalize(sub(thisComp.layer(“Green Solid 3”).position,thisComp.layer(“Null 10”).position)),[1,0,0])))}
else {360-radiansToDegrees(Math.acos(dot(normalize(sub(thisComp.layer(“Green Solid 3”).position,thisComp.layer(“Null 10”).position)),[1,0,0])))}don
Reply to this Discussion! Login or Sign Up