Weird joint rotation interpolation (bug?)

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
deadbeef
Posts: 14
Joined: Thu Apr 08, 2010 11:09 am

Weird joint rotation interpolation (bug?)

Post by deadbeef »

I dont know if anyone noticed it but when irrlicht does joint rotation interpolation the animation "flickers".

What i mean by "flickers":
When i slow down my animation x1000 (it barely moves) i can see that "flickers" are not really "flickers" but a very fast rotations by 360 degrees especially at my Root joint.
That fast rotations are impossible to do with my animation (x1000 slower) but irrlicht just do them i dunno why.

My animation is 100% correct because it works perfectly fine in MilkShape.
I have tested many importers like ms3d, b3d, ogre format and my own selfmade exporter/importer. Each one gives the same effect.

When i disable the Interpolation then that "flickering" doesnt appear.
I just overrided it for test here:

Code: Select all

const SRotationKey& KeyA = RotationKeys[foundRotationIndex];
const SRotationKey& KeyB = RotationKeys[foundRotationIndex-1];

const f32 fd1 = frame - KeyA.frame;
const f32 fd2 = KeyB.frame - frame;
const f32 t = fd1/(fd1+fd2);

//rotation.slerp(KeyA.rotation, KeyB.rotation, t);
rotation = KeyA.rotation;
It looks like some wrong angle calculation and i the "longer way" is choosen to rotate the joint (360 deg). Im not sure about that.

It happens in single model+animation case the same as EJUOR_CONTROL + useAnimationFrom animation.

I have tested in on 1.6 version and SVN lastest. Both gives the same result.

Here i attach my model + animation:
http://www.sendspace.com/file/zddlhv
(You have to enable EDS_SKELETON to see animation file)

Does anyone has any idea why is that happening ?
Im preety sure its some irrlicht bug.
Post Reply