Im trying to get the absolute transforms of a gltf animation using exposejoint, to apply them to a ragdoll in pybullet.
The ragdoll is basically a copy of my original model, however in the ragdoll, all rotations are the identity quaternion [0.0, 0.0, 0.0, 1.0] (in my coordinate system up) by default in tpose, whereas if i look at the original gltf in blender, i see that the bones actually follow the character model in tpose.
I figured i would apply the inverse of the rest pose quats to nullify their impact on the animation.
Ive been bashing my head into finding the correct conversion formula for about 2 days, to get the absolute quaternions from gltf into pybullet, and i still have not succeeded. The truth is, i have no idea how to actually get the gltfs rest pose quats.
I tried so far to simply get exposeJoints quats before calling a actor.pose and getJointTransform(“modelRoot”, joint.name).
Where do i find the rest pose bone rotations in order to apply its inverse to the animations rotations?
Or broader, how do i get the models animation relative to my own rest pose?
(Also, has the gltf issue with rotated axes been fixed…? I saw it last mentioned in 2023. It seems the number of possible formulas is increasing exponentially the more “possible” fixes and variables are found or required. I just really need a reality check to stop my head from exploding.)
Hmm… After calling “actor.pose”, have you tried calling “actor.update(force = True)” in order to, well, force it to update before getting the joint quaternions?
What sort of values do you get if you simply call “getQuat()” on the joints that you expose…? (When the Actor is un-posed, simply as initially loaded.)
(Also, by the way, I just noticed that you’re new here! Welcome! I hope that you find your time on the forums to be positive! )
(The armature in blender seems to be rotated forwards by 90 degrees btw. In case that solves some confusion. Im using a mixamo model so it came like this.)
I would guess that these would be the values to use, as they should represent the values before any changes have been made to the model, and thus the “resting” values.
Do you mean that you want the axis and angle of rotation? If so, then I don’t think that that’s what you get by default from a Quat–by default, it outputs as (a), i, j, and k, I believe.
That I’m afraid that I don’t know, offhand. The manual doesn’t seem to detail it, and I don’t think that it’s something that I’ve worked with. :/
Ahh unfortunate, but i might not need to know. Thanks for your help! Should i leave the question as unresolved for now, in case someone wants to have a crack at it?