Havok 6 - Problem loading models

Havok 6 - Problem loading models

Hi. I just updated from havok 5.5.0 to 6.0.0.

I'm now having trouble loading binary havok models.

I have re-exported the models from Maya using the ver 6.0.0 exporter.

When I load the the model using loadEntrire file that returns HK_SUCCESS.

When I then use getContents to access the root level container, I get an assert and this message in the output window:

HAVOK: .\Packfile\hkPackfileData.cpp(147): [0x4A45F946] Assert : typeInfo != HK_NULL
Found unregistered type 'hkClass'.

I'm not sure why this is happening. I'm following the same export steps as in 5.5.0 only using the new version of the exporter.

I tried using hkVersionUtil::updateToCurrentVersion on it, but that returns HK_SUCCESS as well, and the problem still persists.

I've tried exporting more than one model to make sure that something in that particular model is not the problem. They all get the same message in the output window.

I have a custom exporter filter and I have tried exporting both with and without it - I still get the same message either way,

This seems very strange to me and I'm not sure where to go from here. Please help me if you have any ideas of what I can try or know what might be happening.

Thanks.

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

I just exported again and got this when using getContents:

HAVOK: .PackfilehkPackfileData.cpp(147): [0x4A45F946] Assert : typeInfo != HK_NULL
Found unregistered type 'hkxNode'.

Totally confused because as far as I can tell I did the exact same thing.

Just had one of the artists try exporting on their machine with the new 6.0.0 exporter.

When I try to load his model, I get this when calling getContents:

HAVOK: .PackfilehkPackfileData.cpp(147): [0x4A45F946] Assert : typeInfo != HK_NULL
Found unregistered type 'hkClassEnum'.

This is wierd that all these built-in havok types are unregistered. Do I have to register them somehow?

For anyone who's experiencing the same thing. Here's the solution I found:

I used to have this:

#define HK_CLASSES_FILE "Common/Serialize/ClassList/hkAnimationClasses.h"
#include "Common/Serialize/Util/hkBuiltinTypeRegistry.cxx"

and changed it to this:

#define HK_CLASSES_FILE "Common/Serialize/ClassList/hkClasses.h"
#include "Common/Serialize/Util/hkBuiltinTypeRegistry.cxx"

now it works

I discovered you also need to define certain things if you want them included:

add #defines for these to enable their classes to be read in from a havok file:

INCLUDE_HAVOK_PHYSICS_CLASSES

INCLUDE_HAVOK_ANIMATION_CLASSES

INCLUDE_HAVOK_BEHAVIOR_CLASSES

INCLUDE_HAVOK_CLOTH_CLASSES

INCLUDE_HAVOK_DESTRUCTION_CLASSES

Make sure the #defines appear BEFORE the HK_CLASSES_FILE macro is used.

I'm getting these linker errors when moving to Havok 6..

