I've spent the past few days trying to get one of the samples animations included with the Havok SDK to run correctly in my DirectX project, but I'm not having alot of luck. I think the main issues I'm facing are based around converting the data between a DirectX and Havok format, and poor model formats used, and then converting around those too.
I'm trying hardware skinning atm, and followed the SDK source code to get things working. The Havok side of things loaded and ran fine after a quick re-export of the models. By 'fine' I mean doesn't crash and seems to give reasonable numbers on a step through by the way, as I'm still working on getting a visualisation of it.
I've been using .X files for my visual geometry so far, as I'm not doing anything particularly fancy that has desired a more complex or custom format, just position, normals and texture coordinates. However, now I'm entering animation territory I think I've hit my limits with this format.
For the demo I'm working on so far, I've loaded the rig and animation (.hkx files) in Havok and let them play and update according to the demo, which as far as I can tell is going fine. For my visual mesh I've used a skinned .X file, which I've then tried to get the transforms from the hkPose to then try and apply to the visual mesh in a shader. I've tried various additional transformations during this process to produce the correct result, but I'm pretty limited by my understanding of the things going on.
I'm using the hkWave animation, and have managed to get the stationary body parts to appear in their correct position, however the waving arm is slightly skewed, which get's worse as you travel down the arm. The stationary parts end up using an identity matrix, which I don't think is correct, as I'm sure they should all use an offset matrix instead, made up by traversing the skeleton. So this is one of the big troubles I'm having with the .X format.
I'm basically looking for some advice on things I can re-think with the current setup, offers for an alternative model format that anyone can recommend, or any or solutions you can offer of things I can look at for a different approach. I'm happy to try the software skinning approach instead, but I'm not quite sure were to begin with the Havok Vertex Buffers to convert those over to a DirectX equivalent.
Thanks to anyone that contributes.
Integrating Havok Animation w/ DirectX9