Three.js: FBXLoader: model with animated morph targets creates invalid animation track

Created on 31 Aug 2018  路  5Comments  路  Source: mrdoob/three.js

Description of the problem

I've encountered a problem when loading a model with animated morph targets.

There sometimes appears to be a mismatch in naming between the model's morphTargetDictionary property and the Deformer's attribute name (which becomes 'morphName'), which means that the line 2704 in generateMorphTrack returns undefined.

For example, the FBX I'm using (created in Maya) sets the morphTargetDictionary key as "pasted_pCylinder1" whereas the deformer attribute name is set to the subdeformer name "blendShape1.pasted_pCylinder1". In this case, the animation track name becomes pCylinder1.morphTargetInfluences[undefined] which obviously doesn't work!

In another example, the names are totally different so again, the track name contains 'undefined'.

Apologies if this is a little vague, I don't know a lot about the internals of the FBX format so I'm not sure what the expected behaviour/naming should be. Is it more a question of making sure the naming is more consistent before exporting from Maya?

Three.js version
  • [x] Dev
  • [x] r96
Loaders

Most helpful comment

@looeee hey again. Works like a charm on both models! Thank you so much for looking into this.

All 5 comments

Can you please share the models?

Hi there, sorry for the delay!

I can certainly share the one model. The second I'm not sure I'm allowed to share but essentially the issue is the same.

https://drive.google.com/open?id=1mfiFl17lBZy8c-6rH9GXRaXsrVOYajtZ

Thanks! I'll take a look.

@theChumpus this should be fixed in #14885. Can you test with your other model to confirm?

@looeee hey again. Works like a charm on both models! Thank you so much for looking into this.

Was this page helpful?
0 / 5 - 0 ratings