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!
Post Reply
SergeantJoe
mega-veteran
mega-veteran
Posts: 242
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 57 times
Been thanked: 20 times

Havok binary files

Post by SergeantJoe »

Hello! I would like to ask, can anyone help me with converting 2013 Havok binary skeleton/animation files to a usable format, or at least to Havok ASCII?

I have the format pretty much figured out, I just haven't the foggiest idea on how to convert it to something usable.


Here's some sample animations and a skeleton.


There is already a Blender importer, but it only works for the 2012 version. However, the 2011 and 2013 formats are very similar, so I can't imagine there's a large difference between 2012 and 2013.

The animations use hkaSplineCompressedAnimation. Here's some info we got so far:

Code: Select all

struct __cppobj __declspec(align(8)) hkaSplineCompressedAnimation : hkaAnimation
{
  int m_numFrames;
  int m_numBlocks;
  int m_maxFramesPerBlock;
  int m_maskAndQuantizationSize;
  float m_blockDuration;
  float m_blockInverseDuration;
  float m_frameDuration;
  hkArray<unsigned int,hkContainerHeapAllocator> m_blockOffsets;
  hkArray<unsigned int,hkContainerHeapAllocator> m_floatBlockOffsets;
  hkArray<unsigned int,hkContainerHeapAllocator> m_transformOffsets;
  hkArray<unsigned int,hkContainerHeapAllocator> m_floatOffsets;
  hkArray<unsigned char,hkContainerHeapAllocator> m_data;
  int m_endian;
};
More definitions here.


And if you look at the ASCII example in the link at the top, it corresponds to this part here:

Code: Select all

 <hkobject name="#0042" class="hkaSplineCompressedAnimation" signature="0x792ee0bb">
         <!-- memSizeAndFlags SERIALIZE_IGNORED -->
         <!-- referenceCount SERIALIZE_IGNORED -->
         <hkparam name="type">HK_SPLINE_COMPRESSED_ANIMATION</hkparam>
         <hkparam name="duration">1.066667</hkparam>
         <hkparam name="numberOfTransformTracks">30</hkparam>
         <hkparam name="numberOfFloatTracks">0</hkparam>
         <hkparam name="extractedMotion">#0043</hkparam>
         <hkparam name="annotationTracks" numelements="0"></hkparam>
         <hkparam name="numFrames">33</hkparam>
         <hkparam name="numBlocks">1</hkparam>
         <hkparam name="maxFramesPerBlock">256</hkparam>
         <hkparam name="maskAndQuantizationSize">120</hkparam>
         <hkparam name="blockDuration">8.500002</hkparam>
         <hkparam name="blockInverseDuration">0.117647</hkparam>
         <hkparam name="frameDuration">0.033333</hkparam>
         <hkparam name="blockOffsets" numelements="1">
            0
         </hkparam>
         <hkparam name="floatBlockOffsets" numelements="1">
            4744
         </hkparam>
         <hkparam name="transformOffsets" numelements="0"></hkparam>
         <hkparam name="floatOffsets" numelements="0"></hkparam>
         <hkparam name="data" numelements="4752">
            69 0 0 0 69 112 240 0 69 5 240 0 69 1 240 0
            69 1 240 0 69 1 240 0 69 1 10 0 69 5 240 0
            ...
It's from 2010 though, which as you can see is very different from the 2013 layout.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Havok binary files

Post by shakotay2 »

SergeantJoe wrote:There is already a Blender importer, but it only works for the 2012 version.
speaking of which?
Does it support hkaSplineCompressedAnimation?
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 believe so, it's the one that cra0 and others did for Alien Isolation.

I haven't been able to test it though, I don't have that game and cra0 couldn't give me any samples since he got bored and quit a long time ago.


EDIT: Awww, fuck. I didn't look closely enough, the Blender importer is only for models. The bone tool is actually a separate exe, and it just converts hkx files to SMD.

