facebookincubator / FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.
Other
2.08k stars 330 forks source link

Document how to fix eInheritRSrs error. #27

Open robertlong opened 6 years ago

robertlong commented 6 years ago

I've been looking into the transform inheritance types and can't quite figure out what this inheritance type means or how to avoid it. Could you document this?

zellski commented 6 years ago

It's tricky stuff, and to some degree we're out of the luck. They are all valid in FBX, and I assume any compliant FBX viewer is supposed to handle them correctly. But only the vanilla one can actually be expressed by glTF in a way that survives into any kind of dynamic environment.

All three of are in active use. Maya pretty reliably seems to output eInheritRrSs for root nodes, eInheritRSrs for most regular nodes, and eInheritRrs specifically for the feature called 'Segment Scale Compensate'. There is further information on this here: https://knowledge.autodesk.com/support/maya/troubleshooting/caas/simplecontent/content/turning-segment-scale-compensate-maya-how-to-make-maya-rigs-play-nice-unity.html. There's just nothing we can do to salvage a model with this inheritance structure; we simply have to communicate to artists that they are better off disabling this feature.

In practice, eInheritRrSs seems to cause no trouble; probably because I only see it appear at the root node, where of course there's no inherited parental transform to worry about.

I'll see about documenting all this better. I might add a section in the README, or save it for a future when we have an actual set of documentation pages.

Finally, heh, as I eyeball the FBX2glTF code, I think there's an embarrassing bug. We warn about eInheritRSrs, not about eInheritRrSs. That's the wrong way around, and I'll fix it.

Meanwhile, does this all make any sense? Does it rhyme with what you've read up on & seen elsewhere?

zellski commented 6 years ago

Actually, that's another improvement: no reason to warn against eInheritRrSs when parsing the root node. That'll get rid of a pointless, common warning.

zellski commented 6 years ago

Leave open for documentation change.

Alexxkrehmen commented 3 years ago

Hi, I'm trying to convert and import a FBX file into blender using FBX2glTF version 0.9.7, and I have this warning :

Warning: node /RootNode/Bunnyx uses unsupported transform inheritance type 'eInheritRrSs'. (Further warnings of this type squelched.)

Once opened into blender, the rig structure looks ok, except for the scaling and position of the root bone (Bip_Bunny) which is offseted by 85m on the Y axis in Pose Mode and Z axis in Edit Mode. Its scaling is 0.01 in Pose mode too.

I'm trying to figure out how to fix it by hand (this is more a blender thing) but having the converter fixing it from the start would be great ;) Bunnyx.fbx.zip