donmccurdy / three-gltf-viewer

Drag-and-drop preview for glTF 2.0 models in WebGL using three.js.
https://gltf-viewer.donmccurdy.com/
MIT License
2.13k stars 537 forks source link

Blendshapes does not quite work #108

Closed enzyme69 closed 6 years ago

enzyme69 commented 6 years ago

I tested a simple blendshape, shapekey animation on a simple animation made in Blender, it works fine: simpleanim.zip

However, when I tested with this head face shape with 51 blendshapes, the animation does not work. The blendshape/shapekeys information are there:

HeadAnim.zip

donmccurdy commented 6 years ago

See https://github.com/donmccurdy/three-gltf-viewer/issues/106 — I think this is the same issue. There are more than 16 morph targets / shape keys active on the HeadAnim model. In this case only 4 will work at a time, because the model also uses morph normals. If you disable morph normals and morph tangents when exporting from Blender, you can raise that limit to 8. But in any case, no WebGL engine can support more than 16 morph targets on the GPU, engines would have to use (much slower) options of playing morph targets on the CPU instead. I don't know the limits of native engines, but I tried one and it didn't play correctly either.