Topic: need help with skinnedmesh
Ok so basically in my game i have a skeleton i exported via b3d, now i need to swap out clothing and or body parts from this mesh. Simply attaching a scenenode to a bone node won't suffice as i need all the weights from the mesh to be applied to the base skeleton.
I have been struggling with this for a few days, but something i am having trouble figuring out is why i cannot append any vertices to a SSkinnedMeshBuffer, seems to work fine with a an SMeshBuffer.
Global bodyp:IAnimatedMesh = device.getSceneManager().getMesh("media\avatars\male_torso.b3d") Global meshy2:ISkinnedMesh = smgr.creatSkinnedMesh() Global meshy:SSkinMeshBuffer = meshy2.addMeshBuffer() 'just gonna try with the first meshbuffer.. since this mesh only has one Global bodymeshbuff:IMeshBuffer = bodyp.getMeshBuffer(0) Global bodyverts:S3DVertex = bodymeshbuff.getVertices() Global bodyindices:Short = bodymeshbuff.getIndices() DebugLog "Vertices to add: "+bodyverts.length+" Indices to add: "+bodyindices.length meshy.append(bodyverts,bodyindices) DebugLog "Meshy has: "+meshy.getVertexCount() 'meshy.appendFromOther(bodymeshbuff) <---- didnt work either
I have tried a bunch of other ways to get around this.. like trying to break attach the mesh's bones to the base skeleton's bones, but that causes irrlicht to crash. Anyone have any idea how to do this or what i am doing wrong?