honya Posted March 15, 2015 Share Posted March 15, 2015 Hi, i found interesting problem with ObjectMeshSkinned.addMeshSurface function. Check add_mesh.rar, it add one mesh to another and result is empty surface, that is reported by Unigine resource editor, that cannot open it and crash. I try add helm to body. The funny is that i have word that correctly add this mesh to another, but if i try it add to another instance of target mesh, the surface will not added. So in my complete word, mesh "elfArmor" have correctly added helmet, but mesh "male" have added empty surface. Thanks Honya Link to comment
unclebob Posted March 16, 2015 Share Posted March 16, 2015 Hello, Jan! Looks like it's working perfectly in 2.0 and elfHelmet surface will appear when start the animation. The reason of that 'strange' appearing is that ObjectMeshSkinned will actually do skinning only when it needs to. So if you add another surface but won't play the animation or change animation frame, new surface won't be skinned. Link to comment
unclebob Posted March 16, 2015 Share Posted March 16, 2015 Here's the mesh I get from this code: male = addNode(new ObjectMeshSkinned("UMA_male.mesh", 1)); male.setName("male"); male.setAnimation(0, "male_bind.anim"); male.setPosition(vec3(5, 5, 0)); ObjectMeshSkinned item = addNode(new ObjectMeshSkinned("UMA_ElHelm.mesh")); item.setName("item"); item.setMaterial("mesh_base", "*"); male.addMeshSurface(item.getSurfaceName(0), item, 0); male.setMaterial("mesh_base", "*"); Mesh mesh = new Mesh(); male.getMesh(mesh); mesh.save("test2.mesh"); test2.zip Link to comment
Recommended Posts