@Kaelthas The blender importer Ipo class applies a degreeToRadiansFactor to object rotations. But in my tests, the rotation values are already in radians and need to be used as-is.
e.g. see this example cube-ipo-applied.blend
The box should rotate a full 90 degrees, but it’s barely rotating. Patching Ipo.java to not apply that factor makes it work properly.
Separately, it seems like any object transformations that aren’t keyframed are reset to their untransformed values. e.g. see cube-ipo.blend - it’s the same as the above but rot/loc/scale have not been applied to the box. So on the first frame of the animation, the box reverts to 1x1x1 (i.e. the scale transform is lost). In this case, the keyframe is only LocRot - but I would expect the existing scale transform to remain and not be removed. Applying all transforms (as in cube-ipo-applied.blend above) fixes that.
Here’s the patch to Ipo.java to use the rotation values as-is:
[patch]Index: src/blender/com/jme3/scene/plugins/blender/animations/Ipo.java
===================================================================
— src/blender/com/jme3/scene/plugins/blender/animations/Ipo.java (revision 9710)
+++ src/blender/com/jme3/scene/plugins/blender/animations/Ipo.java (working copy)
@@ -141,7 +141,6 @@
float[] objectRotation = new float[3];
Vector3f[] scales = new Vector3f[framesAmount + 1];
float[] scale = new float[] { 1.0f, 1.0f, 1.0f };
-
float degreeToRadiansFactor = FastMath.DEG_TO_RAD * 10;// the values in blender are divided by 10, so we need to mult it here<br />
// calculating track data
for (int frame = startFrame; frame <= stopFrame; ++frame) {
@@ -169,17 +168,17 @@
// the value here is in degrees divided by 10 (so in
// example: 9 = PI/2)
case OB_ROT_X:
- objectRotation[0] = (float) value * degreeToRadiansFactor;
+ objectRotation[0] = (float) value;
break;
case OB_ROT_Y:
if (fixUpAxis) {
- objectRotation[2] = (float) -value * degreeToRadiansFactor;
+ objectRotation[2] = (float) -value;
} else {
- objectRotation[1] = (float) value * degreeToRadiansFactor;
+ objectRotation[1] = (float) value;
}
break;
case OB_ROT_Z:
- objectRotation[fixUpAxis ? 1 : 2] = (float) value * degreeToRadiansFactor;
+ objectRotation[fixUpAxis ? 1 : 2] = (float) value;
break;
// SIZE
[/patch]