kcoley / gltf2usd

command-line utility for converting glTF 2.0 models to USD
MIT License
264 stars 38 forks source link

GLTF animation looks correct but USDZ is out of whack #120

Closed enzyme69 closed 5 years ago

enzyme69 commented 5 years ago

Not sure what causing this issue of bone animation got separated.

I have a feeling the bone rig etc was not setup properly in the Spiderman Rig itself:

Spiderman Amazing Rigged 2 2 CYCLE 009.blend 2.zip

GLTF looks correct if I use the online GLTF viewer:

exported_GLTF_issue_when_become_USDZ.zip

However as USDZ, it looks broken. Both weird on MacOS. But on iOS, the seems like the middle part of the body is separated. spiderB.usdz.zip

This is an older version, IK anim is baked to FK. Bone is "not connected", typical Blender rig. Spiderman Amazing Rigged 2 2 CYCLE 007.blend.zip

But anyhow, what I don't get is when seeing the animation looks correct as GLTF and it does not translate to USDZ.

enzyme69 commented 5 years ago

I am using Kupoman GLTF export in Blender 2.79: https://github.com/Kupoman/blendergltf

kcoley commented 5 years ago

@enzyme69 yeah looks like a skeleton export issue. I plan on running this tool against these skin glTF unit test models: https://github.com/KhronosGroup/glTF-Asset-Generator/tree/master/Output/Animation_Skin

Hopefully this would help pin down where the issue is happening.

enzyme69 commented 5 years ago

Hi Kacey, with iOS 13, usdzconvert and your tool, somewhat juggling both, I found this to be helpful:

And your tool seems to work where Apple one failed... oh well it's the hierarchy and armature thing!