Whether those files are ascii or binary I dont know. I should probably buy the game and make sure.


But still, that's good. Now we know it's at least possible to convert hkx files to a useable format. If we ask Wolfin I'm sure he'll explain how it works.

Or if all else fails we can jerry-rig the 2013 files to work with that program. I tried this with the Skyrim hkx converter, but the format is too different from 2010-2013.
User avatar
Bastien
advanced
Posts: 70
Joined: Sun Apr 15, 2012 1:08 am
Has thanked: 27 times
Been thanked: 13 times

Re: Havok binary files

Post by Bastien »

the Blender importer is only for models. The bone tool is actually a separate exe
Where's that uploaded?
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 »

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Havok binary files

Post by shakotay2 »

SergeantJoe wrote:, and it just converts hkx files to SMD.
[..]
But still, that's good. Now we know it's at least possible to convert hkx files to a useable format.
That's known since ages.
What we don't know is how to uncompress hkaSplineCompressedAnimations.
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 »

Could you please quickly explain what you mean by uncompress? What exactly is that process?
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Havok binary files

Post by shakotay2 »

SergeantJoe wrote:What exactly is that process?
If I knew exactly about uncompressing hkaSplineCompressedAnimations we wouldn't talk here, would we? :)

Think of a zipped file. You'll need to know the decompression algo to decompress it.
Or look here (NOT hkx related): viewtopic.php?f=16&t=8630&p=96977#p96977

btw, here's the BrawlerA.hkx (hk_2013.2.0-r1) skeleton as smd:

Code: Select all

