I have integrated Havok animation and physics into my game engine and I am able to load a skinned, animated character and drive it with physics. Now I am trying to put clothes on her and that is causing trouble.
I am using Maya with the 64 bit Havok Content Tools. My game engine uses 64 bit Havok libraries (multithreaded full debug DLL). If I export the scene without the Cloth Setup filter, all is good. As soon as I add any cloth setup, the file will no longer load. I get the following error:
UtilhkSerializeUtil.cpp(63): [0x371D81E7] Warning : Unable to version data of class hclNamedSetupMesh, version 0x0000000000000000 Patching to latest version failed. Have you registered the necessary patches? e.g. hkFeature_serializeRegisterKeycodePatches() See the hkError output for more details UtilhkLoader.cpp(87): [0x3BF82A57] Warning : Unable to version data of class hclNamedSetupMesh, version 0x0000000000000000 Patching to latest version failed. Have you registered the necessary patches? e.g. hkFeature_serializeRegisterKeycodePatches() See the hkError output for more details
The cloth setup filter inside the Maya Havok export path will load the file and preview it correctly. The Havok ClothSetupStandAlone.exe tool will not load the file. It gives a different error:
Unable to version data of class hkaRagdollInstance, version 0x0000000000000000 Patching to latest version failed. Have you registered the necessary patches? e.g. hkFeature_serializeRegisterKeycodePatches() See the hkError output for more details
Originally I thought my code might be complaining because I didn't have any references to the cloth setup stuff so I put a call in to create hclNamedSetupMesh to force the linker to bring in this class. The cloth file still will not load. The actual contents of the file are two skinned meshes - a skirt and a body.
Here is the code I use for registering the classes:
#include #define HK_EXCLUDE_FEATURE_CompoundShape #define INCLUDE_HAVOK_PHYSICS_CLASSES #define INCLUDE_HAVOK_ANIMATION_CLASSES #define INCLUDE_HAVOK_CLOTH_CLASSES #define HK_CLASSES_FILE #include #include
Here is the code I used to load the file:
hkMemorySystem::getInstance().threadInit( m_MemoryRouter, "hkLoadThread" ); hkBaseSystem::initThread( &m_MemoryRouter ); m_Loader = new hkLoader(); hkSerializeDeprecated::initDeprecated(); m_Root = m_Loader->load(filename);
I am enclosing the HKT file and the cloth setup file. There are two options files as well. If you use nola.HKO as the options for the Maya export utility it does not include cloth and my program will load it. If you use nolacloth.HKO, it includes the cloth setup filter and my program will not load the file.
This is probably something simple that I have overlooked but I must confess I have been all over these forums and can't seem to figure out what I am doing wrong.


