Trouble loading HKT file with cloth

Trouble loading HKT file with cloth

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.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

From the error messages you're getting this seems to be a versioning problem.
Check that you're not exporting your assets with a later version of the content tools than the version of the Havok runtime you're using.

The other thing I have to mention is - Havok Cloth is a commercial product and doesn't come with the PcXs license, which only covers Animation and Physics - if you have a license for cloth you should submit your support requests through the Havok support portal at support.havok.com.

Cormac

Yes I am a commercial user. I am exporting the assets with the 64 bit content tools I downloaded from the Havok site. I will resubmit my request to the support portal.

Leave a Comment

Please sign in to add a comment. Not a member? Join today