# O:\BrawlerA.hkx
version 1
nodes
0 "Bip01" -1
1 "Bip01 Pelvis" 0
2 "Direction" 1
3 "Sync01" 2
4 "Balance" 1
5 "Bip01 Spine" 4
6 "Bip01 Spine1" 5
7 "Bip01 Spine2" 6
8 "Bip01 Spine3" 7
9 "Bip01 Neck" 8
10 "Bip01 Head" 9
11 "Bip01 L Thigh" 1
12 "Bip01 R Thigh" 1
13 "Bip01 L Calf" 11
14 "Bip01 R Calf" 12
15 "Bip01 L Foot" 13
16 "Bip01 R Foot" 14
17 "Bip01 L Toe0" 15
18 "Bip01 R Toe0" 16
19 "Bip01 L Clavicle" 9
20 "Bip01 R Clavicle" 9
21 "Bip01 L UpperArm" 19
22 "Bip01 R UpperArm" 20
23 "Bip01 L Forearm" 21
24 "Bip01 R Forearm" 22
25 "Bip01 L Hand" 23
26 "Bip01 R Hand" 24
27 "Bip01 L Finger0" 25
28 "Bip01 R Finger0" 26
29 "Bip01 L Finger01" 27
30 "Bip01 R Finger01" 28
31 "Bip01 L Finger02" 29
32 "Bip01 R Finger02" 30
33 "Bip01 L Finger1" 25
34 "Bip01 R Finger1" 26
35 "Bip01 L Finger11" 33
36 "Bip01 R Finger11" 34
37 "Bip01 L Finger12" 35
38 "Bip01 R Finger12" 36
39 "Bip01 L Finger2" 25
40 "Bip01 R Finger2" 26
41 "Bip01 L Finger21" 39
42 "Bip01 R Finger21" 40
43 "Bip01 L Finger22" 41
44 "Bip01 R Finger22" 42
45 "Bip01 L Finger3" 25
46 "Bip01 R Finger3" 26
47 "Bip01 L Finger31" 45
48 "Bip01 R Finger31" 46
49 "Bip01 L Finger32" 47
50 "Bip01 R Finger32" 48
51 "Bip01 L Finger4" 25
52 "Bip01 R Finger4" 26
53 "Bip01 L Finger41" 51
54 "Bip01 R Finger41" 52
55 "Bip01 L Finger42" 53
56 "Bip01 R Finger42" 54
57 "Bip01 L ForeTwist" 21
58 "Bip01 R ForeTwist" 22
59 "Bip01 LUpArmTwist" 19
60 "Bip01 RUpArmTwist" 20
61 "Bip01 L Prop" 25
62 "Bip01 R Prop" 26
63 "face_ingame_jaw" 10
64 "face_ingame_r_upper_lip" 10
65 "face_ingame_r_lip" 10
66 "face_ingame_l_lip" 10
67 "face_ingame_l_upper_lip" 10
68 "face_ingame_l_upper_eyelid" 10
69 "face_ingame_l_outer_eyebrow" 10
70 "face_ingame_l_inner_eyebrow" 10
71 "face_ingame_r_outer_eyebrow" 10
72 "face_ingame_r_inner_eyebrow" 10
73 "face_ingame_r_upper_eyelid" 10
74 "face_ingame_r_eye" 10
75 "face_ingame_l_eye" 10
76 "face_ingame_r_lower_lip" 63
77 "face_ingame_l_lower_lip" 63
78 "CameraSync01" 0
79 "Bip01 L Hand Effector" 0
80 "Bip01 R Hand Effector" 0
81 "l_upperarm_twist" 0
82 "r_upperarm_twist" 0
83 "l_shoulder_joint" 0
84 "r_shoulder_joint" 0
85 "Jiggle_R_Colar" 20
86 "Jiggle_L_Colar" 19
87 "Jiggle_R_Cuff" 24
88 "Jiggle_L_Cuff" 23
89 "Jiggle_B_Waist" 5
90 "Jiggle_R_Waist" 5
91 "Jiggle_R_Waist_002" 0
92 "Jiggle_L_Waist" 5
93 "Jiggle_L_Waist_002" 0
94 "Jiggle_R_Leg" 12
95 "Jiggle_L_Leg" 11
96 "Jiggle_R_Shin" 14
97 "Jiggle_L_Shin" 13
98 "Jiggle_R_Hem" 16
99 "Jiggle_L_Hem" 15
100 "Bip01 Bag001" 0
101 "Jiggle_Wei_Hair01" 10
102 "Jiggle_Long_Necklace" 0
103 "Jiggle_Long_Necklace_02" 0
104 "Jiggle_Short_Necklace" 0
105 "Jiggle_Short_Necklace_02" 0
106 "Jiggle_Stomache" 0
107 "Jiggle_Jackie_Bag" 0
108 "Jiggle_Jackie_Phone" 0
109 "Jiggle_Jackie_Necklace" 0
110 "Jiggle_Jackie_Hair" 0
111 "Bip01_Jackie_Chain_001" 0
112 "Bip01_Jackie_Chain_002" 0
113 "Bip01_Jackie_Chain_003" 0
114 "Bip01_Calvin_Necklace_001" 0
115 "Bip01_Calvin_Necklace_002" 0
116 "Jiggle_R_Boob" 0
117 "Jiggle_L_Boob" 0
118 "Jiggle_Hair_Frnt" 0
119 "Jiggle_Hair_Bck" 0
120 "Jiggle_Hair_Lft" 0
121 "Jiggle_Hair_Rgt" 0
122 "Jiggle_B_Skirt_Rgt" 0
123 "Jiggle_B_Skirt_Lft" 0
124 "Jiggle_Hair_Ponytail" 0
end
skeleton
time 0
0 0.000000 -0.000000 0.998452 0.000000 -0.000000 -1.570795
1 0.000000 0.000000 0.000000 0.090661 -1.570796 -1.661456
2 -0.998452 0.000000 -0.000001 1.067801 -1.570451 2.073792
3 0.000000 0.000000 -0.000000 0.000000 -0.000000 0.000000
4 0.061026 -0.020621 0.000000 1.140897 -1.569705 2.000695
5 0.000000 -0.000000 -0.000000 -1.570797 -1.570796 -1.570797
6 0.120951 -0.000096 0.000000 -0.000000 -0.000000 0.000000
7 0.120951 -0.000096 -0.000000 -0.000000 -0.000000 0.000000
8 0.120951 -0.000096 -0.000000 -0.000000 -0.000000 0.000000
9 0.128489 -0.019381 -0.000000 -0.000000 -0.000001 0.182813
10 0.077382 0.006895 0.000000 -0.000000 0.000000 -0.130540
11 -0.000000 0.000000 0.089957 -3.141027 -0.054466 -3.061052
12 0.000000 -0.000000 -0.089957 3.141030 0.054469 -3.061052
13 0.449787 -0.000000 0.000000 0.000000 0.000000 -0.000977
14 0.449787 0.000000 0.000000 -0.000000 -0.000000 -0.000977
15 0.447161 0.000000 -0.000000 -0.228498 -0.054245 0.081667
16 0.447161 0.000000 0.000000 0.228498 0.054246 0.081667
17 0.098783 0.133179 -0.001318 -0.000000 -0.000000 1.570796
18 0.098783 0.133179 0.001318 0.000000 -0.000000 1.570796
19 -0.039012 0.017390 0.037606 -0.944282 -1.403160 -2.387639
20 -0.039012 0.017390 -0.037606 0.944258 1.403165 -2.387663
21 0.164030 0.000000 0.000000 -0.036490 0.659105 -0.304214
22 0.164030 0.000000 -0.000000 0.036490 -0.659105 -0.304214
23 0.269872 0.000000 -0.000000 -0.000000 0.000000 -0.148916
24 0.269873 0.000000 0.000000 0.000000 -0.000000 -0.148916
25 0.257988 0.000000 0.000000 -1.880375 -0.019397 0.169870
26 0.257988 0.000000 -0.000000 1.880375 0.019397 0.169870
27 0.024097 0.004039 -0.034148 1.160342 0.687200 0.420147
28 0.024097 0.004039 0.034148 -1.160342 -0.687200 0.420147
29 0.040794 0.000000 0.000000 -0.000000 -0.000000 0.211794
30 0.040794 -0.000000 0.000000 0.000000 -0.000000 0.211794
31 0.034064 -0.000000 0.000000 0.000000 -0.000000 0.016612
32 0.034064 0.000000 0.000000 -0.000000 0.000000 0.016612
33 0.103943 -0.000469 -0.035487 -0.000819 0.235556 -0.000191
34 0.103943 -0.000468 0.035487 0.000819 -0.235556 -0.000191
35 0.034173 0.000000 -0.000000 -0.000000 -0.000000 0.085069
36 0.034173 0.000000 0.000000 0.000000 0.000000 0.085069
37 0.024721 0.000000 0.000000 0.000000 0.000000 0.092737
38 0.024721 -0.000000 -0.000000 -0.000000 -0.000000 0.092737
39 0.108053 0.000488 -0.009367 -0.153563 0.054423 0.031571
40 0.108054 0.000488 0.009367 0.153563 -0.054423 0.031572
41 0.039110 -0.000000 -0.000000 -0.000000 -0.000000 0.026296
42 0.039110 0.000000 0.000000 0.000000 0.000000 0.026296
43 0.028279 0.000000 0.000000 0.000000 0.000000 0.043986
44 0.028279 -0.000000 0.000000 0.000000 -0.000000 0.043986
45 0.101948 0.005554 0.016613 -0.231834 -0.118925 0.053755
46 0.101949 0.005554 -0.016613 0.231834 0.118925 0.053755
47 0.038861 0.000000 0.000000 -0.000000 0.000000 0.048242
48 0.038861 0.000000 -0.000000 -0.000000 0.000000 0.048242
49 0.027379 0.000000 -0.000000 -0.000000 -0.000000 -0.007270
50 0.027379 0.000000 0.000000 0.000000 -0.000000 -0.007270
51 0.093347 0.012723 0.037965 -0.216471 -0.261607 0.166656
52 0.093347 0.012724 -0.037965 0.216471 0.261607 0.166656
53 0.029315 0.000000 0.000000 -0.000000 -0.000000 0.001411
54 0.029315 0.000000 -0.000000 -0.000000 0.000000 0.001411
55 0.020510 -0.000000 -0.000000 0.000000 0.000000 0.077614
56 0.020510 0.000000 0.000000 -0.000000 -0.000000 0.077614
57 0.269872 0.000000 -0.000000 -0.156721 0.000000 -0.148916
58 0.269872 0.000000 0.000000 0.156722 -0.000000 -0.148916
59 0.164030 0.000000 0.000000 0.055100 0.659106 -0.304214
60 0.164030 0.000000 0.000000 -0.055100 -0.659105 -0.304214
61 -0.000000 -0.000000 -0.000000 -0.000000 -0.000000 -0.000000
62 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
63 0.047304 0.043625 0.000000 3.141592 -0.000001 2.315846
64 0.036751 0.111929 -0.009477 2.953683 -1.569883 1.705637
65 0.032480 0.102163 -0.023402 2.953683 -1.569883 1.705637
66 0.032482 0.102158 0.023256 2.953683 -1.569883 1.705637
67 0.036752 0.111929 0.008951 2.953683 -1.569883 1.705637
68 0.105850 0.102149 0.031216 -0.523877 -1.570796 -1.099988
69 0.127614 0.087155 0.044827 -0.523877 -1.570796 -1.099988
70 0.126146 0.105804 0.013712 -0.523877 -1.570796 -1.099988
71 0.127614 0.087155 -0.045484 -0.811932 -1.570796 -0.811932
72 0.126240 0.106008 -0.014382 -0.523877 -1.570796 -1.099988
73 0.105850 0.102149 -0.027988 -0.523877 -1.570796 -1.099988
74 0.099929 0.081067 -0.028751 -3.141590 -1.483529 1.517725
75 0.099929 0.081067 0.028556 -0.000001 -1.483529 -1.623864
76 0.062223 0.033175 0.010326 0.849986 1.570796 -3.064284
77 0.062217 0.033175 -0.010183 1.738467 1.570451 -2.175804
78 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
79 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
80 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
81 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
82 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
83 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
84 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
85 0.031651 -0.058240 -0.061391 0.000000 0.000000 -0.000000
86 0.019416 -0.064813 0.035275 0.000000 -0.000000 -0.000000
87 0.184674 -0.000000 0.000000 -0.000000 0.000001 0.000000
88 0.185000 -0.000000 0.000000 -0.000000 0.000000 -0.000000
89 0.034000 -0.129245 -0.000000 -3.094408 -1.570796 1.522815
90 -0.022000 0.148000 -0.124000 -3.094408 -1.570796 1.522815
91 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
92 -0.022000 0.148000 0.115000 -3.094408 -1.570796 1.522815
93 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
94 0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000
95 0.000000 -0.000000 -0.000000 -0.000000 0.000000 -0.000000
96 0.253332 -0.009209 -0.005665 -3.136642 0.054246 0.081667
97 0.253414 -0.009210 0.004172 3.050716 1.516326 -0.009345
98 -0.000000 0.000000 0.000000 -0.000003 0.000000 -0.000000
99 -0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000000
100 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
101 0.215375 0.091877 0.000000 3.097516 -1.570796 1.561804
102 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
103 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
104 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
105 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
106 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
107 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
108 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
109 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
110 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
111 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
112 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
113 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
114 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
115 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
116 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
117 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
118 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
119 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
120 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
121 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
122 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
123 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
124 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
end
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:Think of a zipped file. You'll need to know the decompression algo to decompress it.
Ah, okay. I was thinking of something along those lines but wasn't exactly sure.

