I am trying to use the .hkx rigs and animation files from the Havok demo application in my project (for an academic game engine project). I am having real trouble loading in the files, I'm am using basically the same code from the AnimatedSkeletonDemo.
From what I gather from other threads the .hkx files are reserialized on the fly by the demo application (as they were serialized with an old version of the content tools) so I have to reserialze them for the latest version.
I have tried opening the .MAX files and using the Havok Content Tools plugin to export them as .hkx again, but that doesn't work. The odd thing about that is when I try to open those files again in the Preview Tool it errors and tells me that the packfile is generated for the wrong platform (despite the fact they are generated for L4101 Win32). My machine is using 64bit Windows but our application is only 32-bit so I don't really see the problem. Unless it's due to the fact I downloaded the 64bit Havok Content Tools?
I also tried to use the AssetCc1.exe and AssetCc2.exe files located in Tools>BatchProcess>AssetCc to convert the .hkx files to the latest version but that also did not work, I still end up with a blank container and a fail assertion.
Here's the code where it's going wrong:
// Get the rig
hkRootLevelContainer* container = m_loader->load( rig_file_path );
HK_ASSERT2(0x27343437, container != HK_NULL , "Could not load asset");
hkaAnimationContainer* ac = reinterpret_cast<hkaAnimationContainer*>( container->findObjectByType( hkaAnimationContainerClass.getName() ));
HK_ASSERT2(0x27343435, ac && (ac->m_skeletons.getSize() > 0), "No skeleton loaded"); m_skeleton = ac->m_skeletons;
I've tried the code posted in another thread to check the file stream itself is OK and that works fine so it's definitely finding the file!
If anyone could shed any light on where I'm going wrong here I would appreciate it.