question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FBXLoader: model with animated morph targets creates invalid animation track

See original GitHub issue
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
  • Dev
  • r96

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
theChumpuscommented, Sep 10, 2018

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

2reactions
theChumpuscommented, Sep 4, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

FBX Animations - Three.js Tutorials
In this exercise, we import a different FBX model, and we also import several animation clips for the model. We then create buttons...
Read more >
Connect Morph Targets in FBX File - Questions - three.js forum
Hello. I imported an FBX into three.js out of Blender. Everything looks fine so far. Now I want to connect the morph targets...
Read more >
FFbxImporter | Unreal Engine Documentation
Name Description void CheckSmoothingInfo. ( FbxMesh* FbxMesh ) void CleanUp() Clean up for destroy the Importer. void ClearTokenizedErrorMessages()
Read more >
three Euler JavaScript Examples - ProgramCreek.com
FBXLoader : morph target attached to more than one geometry is not supported. ... var animations = new AnimationParser().parse(); // if all the...
Read more >
Three.js clone FBX with animation - Stack Overflow
Create mixer to run animations mixer = new THREE.AnimationMixer( scene ); // Load fbx var loader = new THREE.FBXLoader(); for (var i =...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found