So it's basically a formula used to convert binary values to numbers? Because I think I saw something related to that.
We have an insane amount of information that we were incredibly lucky to get, I'm certain it's in there somewhere.


Thanks for the smd by the way. Did you find a method to automate the process or is it still done manually?
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Havok binary files

Post by shakotay2 »

SergeantJoe wrote:So it's basically a formula used to convert binary values to numbers? Because I think I saw something related to that.
We have an insane amount of information that we were incredibly lucky to get, I'm certain it's in there somewhere.
yeah, we would need the formulae or we could use the Havok Content Tools with 3dsmax
Havok_spline_compression.JPG
and save two version of an animation: spline compressed and uncompressed. Then compare the outputs to each other. That's the idea.
But it's just a hobby of mine and I'm too busy with real life than to expect having this solved too soon.
Maybe there's a solution somewhere in the inet?
Did you find a method to automate the process or is it still done manually?
It's half automated, three offsets to be searched manually. But that's of very low priority since some basic skeletons are sufficient, aren't they?
(If you need another one to be transformed feel free to PM it. That's normally a 5 minutes job to transform it.)
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Tue May 19, 2015 10:17 pm, 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 »

shakotay2 wrote:or we could use the Havok Content Tools with 3dsmax and save two version of an animation: spline compressed and uncompressed. Then compare the outputs to each other.
You know, this just might be the idea that solves the whole problem.

Even with university I got a ton of time on my hands, I'll definitely try this out.
Is there a specific place or link where I can get those tools? I tried searching but only found technical problem forum threads about them.
shakotay2 wrote:But that's of very low priority since some basic skeletons are sufficient, aren't they?
Of course. We have all the skeletons we need, but I thought it was necessary to have one in hkx ascii to load in the Havok Standalone tool.

Luckily it seems we don't need that program anymore though since it's possible to convert hkx straight to smd.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: Havok binary files

Post by shakotay2 »

SergeantJoe wrote:Even with university I got a ton of time on my hands, I'll definitely try this out.
yeah, that was the time when life was sooo easy. :D
Is there a specific place or link where I can get those tools? I tried searching but only found technical problem forum threads about them.
I'm not too sure but guess I got them from here:
https://software.intel.com/sites/havok/en/
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 »

Alright, perfect. Let's see how this goes.
Darkfox
VVIP member
VVIP member
Posts: 688
Joined: Fri Jul 04, 2003 6:11 pm
Has thanked: 33 times
Been thanked: 16 times

Re: Havok binary files

Post by Darkfox »

Oh, out from the shadows I emerge.

Havok, huh? Personally I'm interested in the old format used by Bioshock 1 and 2. 4.1.0-r1 if I recall correctly. I know UE Viewer supports the mesh plus the model but never heard of the HKX animations being cracked. Tried available tools and got a half-way XML conversion but all animations get nulled of course due to it being archaic compared to the HKX version used in Sonic Generations and Skyrim.

And... of course the tools aren't quite designed to read skeletons from an Unreal skeletalmesh. Oh Bioshock, such a crazy hybrid you are.

Anywho, interested to see what comes of this.
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 »

Man, you have no idea how happy I am to have you here. For over two years now it's been just the me, Bastien, and now once again Shako. To have someone else even as a spectator is an unprecedented event.



Also, I had a thought. There is already a program that can convert SplineCompressedAnimations from binary to ascii format.

It's intended for 2010 files though. We can't just give it 2013 files unless we remove some data at the beginning, so I don't know how reliable that is.


But we can take a look at the source code and see what decompression algorithm it uses, that'll give us a place to start at least.


EDIT: Yup, if I give the 2010 converter a 2011 file it converts but gives odd results, and 2013 doesn't work at all.

Also if you use it's report feature, you get some pretty interesting stuff.

Code: Select all

Signature:	42e878d3
VTable:	FALSE
Name:	hkaSplineCompressedAnimationTrackCompressionParams
Parent:	HK_NULL
Size:	28
#IFace:	0
#Enums:	2
 000	RotationQuantization (POLAR32=0;THREECOMP40=1;THREECOMP48=2;THREECOMP24=3;STRAIGHT16=4;UNCOMPRESSED=5) {00000000}
 001	ScalarQuantization (BITS8=0;BITS16=1) {00000000}
#Members:	12
 000	rotationTolerance,HK_NULL,HK_NULL,hkReal,0000000b,00000000,0,00000000,0,HK_NULL,HK_NULL
 001	translationTolerance,HK_NULL,HK_NULL,hkReal,0000000b,00000000,0,00000000,4,HK_NULL,HK_NULL
 002	scaleTolerance,HK_NULL,HK_NULL,hkReal,0000000b,00000000,0,00000000,8,HK_NULL,HK_NULL
 003	floatingTolerance,HK_NULL,HK_NULL,hkReal,0000000b,00000000,0,00000000,12,HK_NULL,HK_NULL
 004	rotationDegree,HK_NULL,HK_NULL,hkUint16,00000006,00000000,0,00000000,16,HK_NULL,HK_NULL
 005	translationDegree,HK_NULL,HK_NULL,hkUint16,00000006,00000000,0,00000000,18,HK_NULL,HK_NULL
 006	scaleDegree,HK_NULL,HK_NULL,hkUint16,00000006,00000000,0,00000000,20,HK_NULL,HK_NULL
 007	floatingDegree,HK_NULL,HK_NULL,hkUint16,00000006,00000000,0,00000000,22,HK_NULL,HK_NULL
 008	rotationQuantizationType,HK_NULL,RotationQuantization,enum RotationQuantization,00000018,00000004,0,00000000,24,HK_NULL,HK_NULL
 009	translationQuantizationType,HK_NULL,ScalarQuantization,enum ScalarQuantization,00000018,00000004,0,00000000,25,HK_NULL,HK_NULL
 010	scaleQuantizationType,HK_NULL,ScalarQuantization,enum ScalarQuantization,00000018,00000004,0,00000000,26,HK_NULL,HK_NULL
 011	floatQuantizationType,HK_NULL,ScalarQuantization,enum ScalarQuantization,00000018,00000004,0,00000000,27,HK_NULL,HK_NULL
Version:	0
Which matches the info from the 2013 PBD perfectly!

Code: Select all

enum hkaSplineCompressedAnimation::TrackCompressionParams::ScalarQuantization
{
  BITS8 = 0x0,
  BITS16 = 0x1,
};

/* 2852 */
enum hkaSplineCompressedAnimation::TrackCompressionParams::RotationQuantization
{
  POLAR32 = 0x0,
  THREECOMP40 = 0x1,
  THREECOMP48 = 0x2,
  THREECOMP24 = 0x3,
  STRAIGHT16 = 0x4,
  UNCOMPRESSED = 0x5,
};

/* 26472 */
struct hkaSplineCompressedAnimation::TrackCompressionParams
{
  float m_rotationTolerance;
  float m_translationTolerance;
  float m_scaleTolerance;
  float m_floatingTolerance;
  unsigned __int16 m_rotationDegree;
  unsigned __int16 m_translationDegree;
  unsigned __int16 m_scaleDegree;
  unsigned __int16 m_floatingDegree;
  hkEnum<enum hkaSplineCompressedAnimation::TrackCompressionParams::RotationQuantization,unsigned char> m_rotationQuantizationType;
  hkEnum<enum hkaSplineCompressedAnimation::TrackCompressionParams::ScalarQuantization,unsigned char> m_translationQuantizationType;
  hkEnum<enum hkaSplineCompressedAnimation::TrackCompressionParams::ScalarQuantization,unsigned char> m_scaleQuantizationType;
  hkEnum<enum hkaSplineCompressedAnimation::TrackCompressionParams::ScalarQuantization,unsigned char> m_floatQuantizationType;
};
If that's not the key then I'll eat my hat.
Post Reply