facebookincubator / FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.
Other
2.1k stars 332 forks source link

Morph Target/ Blend Shape Names are missing #177

Open ehs035 opened 5 years ago

ehs035 commented 5 years ago

The morph target/ blend shape names are missing after I converted my fbx file to gltf. The fbx file was exported from Character Creator 3.0.4 I can see the morph target names if I use Blender GLTF exporter. I have more that 70+ morph targets and need the names for my facial animations.

I'm running FBX2glTF-windows-x64.exe -b filename.fbx

screenshot

Thanks for your help

ehs035 commented 5 years ago

I think this not related to https://github.com/facebookincubator/FBX2glTF/pull/122 the names are populated correctly. The problem is the missing extras implementation.

@zellski I tried all the repos and it still doesn't work. I generated a gltf to take a look at the source:

{ "componentType": 5126, "type": "VEC3", "count": 12024, "bufferView": 226, "byteOffset": 0, "min": [ -0.00830205157399178, -0.00209554191678762, -0.00139282224699855 ], "max": [ 0.00832692626863718, 0.00691405776888132, 0.00883682258427143 ], name": "Mouth_Smile" },

The morph target has a name but when I load this with GLTF loader from THREEJS the name is not there.

image

Doesn't the GLTF loader uses the extras property to set the names? image

Here is a sample created with the blender exporter and it works: "meshes": [ { "extras": { "targetNames": [ "Tongue_Out", "Tongue_Curl-U", "Tongue_Narrow", "Tongue_Lower", "Tongue_Raise", "Tongue_Curl-D", "Tongue_up" ] }, "name": "CC_Base_Tongue", "primitives": [ ] } And here is the sample from the fbx2gltf converter: "meshes": [ { "name": "CC_Base_Tongue", "primitives": [ ]

}

zellski commented 5 years ago

Reply here: https://github.com/facebookincubator/FBX2glTF/pull/122#issuecomment-482918774