Jump to content
  • Advertisement
Sign in to follow this  

UpdateSkinnedMesh() issue

This topic is 3410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem using skinned meshes. When I load tiny.x not using skinned mesh everything works just fine and I get tiny with her arms streched. When I activate skinned mesh and thus I call UpdateSkinnedMesh() it completely messes up tiny and all I get is an unknown alien shape with something that doesn't even resemble a human being. Any ideas what could have gone wrong?? for(DWORD i = 0; i < NumBones; ++i) { m_RootMesh->pBoneMatrices = (*m_RootMesh->pSkinInfo->GetBoneOffsetMatrix(i)); if(m_RootMesh->ppFrameMatrices) m_RootMesh->pBoneMatrices *= (*m_RootMesh->ppFrameMatrices); } void *SrcPtr, *DestPtr; m_RootMesh->pSkinMesh->LockVertexBuffer(D3DLOCK_READONLY, (void**)&SrcPtr); m_RootMesh->MeshData.pMesh->LockVertexBuffer(0, (void**)&DestPtr); m_RootMesh->pSkinInfo->UpdateSkinnedMesh(m_RootMesh->pBoneMatrices, NULL, SrcPtr, DestPtr); m_RootMesh->MeshData.pMesh->UnlockVertexBuffer(); m_RootMesh->pSkinMesh->UnlockVertexBuffer();

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!