FBX Blend Shape

fbx-loader
animation
morph-targets

#1

Hi, guys!

I can not use Blend Shape using FBX. I am not able to access the MorphsTargets in fbx geometry

What I want to do is like this example (https://threejs.org/examples/webgl_animation_skinning_morph.html), but I can not replicate it with fbx.

Is there a way to do this using fbx?

My model only play the basic animations, moving body, arms, etc. But don’t Blend Shapes of the facial expression


#2

THREE.FBXLoader does not support morph targets or blend shapes. You’ll need to use another format. Using glTF and THREE.GLTFLoader would be my suggestion, you can create one with FBX2GLTF or the glTF Blender exporter.


#3

one off-topic question, the morph-targets animation , is it keyframe-based animation , like adobe flash ?


#4

Just a quick update on this - FBXLoader does now have support for morph target / blend shapes.

@Liu_Hao yes, FBX animations are keyframe-based.


#5

Great!

Do you have an example to apply it? I set the morphTargetInfluences array 0 to 1 but it did not work.

 if (child instanceof THREE.Mesh) {
					        
    child.material.morphtargets = true;

    child.morphTargetInfluences[0] = 1;
    child.updateMorphTargets();
}

[EDITED 07/31/2018]
This worked.


#6

My blend shapes work in Unity but I can’t figure out how to add them in three.js.

Here’s my mesh debug:

I’ve been comparing it to the examples and I don’t seem to have mesh.geometry.morphTargets in my data. Is there another way to grab them or will it require editing of the FBX loader? I’m publishing from Maya.

Here’s an fbx file to test with: online_ex.fbx (141.3 KB)