I’m trying to use Unity3D Asset Store assets for my project in THREEJS to be displayed on a WebApp. I was able to load the the model and the animation file but the resulting animation is slightly different in the limbs. In my case, the hands are raised:
The image on top is how the original model appears in Unity3D, and the bottom image shows how the model appears in my THREEJS canvas. The animation involving the body swaying and the head spinning appears correctly, it’s just the hands and the legs that appear weird.
The files I used in THREEJS are an Anim@Idle.fbx (1.4 MB) file for the animation and a BearModelOnly.fbx (415.8 KB) file for the Bear model and skeleton (without animations), which I exported from Unity3D as an FBX file. If I export with animations, the whole model gets messed up.
The original model file Bear.fbx (667.6 KB) that was imported into and used in Unity3D does not appear correctly in THREEJS (the ears appear warped), hence I’m using the exported model. I should mention that the animation in Unity3D also references another file which is Avartar_animal.fbx (311.2 KB), which I’m not using in THREEJS.
I’m not sure what I’m doing wrong. I tried opening the animation file in Blender but couldn’t find any animation (maybe I just don’t know how to use Blender). Is there a setting that I need, or a pose I need to preset or something?
I would really appreciate if someone could help point me in the right direction. If you need to see my code, let me know too. Thanks in advance.
Can you please try to export your 3D model (with animations) to
glTF instead? There are some open issues in context of
FBXLoader and animations.
Alright, I’ll try converting all the original FBX files into glTF and see if things work better. Thanks!
this tutorial may help (skipping the Mixamo parts) if you have separate FBX files for the animations and the mesh: https://www.donmccurdy.com/2017/11/06/creating-animated-gltf-characters-with-mixamo-and-blender/
Also the part about installing a Blender addon is outdated; just use Blender 2.8 and it has glTF export built in.
Thank you for the link! I went through it and I think I understand how to work with animations and meshes better now.
I loaded the animation and realized that the keyframes were in the 300 frame range and shifted them to the front. Now that I can see the animation, it seems that the position of the arms by default are already raised, as seen below:
Does that mean that I am actually animating correctly in THREE? The animation imported from the FBX file does match what I see in my THREEJS scene.
I then tried to attach the animation to the model and it got twisted:
I’m not sure what is causing this though. I tried changing the initial orientation of the model vs the animation before binding them and each time the model is twisted in a different way.
In any case I tried to load the 2 FBX (animation and model) files in an empty Unity Scene, added an Animator Controller, and linked them up bare-bones, and the animation displayed properly without using any additional settings/masks:
Could it be something about animation/pose blending that I’m missing?