<h5 dir="auto">Description of the problem</h5>
<p dir="auto">Three is a bug in FBXLoader with animation .When I run the example webgl_loader_fbx.html,only changing the Samba Dancing.fbx to man.fbx(already attched to this issue.), the animation is different from what opened in 3dmax. The right animation is that the man is walking normally.</p>
<p dir="auto"><a href="https://github.com/mrdoob/three.js/files/3754016/man.zip">man.zip</a></p>
<h5 dir="auto">Three.js version</h5>
<p dir="auto">106dev</p>
<h5 dir="auto">Browser</h5>
<p dir="auto">only tried on chrome and firefox</p>
<h5 dir="auto">OS</h5>
<p dir="auto">windows</p>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">The FBXLoader does not work with many skeleton animations. e.g., from Mixamo.com. One example from Mixamo that fails is the following:</p>
<p dir="auto">Character: WHITECLOWN N HALLIN<br>
Animation: SAMBA DANCING</p>
<p dir="auto">You can get this model by downloading it from Mixamo directly but I have also attached it to this issue.<br>
<a href="https://github.com/mrdoob/three.js/files/2375109/WhiteClownSambaDancing.zip">WhiteClownSambaDancing.zip</a></p>
<p dir="auto">Here is the displayed result using the webgl_loader_fbx.html sample in THREE v96 modified to load the WhiteClownSamaDancing.fbx:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9258904/45424827-4c1d4300-b65d-11e8-89ff-e599e2887b26.png"><img src="https://user-images.githubusercontent.com/9258904/45424827-4c1d4300-b65d-11e8-89ff-e599e2887b26.png" alt="whiteclownsambadancing_fbxloader" style="max-width: 100%;"></a><br>
<em>Screen shot using webgl_loader_fbx.html</em></p>
<p dir="auto">Here is the same FBX file displayed in AutoDesk FBX Review:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9258904/45425263-71f71780-b65e-11e8-8256-11a798ecefef.png"><img src="https://user-images.githubusercontent.com/9258904/45425263-71f71780-b65e-11e8-8256-11a798ecefef.png" alt="whiteclownsambadancing_fbxreview" style="max-width: 100%;"></a><br>
<em>Screen shot using AutoDesk FBX Review</em></p>
<p dir="auto">There are many other Mixamo character/animations pairings that work fine with the FBXLoader but many that do not. It is possible (though not confirmed) that the ones that fail were created with Maya (this has been stated as a possible problem in some other issues).</p>
<p dir="auto">Also, the WhiteClownSambaDancing.fbx file loads correctly in many other software including the Mixamo site itself and <a href="http://www.open3mod.com/" rel="nofollow">http://www.open3mod.com/</a>. The later is fully open source so you can see the exact code they use to perform the node/bone transforms and animations. They actually use AssImp for their conversion and you can see the exact code there. In particular, see the following for their FBX import 3D transform handling:</p>
<p dir="auto"><a href="https://github.com/assimp/assimp/blob/master/code/FBXConverter.cpp#L644">https://github.com/assimp/assimp/blob/master/code/FBXConverter.cpp#L644</a></p>
<p dir="auto">After digging into the FBXLoader code a bit, it seems there may be several areas where the issue could lie:</p>
<ul dir="auto">
<li>There does not seem to be any code to honor the FBX inherit type on the nodes.</li>
<li>There does not seem to be any code to implement rotate/scale pivot points on the nodes (NOT the geometry transforms which are implemented).</li>
</ul>
<p dir="auto">The following code from the AutoDesk FBX SDK may be of some help for implementing both of the above, esp. the code and comments in CalculateGlobalTransform():</p>
<p dir="auto"><a href="http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/index.html?url=cpp_ref/_transformations_2main_8cxx-example.html,topicNumber=cpp_ref__transformations_2main_8cxx_example_htmlfc10a1e1-b18d-4e72-9dc0-70d0f1959f5e" rel="nofollow">AutoDesk FBX source code Transformations/main.cxx</a></p>
<p dir="auto">There are some other THREE.js issues which have not been fully addressed regarding incorrect FBX animations loaded via the FBXLoader (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="248221666" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/11895" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/11895/hovercard" href="https://github.com/mrdoob/three.js/issues/11895">#11895</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="301439158" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/13466" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/13466/hovercard" href="https://github.com/mrdoob/three.js/issues/13466">#13466</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="312925659" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/13821" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/13821/hovercard" href="https://github.com/mrdoob/three.js/issues/13821">#13821</a>). This issue is about improving the FBXLoader, not a particular file or asset pipeline. Please do not suggest use of FBX2GLTF (which just bakes the animations) or other converters.</p>
<p dir="auto">Also, we are willing to provide some help with design and coding, if need be, but doing a full solution with a PR is beyond our bandwidth at this time (ping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/looeee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/looeee">@looeee</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Kyle-Larson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Kyle-Larson">@Kyle-Larson</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/takahirox/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/takahirox">@takahirox</a> ?).</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r96</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>
<h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>