Exporting Skeletal Animations as USD(A)

Alan_Kent
Sun, 05 Nov 2023 17:29:33 +0000
Questions

I have been trying to export GLB and FBX imported animations (and generated ones from Google MediaPipe) as USDA, but cannot get the bindTransforms and animation quaternions right. It plays in the web browser, the exported file does not look right in Ominiverse.

I have tried various tool chains to generate a reference to work from, but failed so far. E.g. The Omniverse version of Blender has a USD export which has been the most successful, but they are Z-up and I would like Y-up. (Maybe I should give up on that goal.)

Current code for the model

I export bone.matrixWorld as the USD bindTransforms for the model

I export bone.matrix as the USD restTransform for the model

In the SkelAnimation

I export the rotation quaternions from the GLB animation array of .values

Initially I thought this was enough - head rotations come out correctly. But then I used the retargeting example I successfully used to retarget a mixamo animation to my own model in the browser. When I export that, the head moves correctly but the rest of the arms and legs do not.

You can see the head turn the same as the “Sitting Talking” animation from Mixamo.

But clearly the rest of the character is wrong. Just wondering if someone knowledgeable with the required rotations etc knew how the maths to apply to the quaternions before export. I have tried a range of tool chains to try and get a full body reference model to work from, but after 5 different tool chains I am running out of options. (The generated animation comes out wrong, or with Blender everything is converted to Z-up which I was hoping to avoid.) I don’t know if it is the bindTransforms, restTransforms, or time coded rotation quaternions that are wrong (or all three!).

5 posts - 3 participants