Hi, I know how I can convert Mixamo characters to babylonjs with blender, but when I import result in babylon, I get multi meshes, “unlike the dude in some example that is just one mesh”, how I can get all the character as single mesh? and if it is not possible, how I can clone the character mesh? I write some code that can clone the meshes but animation not working for them, what is my problem. thank you guys.
let meshes = [];
for(let k=0; k<oldChar.mesh.length; k++)
meshes.push(oldChar.mesh[k].clone(“m_”+k));
let skeletons = oldChar.skeleton.clone(“s_1”);
SCENE.beginAnimation(skeletons, 0, 120, 1.0, true);
by this code, meshes cloned but animation not working.
If you have multiple meshes in blender that is what you are going to import in Babylon as well. In my personal opinion, you should definitely fix the model in blender and not join the meshes in Babylon. You can join the model by selecting the separate meshes and hitting ctrl + j and then export.
I do not know if the gltf exporter for Blender does shapekeys, but if each material is exported as a mesh, then you definitely do not want to use it if you have shapekeys & multiple materials. That would be tedious to animate deforms across multiple meshes yourself.
Also, ctrl + j combines shapekeys of the same name. I do it all the time with meshes from makehuman.
Also, save the last select for the mesh you want all the others to be merged into.