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!
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 »

SergeantJoe wrote:Even with university I got a ton of time on my hands
Welp, I completely ate my words, as soon as I said that finals week started.


Although here's a cool little sidenote: every day on the bus I would have a laptop with no access to heavy hardware like Max.
But over time I managed to create a small program that automatically splits .bin files into hkx files, so I can get samples much easier or so people can get their own.

Image

- >

Image


EXECUTABLE
SOURCE CODE


It does NOT do any conversion though, just separates the files. That's up next, as soon as I get these Max scripts working!

If we figure out the process, I could even add a function that not only extracts them but converts them directly to SMD! Although that may be a bit too optimistic.


Also, is nobody going to look at the smoking gun I posted?

Theoretically we don't need to search for the decompression algorithm because we already have it.
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:Also, is nobody going to look at the smoking gun I posted?
I did, especially at
If that's not the key then I'll eat my hat.
and I didn't want to tell you: "sorry for your hat, mate" :D
because what you have is a log, nothing more and nothing less.

The key would be, imho, to have hkxcmd recompiled using the suiting Havok SDK.

What I managed so far is to compile it with the 2010 SDK.
To come next will be a recompile with the 2013 SDK but I wouldn't wonder if I failed.

Also I find it totally annoying to have thousands of code lines compiled just to handle
a stupid compressed animation (hkaSplineCompressedAnimation).

It should be as simple as the hkx2smd conversion I did without any f...... library but the compression algo seems to be burried in hkaAnimation.lib.

That's the only reason why I care for this Havok shit. :D
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 »

shakotay2 wrote:and I didn't want to tell you: "sorry for your hat, mate" :D
because what you have is a log, nothing more and nothing less.
Oh, well then. Now I know.

Even a disappointing answer is better than no answer at all.
shakotay2 wrote:The key would be, imho, to have hkxcmd recompiled using the suiting Havok SDK.
That's exactly what I was trying to get at. If all the logs are the same for 2010/2013, then I'd wager the compression algorithm is the same as well.

I've already compared the differences between the 2010 and 2013 files, they are almost exactly the same except for some extra data at the top of the 2013 ones.
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:
shakotay2 wrote:I've already compared the differences between the 2010 and 2013 files, they are almost exactly the same except for some extra data at the top of the 2013 ones.
I tried to load your uploaded BrawlerA.hkx (with the first 0xDE bytes cut) into Havok ToolStandAlone (2013) and this is the error message it purges:

Havok Preview Asset
---------------------------
Wrong platform for packfile

Then I compared two hk_2010 files, GirlSkeleton and muscle03 where the first is loaded and the latter fails with the same error as above.
These are the bytes in the header that are different:
hk_2010.1.0-r1.JPG
Once I'll get the muscle loaded I'll try it with a compressed animation.

Patching the BrawlerA just causes CTDs.
Maybe you could code a tool that logs the hkx headers? Should not be too hard.

Once we have that we could write a tool to create hkx headers.


edit: recompiling with Havok SDK 2013 (as if I knew it :roll: )

got hundreds of errors because of missing defines such as
HK_REFLECTION_DEFINE_SIMPLE, HK_REFLECTION_DEFINE_VIRTUAL which where used in 2010's SDK
and seem to have gone away with SDK 2013

After I fixed that the next error popped up:
fatal error C1083: Cannot open include file: 'Physics/Dynamics/Entity/hkpRigidBody.h': No such file or directory

so it's gonna going to be an endless story (as always with Havok, niflib and so on)

After having copied dozens of folders from 2010's SDK to 2013 (it's not the very best idea to force backwards compatibility, I know :D )
I got syntax errors and that's the point where I state: too annoying to continue.

Maybe I should start with a simple "compressed animation sample" from SDK 2013, if so.

To be clear: figment is a great coder, so is his hkxcmd tool for 2010 hkx.

Havok is a great SDK, too. But seems you'll have to start from scratch for 2013 hkx (although having a working project for 2010 ones).
That's ridiculous. (or I'm simply too dumb, maybe :cry: )
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?"
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 »

yeah, animated skeletons:
AnimatedSkel.JPG
(looking later whether they're compressed)
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 »

Hmm, so hkxcmd is a bust no matter what?


And I already search for the animation headers, so yeah it's pretty easy to write them all to a separate log file.

But wait, by header do you mean all the data up to "WààW", or the entire block up to offset 0x0230?
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:Hmm, so hkxcmd is a bust no matter what?
it's ok for 2010-hkx but not worth for me to adapt it for 2013-hkx files. There are too many changes in the code from 2010's to 2013's SDK.
And I already search for the animation headers, so yeah it's pretty easy to write them all to a separate log file.

But wait, by header do you mean all the data up to "WààW", or the entire block up to offset 0x0230?
I meant all the bytes from "WààW" up to "hkClass".
But "logging" was the wrong term, what I meant was "analyzing" so that we could create a working fake header for muscle03.hkx for example.

So we need to know what the data at offsets 0x0C and 0x10 for example means.
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?"
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 »

it is possible to have animations of Dark Souls?
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 »

Maybe! What version do they use?

PM me a few samples and I can take a look.
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 »

dibe91 wrote:it is possible to have animations of Dark Souls?
Do you have a skeleton?
Makes no sense to ask for animations if you don't have a skeleton, imho:
c2310_hkx.JPG
(version: hk_2010.2.0-r1)
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?"
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 »

shakotay2 wrote:
dibe91 wrote:it is possible to have animations of Dark Souls?
Do you have a skeleton?
Makes no sense to ask for animations if you don't have a skeleton, imho:
c2310_hkx.JPG
(version: hk_2010.2.0-r1)

sure.I have everything I need.you may only be passed havok tools? I can not find them!
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 »

The havok tools are here.
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 used the sdk demoes to get the animations out
just load the respective files in the skeletal animation demo. They need to be PC I couldnt get the ps3 versions to work
then read the data
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 »

So then try to read the attached file (from the opening post with data before 57 E0 E0 57 cut) and you'll be an alltime hero. :D
Its endian signature at 0x11: 01 says: I'm a little endian file.
Nethertheless I could not load it using the havok sdk.

(Debugging is very time consuming - you need to go through assembler code because of missing sources such as hkload.cpp and so on.)
BrawlerA-cut.zip
@SergeantJoe: just to be sure: your uploaded hkx are PC files, aren't they?
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Wed Jun 10, 2015 11:07 am, edited 1 time in total.
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 »

Yes, all my files are PC.
Post Reply