CompuServe Thread

#InterpolateKey?

4 messages in this thread
#160035From: Alden V. HolmesMar 21, 1995 2:03 PM
Can someone familiar with the InterpolateKey command in Keyscripting help explain something for me? Because of some incorrect results I was getting with InterpolateKey (relative to what I thought I would get), I've been trying to figure out exactly what it does. I created a dummy object at 0,0,0 with an initial rotation of 0 at frame zero and 720 at frame 60. I ran a script that did nothing more than InterpolateKey at each frame and print out the resulting frame, angle, and axis. For frames 0-29, it gave me the results I expected. At frame 30, the angle reverted to 0 rather than the 360 I was looking for. Frames 30-45 incremented from 0 to 180. Frames 46 to 60 decremented back to 0 with the sign on the associated axis changed. Maybe it's just me, but something doesn't seem consistent here! Any insight would be appreciated.
#160052From: Jonas Ruikis [ADESK]Mar 21, 1995 2:38 PM
Hi Alden, << I created a dummy object at 0,0,0 with an initial rotation of 0 at frame zero and 720 at frame 60. I ran a script that did nothing more than InterpolateKey at each frame and print out the resulting frame, angle, and axis. For frames 0-29, it gave me the results I expected. At frame 30, the angle reverted to 0 rather than the 360 I was looking for. Frames 30-45 incremented from 0 to 180. Frames 46 to 60 decremented back to 0 with the sign on the associated axis changed. >> I get the same results here. Martin? jonas
#160081From: Alden V. HolmesMar 21, 1995 5:33 PM
Jonas, >> I get the same results here. << Thanks for … well … reassuring me that it's not just me. Actually, this doesn't even touch on my original problem with InterpolateKey. It seems very simple and I've been able repeat it but not explain it. I have two dummy objects located at 0,0,0. Dummy01 has only rotation keys, 0 at frame 0 and 360 at frame 60 (around the z-axis in K3D). Dummy02 just sits there. In Keyscripter, I use GetKey (for Dummy01) and CreateKey (for Dummy02) to duplicate the rotation of Dummy01 to Dummy02. Then I use InterpolateKey (rotation) at each frames for both objects and print the angle and axis info. Dummy01 gives me what I expected, incrementing from 0 to 360 over the 60 frames. But, Dummy02 does some strange stuff! From frame 0 to 30, it mirrors Dummy01. From there, it increases to an angle of 193.3333 at frame 35, then decreases to 180 at frame 45, and finally increases to 360 at frame 60. I've checked the two object in the keyframer to verify the rotations are the same, and they are. As a matter of fact, if I playback the 60 frames, the two objects just sit there and spin together. I just don't understand. I've got the very simplistic mesh file with the script (again very simplistic) embedded in it if anyone cares to point me in the right direction.
#160194From: Jonas Ruikis [ADESK]Mar 22, 1995 9:40 AM
Hi Alden, << I've got the very simplistic mesh file with the script (again very simplistic) embedded in it if anyone cares to point me in the right direction. >> You can e-mail it to Martin Doudoroff/KUB 74664,2144, who's company wrote all of the Script Extensions. He logs into this section frequently. jonas[adesk]