out-of-range rotations no accurate

mark_aldred
Advocate
Advocate

out-of-range rotations no accurate

mark_aldred
Advocate
Advocate

Can someone confirm this for me and help me find the reason it's happening?..

 

1. create point

2. animate Z rotation 360 degrees at frame 20 with tangents set to linear

3. set out-of-range to linear out for rotation Z track

4. move to frame 40 and read the Z rotation value

 

I get a 0.022 degree drift every 360 degrees and I have no idea why. I'm pretty sure I've looped rotation like this in the past without any trouble.

 

Any idea what it could be?

 

0 Likes
Reply
Accepted solutions (1)
1,153 Views
12 Replies
Replies (12)

leeminardi
Mentor
Mentor

I think the error is due to the rounding encountered with Max's single precison data base.  Coordinates, and I belive angles, are limited to about 7 signinficant digits.   This is due to the 32 bit database limiting the mantissa to 24 bits or 2^24 = 16,777,216 which is a bit more the 7 decimal digits.   Angles are stored in radians so your 360° rotation is exactly 18° per frame or ABOUT 0.3141593... radians. I don't know how many decimal places are used to store this angle but obviously there is some rounding which is causing the small error you see. 

lee.minardi
0 Likes

mark_aldred
Advocate
Advocate

Thanks.

Can you think of any way around it? 

I'm trying to make a loopable animation of 1800 frames where the object rotates 90 times exactly.

 

 

0 Likes

leeminardi
Mentor
Mentor

Assign a TCB Rotational controller to the object and make sure Rotation Windup is checked  Set angle to 32400 at frame 1800.

 

leeminardi_1-1706891027753.png

 

lee.minardi
0 Likes

mark_aldred
Advocate
Advocate

Thanks.

The data I'm working on actually uses a TCB controller on rotation, but for some reason the axes and angles were throwing me off. 

0 Likes

mark_aldred
Advocate
Advocate

I created a point, set the rotation controller to TCB, added keys at 0 and 1800, then set the angle. The point rotated perfectly around local Z. The object need to be tilted in the final animation (which is why I was using TCB in the first place), so I tilted it 25 degrees.

 

I thought I understood TCB, but obviously I don't. I've attached the keys for 0 and 1800. I have no idea why this works. the angle for key 0 is the tilt. The angle for key 1800 is the rotation around Z. At the risk of getting an involved mathematical explanation .... what is going on?

0 Likes

leeminardi
Mentor
Mentor

The x, y, z, values of the TCB controller are the unit vector defining the direction of the rotation axis not the angle of rotation.  It's not clear in what direction you want the 25° tilt at the end of the animation.   Can you post a file showing the initial orientation of the point and the final orientation?

 

lee.minardi
0 Likes

leeminardi
Mentor
Mentor

 

 

lee.minardi
0 Likes

mark_aldred
Advocate
Advocate

Point001 is rotated 32400 degrees around Z. Point002 is just a copy that's been tilted 25 degrees around Y.

 

 

0 Likes

leeminardi
Mentor
Mentor

Is you goal then to have a point orthogonal to the world (i.e., the local xyz axes parallel to the world xyz axes) in frame 0 and then have an orientation for frame 1800 with the z axis pointing 25 degree in the world -x direction measure in the xz plane having rotated 90 times about its local z axis? 

lee.minardi
0 Likes

mark_aldred
Advocate
Advocate

Point002 is what I need. It's just I'm having trouble understanding exactly what's going on with the TCB controller. Those two key images I posted, how the angles relate to the axes. I'm not sure how frame 0 angle can show the 25 degree tilt around Y, but then frame 1800 shows the 32400 degree rotation around a different axis. It's baffling.

 

I appreciate the help.

Thanks.

 

0 Likes

leeminardi
Mentor
Mentor
Accepted solution

The value x = -.423 is the sine of 25 degrees and z = 0.906 is the cosine.  So -0.423,0,0.906 is the unit vector axis of rotation to get between the orientation of the two points.

 

I think the approach  yoou should take if I understand your goal is to create a dummy coincident with the point and link the point to it.  Then keyframe a TCB rotation of angle 32400 about vector 0,0,1 and for the dummy with Euclidean rotation set a rotation for y rotation of 25 degrees.  This will yield 90 rotations of the point while it at the same time rotates from straight up to an invclination of 25 degrees about the dummy's y axis.

 

lee.minardi

mark_aldred
Advocate
Advocate

Thanks. I'll try that.

0 Likes