Hi

Me and Tobias are working on integrating JOPS - http://jops.softmed.org/ - into jMe and basically all is done except some alpha blending and rotation issues.

My problem is with the Matrix4f. JOPS uses openmali, a math library where as jMe has its own math library. So basically I have the same classes - Vector3f, Matrix4f, Quaternion, etc - for each math library.

I am passing some vectors from jMe to openmali without any issues.

But with rotation matrices, it's an all different story. If I export a jMe rotation matrix - Matrix4f - to a float[16] and then get an openmali Matrix4f to read from that same float array, and use it, the rotation is wrong.

I've also tried to set the jMe rot matrix values to a quaternion and then set the values to an openmali quaternion and still it doesn't work.

The same quaternion factors produce different results with different quaternion implementations.

Considering the math is the same and other classes work fine, this should work too.

But something is different. Is there any detail about jMe quaternion's or rotation matrices or Matrix4f that i am missing ? Has anyone have any experience in converting jMe's quaternions to openmali's quaternion's ? Or rotation Matrix4f's ???

Any help would be greatly appreciated.

Could it be the XYZ values not matching up, like many model imports?

The jMe quaternion has the following parameters:

x y z w

And the openmali quaternion has the following parameters:

a b c d

Directly setting them in that order gives the same result has using a float array to pass data between the Matrix4f implementation of both libraries.

I've tested changing order to no effect.

There must be something different, either on the math implementation or the values used. Maybe one uses radians and the other degrees or something…