Original Post
Hi all,
Finally I got HW Skeletal Animation (with HLSL) working for my renderer.
But I'm curious about 2 topics about skinned meshes:
1-) This is about tangent-space calculation. If I clone final index-blended skinned mesh with a declaration contains D3DDECLUSAGE_TANGENT and D3DDECLUSAGE_BINORMAL elements by using ID3DXMesh::CloneMesh() function, skinned mesh becomes dead. I use the same algorithm for static meshes and works fine. Why not with that? What/where may I doing wrong?
NOTE: But if I manually add that 2 D3DVERTEXELEMENT9 objects (tangent and binormal) to the vertex declaration of mesh (I obtain it with ID3DXMesh::GetDeclaration() function) and clone, then call D3DXComputeTangentFrameEx(), it works fine. After performing this method, I can do normal mapping with skeletal animaton.
2-) With static meshes, for fully optimizing and increasing rendering performance, I call OptimizeInplace(), D3DXCleanMesh() and D3DXWeldVertices() respectively. But with skeletal meshes, D3DXWeldVertices() makes skinned mesh animating weird (Other 2 functions does not affect, I think). I mean, some part of model goes random directions. For example, I've a soldier model and has an animation called "walk". While walking, his right hand goes the opposite direction of right arm :D
Are there any optimizing techniques for skinned meshes? Or, what should I do?
Thanks in advance.
-R
Finally I got HW Skeletal Animation (with HLSL) working for my renderer.
But I'm curious about 2 topics about skinned meshes:
1-) This is about tangent-space calculation. If I clone final index-blended skinned mesh with a declaration contains D3DDECLUSAGE_TANGENT and D3DDECLUSAGE_BINORMAL elements by using ID3DXMesh::CloneMesh() function, skinned mesh becomes dead. I use the same algorithm for static meshes and works fine. Why not with that? What/where may I doing wrong?
NOTE: But if I manually add that 2 D3DVERTEXELEMENT9 objects (tangent and binormal) to the vertex declaration of mesh (I obtain it with ID3DXMesh::GetDeclaration() function) and clone, then call D3DXComputeTangentFrameEx(), it works fine. After performing this method, I can do normal mapping with skeletal animaton.
2-) With static meshes, for fully optimizing and increasing rendering performance, I call OptimizeInplace(), D3DXCleanMesh() and D3DXWeldVertices() respectively. But with skeletal meshes, D3DXWeldVertices() makes skinned mesh animating weird (Other 2 functions does not affect, I think). I mean, some part of model goes random directions. For example, I've a soldier model and has an animation called "walk". While walking, his right hand goes the opposite direction of right arm :D
Are there any optimizing techniques for skinned meshes? Or, what should I do?
Thanks in advance.
-R