FBXLoader: wrong transform on DAZ3D models

Description of the problem

Dear Ladies and Gentlemen,

We struggle with three js, DAZ3D and Mixamo, to release a new web browser game, it looks like the current blocker is in mixamo exporter or three js fbx importer (more likely).

As all mixamo’s objects works with three js FBX loader we’ve decided to firstly export a FBX model to Mixamo from Daz Studio and then from Mixamo to Three JS to make process clear and to preserve formats compatibility.

However. In Mixamo, our FBX model works perfectly, but when we export it to Three JS from Mixamo, it looks very bad, however animation is recognized and some kind of animation is ongoing, but head, legs etc. are not in the proper place.

If you like “The Thing” from John Carpenter, then you will know what I mean 😉

Please see attachments for details 👍
https://drive.google.com/open?id=1fBJX4v7T_lQ54f8wlGPTqr-3EZjs8Q9z

Attachment contains 2 models (one imported to mixamo, one exported from mixamo) and videos showing how well model behave in mixamo and how bad it looks in three js.. 🙁

Thank you !

Three.js version

Latest greatest!

Browser
  • All of them
  • exclude internet explorer as it’s not compatible with the fbx loader..
OS
  • All of them
Hardware Requirements (graphics card, VR Device, …)

none..

Best Regards,
Karol

Software Architect
www.artificialworldsltd.com

Author: Fantashit

6 thoughts on “FBXLoader: wrong transform on DAZ3D models

  1. The model “Atlantya(exported for Mixamo).fbx” is the model exported from Daz3D right?

    There are a number of warnings regarding the Euler Rotation order when I try to load that:

    THREE.FBXLoader: unsupported Euler order: XZY. Currently only XYZ order is supported. Animations and rotations may be incorrect.

    This is actually the first model that I’ve come across in the wild that has non XYZ Euler order, so I had put this fairly far down on the list of things to implement. I’ll take a look, but in the meantime if it’s possible, change the Euler rotation order to XYZ in Daz3d or another modelling program.

    Alternatively, try using FBX2glTF to convert the final file to glTF and see if that works better.

  2. The whole thing is broken and it only works because it malfunctions.

    This function is derived from a function called CalculateGlobalTransform and as the name suggest it’s for getting global transformations. But if I understand correctly it’s used here to extract local transformations. So why does it even work?

    It only works because it’s broken. The line below actually wipes the parent matrix lParentGX and overwrites it with just defiend, empty lParentGRM
    lParentGX.extractRotation( lParentGRM );
    compared to the source code in Autodesk docs it should be
    lParentGRM.extractRotation( lParentGX );

    Both are now empty matrices. After setting this to the correct order everything turns into a total mess. That’s because global transforms applied as local now work and it’s all broken.

    I was thinking about reverting to the old function but this function seems to add support for pivots. So instead I found that adding lPostRotationM inversion like in the old generateTransforms function, while retaining that malfunctioning(empty) lParentGX fixes the whole thing

    lPostRotationM.getInverse(lPostRotationM);

    above this line
    // Pivots and offsets

  3. This function is derived from a function called CalculateGlobalTransform and as the name suggest it’s for getting global transformations. But if I understand correctly it’s used here to extract local transformations

    It’s entirely possible that this function is being wrongly applied. I would welcome additional eyes on this as it’s a complex part of the code and I don’t think it’s been examined by anyone except for me when I wrote it. If you create a PR with a fix I’ll review it and test against the collection of FBX models that I’ve gathered while working on the loader.

Comments are closed.