Hi, I think the animation library looks great but I got some problems when trying to use it.
I have exported a mesh to .X, which can be viewed by DirectX Viewer without any problems. (Can play animation, display diffuse texture)
Here is how I used the library:
I only want to use the animation part from KW Animation Library. From my expectation, the animation library will give me an array of bone matrices after certain calculations. Then I can use that bone matrices as effect parameter and perform hardware skinning.
My work flow is:
At runtime:
mSkinnedModel.CopyAbsoluteBoneTransformsTo(tempTransforms); mAnimationInstances[0].CopyPoseTo(tempTransforms); for (int i = 0; i < mSkinnedBones.Length; ++i) { SkinnedBone sb = mSkinnedBones[i]; Matrix.Multiply(ref sb.InverseBindTransform, ref tempTransforms[sb.Index], out mTransforms[i]); }
That's how I used it. However, the rendered model was a mess. Is there anything wrong for my usage?
Many Thanks.
Does your model and shader
Does your model and shader work if you add them to the AnimationViewer program?
Also, does your model and shader work if you use the DrawDetails/ModelDraw classes that are included in kW Animation?
Finally, if you look at your mesh in PIX, before and after the shader, does it look recognizable in either stage?