honya Posted October 12, 2012 Posted October 12, 2012 Hi, I try merge two skinned mesh to one skinned mesh, the resulting smesh file when i open it in "Unigine Resource Editor" then i don't see content, but i can import in to the "Autodesk 3ds Max 2012", when i can see content, so i export it from "Autodesk 3ds Max 2012", the "Unigine Resource Editor" show now correctly content, but there are wrong coordinate of one bone, that start on coordinate 0 0 0. The source code of usc script is: void main() { MeshSkinned mesh = new MeshSkinned("cuirass.smesh"); MeshSkinned mesh1 = new MeshSkinned("shirt_mail.smesh"); forloop(int i = 0; mesh1.getNumSurfaces()) { mesh.addMeshSurface(mesh1.getSurfaceName(i),mesh1,i); } mesh.save("equip_multiple.smesh"); } Missing something? Because i cannot found in web documentation description of this class "MeshSkinned". I attached testing data, cuirass.smesh and shirt_mail.smesh are input skinned mesh, equip_multiple.smesh is output skinned mesh, one.smesh is after import and export equip_multiple.smesh from "Autodesk 3ds Max 2012 64-bit - English" and equip.usc is source script. test.rar
frustum Posted October 22, 2012 Posted October 22, 2012 Please change the order of skinned meshes. Before adding surfaces, you need to create/load from file the whole skeleton. The script fails since only one set of bones (from one smesh file) is currently loaded, and and there is no data on bones from the added surface. The destination mesh simply should contain all bones. MeshSkinned mesh = new MeshSkinned("shirt_mail.smesh"); MeshSkinned mesh1 = new MeshSkinned("cuirass.smesh");
honya Posted October 22, 2012 Author Posted October 22, 2012 So destinatio smesh must contain whole skeleton (or all bones that added surface used) to add surface from other smesh file to this smesh. Thank for it, that resolve issues that i post here and get me how right add surface from smesh to another smesh file.
Recommended Posts