1>hkpCollide.lib(ContinuousGskTest.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl hkGeometryUtility::createConvexGeometry(struct hkStridedVertices const &,struct hkGeometry &,class hkArray &,enum hkGeomConvexHullMode)" (?createConvexGeometry@hkGeometryUtility@@SAXABUhkStridedVertices@@AAUhkGeometry@@AAV?$hkArray@VhkVector4@@@@W4hkGeomConvexHullMode@@@Z) referenced in function "class hkpConvexShape * __cdecl buildConvexBox(class hkVector4 const &,class hkVector4 const &)" (?buildConvexBox@@YAPAVhkpConvexShape@@ABVhkVector4@@0@Z)
1>hkpUtilities.lib(inertiahelper.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl hkGeometryUtility::createConvexGeometry(struct hkStridedVertices const &,struct hkGeometry &,class hkArray &,enum hkGeomConvexHullMode)" (?createConvexGeometry@hkGeometryUtility@@SAXABUhkStridedVertices@@AAUhkGeometry@@AAV?$hkArray@VhkVector4@@@@W4hkGeomConvexHullMode@@@Z)
1>hkpUtilities.lib(hkpInertiaTensorComputer.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl hkGeometryUtility::createConvexGeometry(struct hkStridedVertices const &,struct hkGeometry &,class hkArray &,enum hkGeomConvexHullMode)" (?createConvexGeometry@hkGeometryUtility@@SAXABUhkStridedVertices@@AAUhkGeometry@@AAV?$hkArray@VhkVector4@@@@W4hkGeomConvexHullMode@@@Z)
1>hkpUtilities.lib(hkpInertiaTensorComputer.obj) : error LNK2019: unresolved external symbol "public: static class hkBool __cdecl hkGeometryUtility::getAxesFromCovariance(class hkMatrix3 &,class hkVector4 &,class hkVector4 &,class hkVector4 &)" (?getAxesFromCovariance@hkGeometryUtility@@SA?AVhkBool@@AAVhkMatrix3@@AAVhkVector4@@11@Z) referenced in function "public: static void __cdecl hkpInertiaTensorComputer::calculatePrincipalAxis(class hkpShape const *,class hkMatrix3 const &,class hkVector4 &,class hkVector4 &)" (?calculatePrincipalAxis@hkpInertiaTensorComputer@@SAXPBVhkpShape@@ABVhkMatrix3@@AAVhkVector4@@2@Z)
1>hkpUtilities.lib(hkpShapeDisplayBuilder.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl hkGeometryUtility::createConvexGeometry(struct hkStridedVertices const &,struct hkGeometry &,enum hkGeomConvexHullMode)" (?createConvexGeometry@hkGeometryUtility@@SAXABUhkStridedVertices@@AAUhkGeometry@@W4hkGeomConvexHullMode@@@Z) referenced in function "public: void __thiscall hkpShapeDisplayBuilder::buildShapeDisplay(class hkpShape const *,class hkTransform const &,class hkArray &)" (?buildShapeDisplay@hkpShapeDisplayBuilder@@QAEXPBVhkpShape@@ABVhkTransform@@AAV?$hkArray@PAVhkDisplayGeometry@@@@@Z)
1>hkpUtilities.lib(hkpConvexRadiusBuilder.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl hkGeometryUtility::createConvexGeometry(struct hkStridedVertices const &,struct hkGeometry &,enum hkGeomConvexHullMode)" (?createConvexGeometry@hkGeometryUtility@@SAXABUhkStridedVertices@@AAUhkGeometry@@W4hkGeomConvexHullMode@@@Z)
1>hkpUtilities.lib(hkpConvexRadiusBuilder.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl hkGeometryUtility::createVerticesFromPlaneEquations(class hkArray const &,class hkArray &)" (?createVerticesFromPlaneEquations@hkGeometryUtility@@SAXABV?$hkArray@VhkVector4@@@@AAV2@@Z) referenced in function "class hkDisplayConvex * __cdecl _createConvexDisplayFromPlanes(class hkArray const &,class hkTransform const &)" (?_createConvexDisplayFromPlanes@@YAPAVhkDisplayConvex@@ABV?$hkArray@VhkVector4@@@@ABVhkTransform@@@Z)
1>hkVisualize.lib(hkDisplayCapsule.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl hkGeometryUtils::createCapsuleGeometry(class hkVector4 const &,class hkVector4 const &,float,int,int,class hkTransform const &,struct hkGeometry * &)" (?createCapsuleGeometry@hkGeometryUtils@@SAXABVhkVector4@@0MHHABVhkTransform@@AAPAUhkGeometry@@@Z) referenced in function "public: virtual void __thiscall hkDisplayCapsule::buildGeometry(void)" (?buildGeometry@hkDisplayCapsule@@UAEXXZ)
1>hkpInternal.lib(hkpCollectionCollectionAgent3.obj) : error LNK2019: unresolved external symbol "public: static int __cdecl hk1AxisSweep::collide(struct hk1AxisSweep::AabbInt const *,int,struct hk1AxisSweep::AabbInt const *,int,struct hkKeyPair * __restrict,int,int &)" (?collide@hk1AxisSweep@@SAHPBUAabbInt@1@H0HPIAUhkKeyPair@@HAAH@Z) referenced in function "void * __cdecl hkpCollectionCollectionAgent3::process(struct hkpAgent3ProcessInput const &,struct hkpAgentEntry *,void *,class hkVector4 *,struct hkpProcessCollisionOutput &)" (?process@hkpCollectionCollectionAgent3@@YAPAXABUhkpAgent3ProcessInput@@PAUhkpAgentEntry@@PAXPAVhkVector4@@AAUhkpProcessCollisionOutput@@@Z)

I've been linking the libraries and I added them to the project settings under Linker > Input, but nothing happens.

Thanks.

havokchris's picture

Quoting - sorlaize

I'm getting these linker errors when moving to Havok 6..

Hi Solarize,

I think you need to link in hkInternal.lib (not to be confused with hkpInternal or hkaInternal). That one was new in 6.0 so you probably weren't including it before.

-Chris

Quoting - havokchris

Hi Solarize,

I think you need to link in hkInternal.lib (not to be confused with hkpInternal or hkaInternal). That one was new in 6.0 so you probably weren't including it before.

-Chris

Wow, must be hard to spot that. Thanks Chris. I'm still getting this linker error though:

hkVisualize.lib(hkDisplayCapsule.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl hkGeometryUtils::createCapsuleGeometry(class hkVector4 const &,class hkVector4 const &,float,int,int,class hkTransform const &,struct hkGeometry * &)" (?createCapsuleGeometry@hkGeometryUtils@@SAXABVhkVector4@@0MHHABVhkTransform@@AAPAUhkGeometry@@@Z) referenced in function "public: virtual void __thiscall hkDisplayCapsule::buildGeometry(void)" (?buildGeometry@hkDisplayCapsule@@UAEXXZ)

Thanks again, I should have it sorted soon.

havokchris's picture

Quoting - sorlaize

Wow, must be hard to spot that. Thanks Chris. I'm still getting this linker error though:

hkVisualize.lib(hkDisplayCapsule.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl hkGeometryUtils::createCapsuleGeometry(class hkVector4 const &,class hkVector4 const &,float,int,int,class hkTransform const &,struct hkGeometry * &)" (?createCapsuleGeometry@hkGeometryUtils@@SAXABVhkVector4@@0MHHABVhkTransform@@AAPAUhkGeometry@@@Z) referenced in function "public: virtual void __thiscall hkDisplayCapsule::buildGeometry(void)" (?buildGeometry@hkDisplayCapsule@@UAEXXZ)

Thanks again, I should have it sorted soon.

Ah, sorry, there's another new one. I believe it's hkGeometryUtilities.lib (or maybe hkGeometryUtils.lib - I don't have the package downloaded here).

Basically, include everything in the Lib folder, and then start removing stuff you might not need :)

-Chris

Quoting - havokchris

Ah, sorry, there's another new one. I believe it's hkGeometryUtilities.lib (or maybe hkGeometryUtils.lib - I don't have the package downloaded here).

Basically, include everything in the Lib folder, and then start removing stuff you might not need :)

-Chris

Ahh yea, just worked it out =D

I'll remember to use that strategy in future.

Thanks again.

Login to leave a comment.