- Devmaster
- → Viewing Profile: Anddos
Community Stats
- Group Members
- Active Posts 178 (0.09 per day)
- Most Active In General Development (117 posts)
- Profile Views 1487
- Member Title Valued Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Contact Information
Posts I've Made
In Topic: can't export to md5 (3dsmax 2012)
04 December 2012 - 10:17 PM
ive even had problem exporting to .x from 3dsmax 2012 to .x and running it in the dx viewer, the animation dosent play :/, so i dont think going from .x to md5 is going to work for me , there is so little information on these topics , it really frustrates me ..
In Topic: Arghhhhh exporting .x with animations (D3D9)
25 November 2012 - 08:40 AM
thanks i will try that out
In Topic: Rendering Biped Bones with DirectX 9
18 November 2012 - 10:08 AM
this is what my update function looks like
void update_mesh_containers(CUSTOM_FRAME* pFrame)
{
// cast the pFrame's mesh container pointer to a CUSTOM_MESHCONTAINER*
CUSTOM_MESHCONTAINER* pMeshContainer = (CUSTOM_MESHCONTAINER*)pFrame->pMeshContainer;
if(pMeshContainer && pMeshContainer->pSkinInfo)
{
NumFrames = pMeshContainer->pSkinInfo->GetNumBones(); // find how many frames
// for each frame in the mesh container...
for(UINT i = 0; i < NumFrames; i++)
{
//MessageBox(NULL,pMeshContainer->pSkinInfo->GetBoneName(i),"Bone names",0);
// set FinalMatrices to that frame's offset matrix
FinalMatrices[i] = *pMeshContainer->pSkinInfo->GetBoneOffsetMatrix(i);
FinalMatrices[i] *= *pMeshContainer->ppFrameMatrices[i];
writeBonesTxt(pFrame,i);
}
void* pSrc = NULL; // a void pointer for the original mesh
void* pDst = NULL; // a void pointer for the modified mesh
// lock the two meshes
pMeshContainer->MeshData.pMesh->LockVertexBuffer(NULL, &pSrc);
pMeshContainer->pFinalMesh->LockVertexBuffer(NULL, &pDst);
// store the animated mesh into FinalMesh
pMeshContainer->pSkinInfo->UpdateSkinnedMesh(FinalMatrices, NULL, pSrc, pDst);
// unlock the two meshes
pMeshContainer->pFinalMesh->UnlockVertexBuffer();
pMeshContainer->MeshData.pMesh->UnlockVertexBuffer();
}
// run for all siblings
if(pFrame->pFrameSibling)
update_mesh_containers((CUSTOM_FRAME*)pFrame->pFrameSibling);
// run for the first child (which will then run all other children)
if(pFrame->pFrameFirstChild)
update_mesh_containers((CUSTOM_FRAME*)pFrame->pFrameFirstChild);
}
so i just multiply *pMeshContainer->pSkinInfo->GetBoneOffsetMatrix(i); with the translation matrix right?
void update_mesh_containers(CUSTOM_FRAME* pFrame)
{
// cast the pFrame's mesh container pointer to a CUSTOM_MESHCONTAINER*
CUSTOM_MESHCONTAINER* pMeshContainer = (CUSTOM_MESHCONTAINER*)pFrame->pMeshContainer;
if(pMeshContainer && pMeshContainer->pSkinInfo)
{
NumFrames = pMeshContainer->pSkinInfo->GetNumBones(); // find how many frames
// for each frame in the mesh container...
for(UINT i = 0; i < NumFrames; i++)
{
//MessageBox(NULL,pMeshContainer->pSkinInfo->GetBoneName(i),"Bone names",0);
// set FinalMatrices to that frame's offset matrix
FinalMatrices[i] = *pMeshContainer->pSkinInfo->GetBoneOffsetMatrix(i);
FinalMatrices[i] *= *pMeshContainer->ppFrameMatrices[i];
writeBonesTxt(pFrame,i);
}
void* pSrc = NULL; // a void pointer for the original mesh
void* pDst = NULL; // a void pointer for the modified mesh
// lock the two meshes
pMeshContainer->MeshData.pMesh->LockVertexBuffer(NULL, &pSrc);
pMeshContainer->pFinalMesh->LockVertexBuffer(NULL, &pDst);
// store the animated mesh into FinalMesh
pMeshContainer->pSkinInfo->UpdateSkinnedMesh(FinalMatrices, NULL, pSrc, pDst);
// unlock the two meshes
pMeshContainer->pFinalMesh->UnlockVertexBuffer();
pMeshContainer->MeshData.pMesh->UnlockVertexBuffer();
}
// run for all siblings
if(pFrame->pFrameSibling)
update_mesh_containers((CUSTOM_FRAME*)pFrame->pFrameSibling);
// run for the first child (which will then run all other children)
if(pFrame->pFrameFirstChild)
update_mesh_containers((CUSTOM_FRAME*)pFrame->pFrameFirstChild);
}
so i just multiply *pMeshContainer->pSkinInfo->GetBoneOffsetMatrix(i); with the translation matrix right?
In Topic: Rendering Biped Bones with DirectX 9
30 September 2012 - 02:56 AM
[qoute]
Then just render a point at the bone's offset position. This will render the point in pose space. You can transform that into world space if you want.
[/qoute]
ok i got the idea now
Then just render a point at the bone's offset position. This will render the point in pose space. You can transform that into world space if you want.
[/qoute]
ok i got the idea now
In Topic: Rendering Biped Bones with DirectX 9
23 September 2012 - 07:45 PM
I dont plan to draw lines, but points, so if i scale and rotate the mesh , i will need to transform the bones matrix by that matrix?
- Devmaster
- → Viewing Profile: Anddos



Find content
Display name history