Problem loading havok animations

Problem loading havok animations

Hey,

I'm having problems loading the example havok animations from Havok's normalBlending example.

I have done it as the example:

hkStringBuf assetFile("Resources/hkRig.hkx"); hkAssetManagementUtil::getFilePath(assetFile);

hkRootLevelContainer* container = myHavokEngine->GetLoader()->load( assetFile.cString() );

However the container is always null after trying to load the .hkx file... :/
I have set the working directory correctly so the filepath should be ok. The only thing I'm uncertain about is the asset version. However I have had no problem reading .hkt files for rigidbodies.

In my Havok Debugger I get "Warning: Unable to version contents, check warning log" when executing the load.

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hey aasagi!I need more information. A few questions:Are you generating your own rig or just using a rig from the demos?Your executable is being built at some location I'll call [LOCATION]. The resource is located at [LOCATION]/Resources/hkRig.hkx, correct?Have you checked the warning log? What does it say?You can check to make sure that the file is in the right location using the following:

hkStringBuf assetFile("Resources/hkRig.hkx");

hkAssetManagementUtil::getFilePath(assetFile);

hkIstream stream(assetFile);

if (stream.isOk()) {

hkcout << "File is okayn";

}

else {

hkcout << "File problem detectedn";

}

If isOk() returns false then you most likely have a path problem.-Josh

Josh
Developer Support Engineer
Havok
www.havok.com

Hi and thanks for the reply.
I'm using a rig from the demos.

Yes that is correct and I tried the code you wrote just to be sure and it return true for stream.isOk().

As for the warning log I don't know where the warning log should be located ? Is it the one within my workstation ?

If that's the case then here's the output window for that:

Compiling...
HavokAnimationWrapper.cpp
Creating library...
hctSceneExport.lib(hctSceneExport.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkaAnimation.lib(hkaAnimationPch.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkaInternal.lib(hkaCompression.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkBase.lib(hkValueTypeFreeListReflection.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkBase.lib(hkBase.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkcdCollide.lib(hkcdCollide.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkCompat.lib(StressTest.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkCompat.lib(hkCompat.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkgBridge.lib(hkGraphicsBridge.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkgCommon.lib(hkGraphics.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkgDx9s.lib(hkGraphicsDX9S.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkgDx11.lib(hkGraphicsDX11.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkGeometryUtilities.lib(hkGeometryUtilities.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkInternal.lib(hkInternal.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkpInternal.lib(hkpInternal.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkpUtilities.lib(hkpUtilitiesUnitTestTrackerClasses.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkpVehicle.lib(hkpVehicle.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkSceneData.lib(hkSceneData.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkSerialize.lib(loadAsObjectTest.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkSerialize.lib(hkSerialize.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
hkVisualize.lib(hkVisualize.obj) : warning LNK4221: no public symbols found; archive member will be inaccessible
HavokWrapper.obj : warning LNK4006: "char const * const HK_PHYSICS_KEYCODE" (?HK_PHYSICS_KEYCODE@@3QBDB) already defined in hctSdkUtils.lib(hctSdkUtils.obj); second definition ignored
HavokWrapper.obj : warning LNK4006: "char const * const HK_ANIMATION_KEYCODE" (?HK_ANIMATION_KEYCODE@@3QBDB) already defined in hctSdkUtils.lib(hctSdkUtils.obj); second definition ignored
HavokWrapper.obj : warning LNK4006: "char const * const HK_BEHAVIOR_KEYCODE" (?HK_BEHAVIOR_KEYCODE@@3QBDB) already defined in hctSdkUtils.lib(hctSdkUtils.obj); second definition ignored
HavokWrapper.obj : warning LNK4006: "char const * const HK_CLOTH_KEYCODE" (?HK_CLOTH_KEYCODE@@3QBDB) already defined in hctSdkUtils.lib(hctSdkUtils.obj); second definition ignored
HavokWrapper.obj : warning LNK4006: "char const * const HK_DESTRUCTION_KEYCODE" (?HK_DESTRUCTION_KEYCODE@@3QBDB) already defined in hctSdkUtils.lib(hctSdkUtils.obj); second definition ignored
HavokWrapper.obj : warning LNK4006: "char const * const HK_AI_KEYCODE" (?HK_AI_KEYCODE@@3QBDB) already defined in hctSdkUtils.lib(hctSdkUtils.obj); second definition ignored
Project : warning PRJ0018 : The following environment variables were not found:
$(LibraryPath)
Build machine environment variables may not be correct.

aasagi-
The versioning problem occurs because the assets you are using are created with an older version of the Havok Content Tools than the runtime you are currently using. The demos fix this problem by using code that automagically updates ("patches") the resources. In this situation we generally suggest the following:
1. Create new assets!This will teach you how to use Max/Maya and the Havok Content Tools (which are also included with the Xs download from the web).
2. Figure out how to use the patching code!Even if you don't choose this option you can read more about the patching system in the User Guide at:
Common Havok Components > Serialization > Versioning
3. Use the AssetCc tool!The tools are at:
Tools/BatchProcess/AssetCc
This will update the asset to the current version. You will then be able to pull the updated asset in to your code without needing to patch the code during import.
Another person was having a similar problem on this thread, so you might want to read up on the issue:
http://software.intel.com/en-us/forums/showthread.php?t=97534Hope that points you in the right direction. You'll have to do some research to figure out how to use AssetCc, or dig through the demo code to figure out how to make your codebase update your assets. Good luck!-Josh

Josh
Developer Support Engineer
Havok
www.havok.com

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi