Weird shit abounds once more
Okay so I have this testing scene for the Beckett Engine, and earlier today I had the idea to try and load camera and light positions from FBX files.
45, 0, and 112 degrees.
Using UFBX to load this, I see a camera node whose local_transform.translation is a vector3 with values [58.19, 63.91, -19.02] which is almost the correct values. Y and Z are switched, and the new Y is inverted. This is probably to be expected — Blender is Z-up but OpenGL(?) is not, it's Y-up.
More importantly, local_transform.rotation is a quaternion but my camera class takes a vector3 of Euler angles.
Handily, there's also the euler_rotation field. That's explicitly called out by the UFBX manual to be in degrees... but its values are [-15.94, -164.64, 47.16], nowhere close to [45, 0, 112].
As a quaternion, local_transform.rotation is [0.17, 0.37, -0.90, -0.07], which is nowhere near what Blender says it should be, [0.517, 0.213, 0.317, 0.765] (both in WXYZ order). And again, I need that converted to Euler angles.
It's a pretty handy feature to have, and a shame if it had to tossed out.
I should note that I did attempt to use these fields, and the results were not at all correct. Ignoring things like Y-up, they were just plain wrong. And manually setting the camera rotation to [0,45,112] does result in a basically correct image.












