I have a rather complex animation of nCloth, influenced by wind, some constraints, etc. I’ve been baking it into fbx, converting to gltf then importing into three.js. Problem is, neither nCloth nor the constraints are animating in the end process. I tried exporting it with different presets, baking cache etc.
i’m certainly missing something but I see possible approaches as listed below:
Bake animation with cache
Use physics engine (seems like too complicated and heavy for this example)
Render it and import a movie
The first seems as an acceptable idea. I figured I might generate nCache or geometry cache for the nCloth to get rid of physics, but I cannot find any information whether importing animation from cache is even possible and if is - how to do it properly.
Hi again.
So I’m still in need of help with the case of cloth animation.
During time passed I solved the issue of importing fbx to my react app, but even though in preview it seems it was exported correctly, it’s not serving the cloth animation just as gltf didn’t.
Any help would be greatly appreciated. I’m attaching the file just in case. dress1_animations.fbx (342.2 KB)
Your FBX file contains only a single animation clip which animates a small cylinder at the top of the dress slowly to the right. There are no other animations. I’ve checked this in FBX review and sketchfab as well as three.js.
I can see that the FBX file contains references to dress1_animations_fpc\outputCloth1.xml, I think that’s a point cache animation file. Is that how the dress animation is exported? There’s no way I know of to play back point cache animations in three.js.
Are you sure that you can see the animation in FBX Review? If you can see the animation in FBX review and I can’t, maybe it’s playing back this point cache animation?
You will need to figure out how to export the animation from Maya in a format that three.js understands. There’s two options: morph targets (called blend shapes in Maya), or skeletal animation. Both of these should work fine in either FBX or three.js, although Maya is a bit tricky with export settings for skeletal animation.
In Blender you should be able to export the cloth animation to an MDD file, then import it back in as an animated series of blend shapes that can be exported directly to formats like FBX or glTF. No idea whether something similar works in Maya, though.
Thank you. I’ve returned to the project after a break and figured it out from Maya, however Blender seems so much easier.
Anyway, I wrote short article on how I achieved that based on research of other people’s problems. It may be helpful if anyone was facing the same problems as I was:
tl;dr Maya requires a lot of manual clean up after deriving objects from nCloth