Gltf-blender-io: Imported armature issues

Created on 25 Feb 2019  路  5Comments  路  Source: KhronosGroup/glTF-Blender-IO

Hummingbird_Gltf.zip

Whenever i import this gltf file the armature comes out weird. Bones are uncorrectly sized, unconnected to the parent, and rotated.
screensht_1
screensht_2

Skinning_&_Rigging enhancement importer

Most helpful comment

Bones are rotated and sized plausibly in gltf-blender-importer. At least non-leaf bones

hum

Basically, we pick a rotation cr(b) for each bone b, and the local-to-parent T(b) for that bone is replaced with T'(b) = cr(pb)^{-1} T(b) cr(b) where pb is the parent of b. Then when you compose with the parent, T'(pb) T'(b), the cr(pb)^{-1} at the left of T'(b) is cancelled out by the cr(pb) on the right of T'(pb), and so on up the tree, so it doesn't end up affecting the end result of skinning. Then you just need to pick a cr(b) that will look good.

You have to maintain the relation between T'(b) and T(b) when you animate pose bones too.

This is probably the most annoyingly complicated thing in that importer, but see this comment about picking the edit bones and this comment about picking the pose bones during animation.

All 5 comments

I don't think there is any issue here.
"bone" object (with a head and a tail) has no equivalent in glTF (where you can find "joint"). That means that :

  • There is no size stored in glTF, because a joint is ponctual
  • bones are correctly parented, but there is no notion of connection between joints (except parent / child relationship that are OK in your example file)
  • rotation seems to be legit regarding data that are glTF file
  • animation seems to be OK

I will set this issue as "enhancement", because we probably could fake some rotation on created bones to have them visually better aligned.

Thank you, I do hope it will it will be improved, so it's easier to see the structure of the bones and work with them more easily. Right now it's a bit difficult. If you need more gltf files like this i have a bunch more.

Bones are rotated and sized plausibly in gltf-blender-importer. At least non-leaf bones

hum

Basically, we pick a rotation cr(b) for each bone b, and the local-to-parent T(b) for that bone is replaced with T'(b) = cr(pb)^{-1} T(b) cr(b) where pb is the parent of b. Then when you compose with the parent, T'(pb) T'(b), the cr(pb)^{-1} at the left of T'(b) is cancelled out by the cr(pb) on the right of T'(pb), and so on up the tree, so it doesn't end up affecting the end result of skinning. Then you just need to pick a cr(b) that will look good.

You have to maintain the relation between T'(b) and T(b) when you animate pose bones too.

This is probably the most annoyingly complicated thing in that importer, but see this comment about picking the edit bones and this comment about picking the pose bones during animation.

Thank you so much! I have tried the importer and everything works fine, even the animations! Now i can work with it alot easier.

Kind regards,

Quinten

@scurest & @Quinten123

Thanks for pointing me to that algo.
I was thinking about something like that. I will implement it inside this official addon

Julien

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julienduroure picture julienduroure  路  5Comments

donmccurdy picture donmccurdy  路  3Comments

rainclaws picture rainclaws  路  3Comments

UX3D-nopper picture UX3D-nopper  路  3Comments

capnm picture capnm  路  5Comments