I'm having trouble with rendering an animation in Three.js using a mesh from MakeHuman. While the mesh loads correctly, it becomes distorted when the animation is running. Although adding a SkeletonHelper shows that the skeleton performs the animation correctly, its orientation differs from that of the mesh.
Upon loading, the mesh lies face-down while the skeleton is upright. If I rotate the mesh in Three.js to be upright, the skeleton inexplicably flips upside down. This discrepancy may be contributing to the distortion in the mesh.
Here are the steps I am following:
- Create a mesh in MakeHuman.
- Export as a Collada *.dae file.
- Import into Blender.
- Retarget to a BVH mocap file using the MakeWalk Blender add-on.
- If I preview the animation in Blender at this stage, it appears flawless.
- Following suggestions from multiple sources, I ensure there are no transformations applied to the mesh and armature.
- Export the entire scene using the Three.js exporter for Blender.
- Load the scene along with the embedded animation using the ObjectLoader.
Any assistance would be greatly appreciated. Thank you.
Update - For a moment, I managed to achieve partial success with the model animating mostly as expected (albeit with slight distortion) and both the skeleton and mesh aligning in the same direction. However, I am currently unable to replicate this achievement. It seems likely that clearance or application of rotation, location, and scale in Blender made the difference, but my attempts to repeat the process have failed. The synchronization between the skeleton and mesh is off again. Surely, this must be the root cause?
I believe I need to apply rotation and location while clearing the scale. Yet, applying location affects the status of scale. Perhaps, my understanding of Blender's workings is lacking. What is the correct procedure for resetting or applying Rot, Loc, Scale? Should these actions take place before or after retargeting to the BVH file? Is it necessary to perform these actions on every mesh or bone individually?