Havok Command Line Tools 1.4
============================
This package includes a command line application for converting Havok models from Skyrim the native format to something that can be manipulated or used as a reference for non-derivative works.
Currently the package only converts from native HKX files built with Havok 2010.2.0 SDK to the XML form of HKX or to the Gamebryo KF file format.
Prerequisites:
For Skyrim, you must unpack the BSA files using an appropriate tool. For me I will refer to this location as "%TEMP%\Skyrim - Animations"
I assume you have the 2010.2 Havok Content Tools and SDK from Intel. You will need to provide infomation to get access to the tools but is free. http://software.intel.com/sites/havok/en/
For 3ds max support get the niftools.org exporter for Skyrim
Quick Start:
Convert Packed HKX to XML HKX files
hkxcmd convert "%TEMP%\Skyrim - Animations"
Convert Packed HKX to XML HKX files and place in another folder
hkxcmd convert "%TEMP%\Skyrim - Animations" "%TEMP%\Skyrim - Animations - Output"
Preview Animation in Havok Preview Tool
Load the Preview Tool: Start | Havok | Havok PcXs Content Tools 2010.2.0 | Havok Preview Tool
Convert Skeleton.hkx using step 1 or 2 above
File | Open... | Browse for converted skeleton
File | Add... | Browse for an animation for that skeleton
Convert HKX file to Gamebryo KF files
hkxcmd exportkf "%TEMP%\Skyrim - Animations"
Convert HKX file to Gamebryo KF files into a different folder
hkxcmd exportkf "%TEMP%\Skyrim - Animations" "%TEMP%\Skyrim - Animations - Output"
Import Skyrim Animation into 3ds Max
First import the creature into max using niftools max importer
Assuming this succeeded now import the animation
Export Skyrim Animation from 3ds Max in KF format
Convert KF format to HKX Format
hkxcmd convertkf "\path\to\skeleton.hkx" "\path\to\export.kf" "\path\to\export.hkx"
Troubleshooting:
A lot of files show that they failed to load when converting.
I keep getting the following message "Wrong platform for packfile" when using the Preview tool
The animation is corrupt after importing into 3ds Max
When I try to load the converted HKX file into Havok Preview Tool fails.
Known Issues:
I could not figure out how bones are mapped because I'm not sure the information is present. I've just assumed that there is a 1-to-1 skeleton to animation track but that is obviously not always a correct assumption
Havok supports non-uniform scale in animation however Gamebryo does not This means any animation exported to the Gamebryo format may lose information when this is present.
KF was choosen because the niftools.org 3ds max importer largely works and this was the easiest way to do this porting. It may be worth while converting to FBX format instead but that is much more work but would presumably have broader support.
There is no handling for visbility or camera tracks which seem to be used
Change Log: 1.4
Added Retarget is intended to fix animation to match another skeleton bone layout (Does not currently work correctly)
1.2
Source Code:
Acknowledgements: