Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Havok binary files

Post questions about game models here, or help out others!
dibe91
mega-veteran
mega-veteran
Posts: 223
Joined: Tue Jul 29, 2014 9:06 am
Has thanked: 3 times
Been thanked: 14 times

Re: Havok binary files

Post by dibe91 »

a question ... you can bring your animations on 3d studio max 2011? and if possible, you can even to match the skin of the model with the skeleton?
JohnHudeski
mega-veteran
mega-veteran
Posts: 177
Joined: Wed Mar 02, 2011 10:38 pm
Has thanked: 10 times
Been thanked: 58 times

Re: Havok binary files

Post by JohnHudeski »

Sorry I forgot to check back. I converted the files to a custom animation type then bvh then imported to Motion Builder 2012 then fbx.
Long winded.
Can I post my code instead of looking at the files? I will also try looking at the files
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: Havok binary files

Post by SergeantJoe »

By all means, please do. We need anything we can get.
JohnHudeski
mega-veteran
mega-veteran
Posts: 177
Joined: Wed Mar 02, 2011 10:38 pm
Has thanked: 10 times
Been thanked: 58 times

Re: Havok binary files

Post by JohnHudeski »

I am assuming you can compile and run the havok sdk demo
Also assuming BrawlerA.hkx is the name of your skeleton file?

It is a long piece of code but you only need minimal adjustment
You can also change the conversion type

The compile time might be a bit long as we are re-purposing their demo project
replace
D:\hk2014_1_0_r1\Demo\Demos\Animation\Api\Playback\AnimatedSkeleton\AnimatedSkeletonDemo.cpp
with this

code here

Code: Select all

//line 1260
hkStringBuf assetFile("BrawlerA.hkx"); //loads skeleton

//line 1276
ofstream ofile("BrawlerA.skel", ios::binary); //saves skeleton in new format


//Line 1313 - 1316 (Read anim directory and create export folder)
char outfile[MAX_PATH] =  "F:/inAnimations/"; //Our animation folder
strcat(outfile,animfile.c_str());

char workdir[MAX_PATH] = "F:/OutAnimations/"; //output folder
strcat(workdir,animfile.c_str());

Code: Select all

//.h file
class AnimatedSkeletonDemo : public hkDefaultAnimationDemo
{
	public:

		HK_DECLARE_CLASS_ALLOCATOR( HK_MEMORY_CLASS_DEMO );

		AnimatedSkeletonDemo( hkDemoEnvironment* env );

		~AnimatedSkeletonDemo();

		Result stepDemo(); 

	private:

		class hkLoader* m_loader;

		class hkaSkeleton* m_skeleton;

		class hkaAnimation* m_animation;

		class hkaAnimationBinding* m_binding;

		hkArray<class hkaAnimatedSkeleton*> m_activeSkeletons;

};
I will get vS2012 in the mean time and test it myself
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: Havok binary files

Post by SergeantJoe »

JohnHudeski wrote:I am assuming you can compile and run the havok sdk demo
I cannot unfortunately. All my stuff is set up for Java, not C++.

Also, where exactly is the sdk demo located? Now that university is finally over I have a lot more time, I can probably get Visual Studio up and running soon.
JohnHudeski
mega-veteran
mega-veteran
Posts: 177
Joined: Wed Mar 02, 2011 10:38 pm
Has thanked: 10 times
Been thanked: 58 times

Re: Havok binary files

Post by JohnHudeski »

google havok sdk.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: Havok binary files

Post by shakotay2 »

JohnHudeski wrote:I am assuming you can compile and run the havok sdk demo
Also assuming BrawlerA.hkx is the name of your skeleton file?
yep. But it's very likely that it's not a matter of using the SDK but a matter of how hkx format was modified by SleepingDogs devs.

BrawlerA.hkx can not be loaded, as simple as that. (And I've no interest to debug the problem due to some missing sources as said above.)

@SergeantJoe: remember what I said (post as of May 19th) about recreating hkx using Havok Content Tools with 3dsmax?
Why not use the BrawlerA smd for it? Then compare the headers of the created hkx with the one of the unloadable SD BrawlerA hkx?
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: Havok binary files

Post by SergeantJoe »

Yup, I haven't forgotten about that! Like I said I have a lot more time now so I should have those ready today or tomorrow.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: Havok binary files

Post by shakotay2 »

accidentally I managed to do it, but the created file is an hkt, not hkx:
hk_2013.1.0-r1-hkt.JPG
Also for some reason the skeleton is not visible in the standalone tool (ToolStandAlone.exe).

This might be caused by the fact that I imported the BrawlerA smd from this thread into blender,
exported as FBX and reimported to max before using the HavokContentTools plugin.

(the hkt version is said to be hk_2013.1.0-r1 - dunno how to make a .2.0-r1 of it.)

(maybe 1.0= hkt, 2.0= hkx?)
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: Havok binary files

Post by SergeantJoe »

I'm pretty sure 2013.1.0 is the version number of the tools. If you look on the download page they have 2012.1.0 and 2012.2.0,but interestingly enough no 2013.2.0.
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: Havok binary files

Post by SergeantJoe »

Okay, so. I got the content tools, but I can't seem to export anything properly. There's all sorts of garbage in the file, but no actual animation info even though it's in the view XML modifier.

Also, to get an hkx you need to select Packfile in Write to Platform.
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: Havok binary files

Post by SergeantJoe »

I got the SDK and VS set up, but I'll need john to give some more details.

I sent him a PM, but until he comes back we gotta figure this out. I got myself an hkx file, but it seems to be creating model and skeleton files, not animations.
JohnHudeski
mega-veteran
mega-veteran
Posts: 177
Joined: Wed Mar 02, 2011 10:38 pm
Has thanked: 10 times
Been thanked: 58 times

Re: Havok binary files

Post by JohnHudeski »

Sorry I've been away (battling being broke and the blues lol)
If you have a detailed animation format of choice that is easy to replicate (basically good documentation)
I will attempt a conversion tomorrow (Saturday)
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Re: Havok binary files

Post by SergeantJoe »

I already said this in my PM but I'll say it again here so people can see: Source Engine SMD is easily the best format out there for this situation.

It's very simple, and is stored in plain ASCII to boot. It can contain mesh, UVs, bones, weights, and animations, all in the same file.

Plus every major 3D software already has plugins for it. That includes the big 3 - Blender/Max/Maya.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4291
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1151 times
Been thanked: 2244 times

Re: Havok binary files

Post by shakotay2 »

SergeantJoe wrote:Okay, so. I got the content tools, but I can't seem to export anything properly. There's all sorts of garbage in the file, but no actual animation info even though it's in the view XML modifier.
don't know what you did exactly but if you load a skeleton and its animation into 3dsmax an hkx export should be possible.

I tried Adria and her walking animation and exported it spline compressed correctly.

Only problem I have is that I didn't manage to export the skeleton and the animation seperately -
they are in one hkx file:
AdriaWalk.JPG
(minor problem: how to get rid of the collision sphere?)
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Post Reply