[REL] Havok Animation Converter

Post » Sun May 20, 2012 8:44 am

It is possible to convert original skeleton_female.hkx with hkxcmd in a readable (!) text xml-hkx. What about adding extra-bone in this xml? Export them with max in binary hkx; convert this file with hkxcmd to xml-hkx, check where they are, copy/paste these blocks to the original xml-hkx; convert it back to binary with hkxcmd. Perhaps, tails bone naming could be used for the extra-bones (as far as i understand tails are key-frame animated separately).

skeleton_female.hkx, skeleton_female.nif. Are they redundant, or used for different things?

Is skeleton_female.nif sufficient/responsible for this in-game effect?
[Animation]
bEnableHavokHit=1
User avatar
Jake Easom
 
Posts: 3424
Joined: Sun Jul 29, 2007 4:33 am

Post » Sun May 20, 2012 8:45 pm

The Game loads the skeleton_female.hkx (original xml version) just fine into the game.

I was going to edit the file to add additional bones but there is so much data. (Have to set the amount of bones and the position values etc etc)

Perhaps someone would have a better idea of the file then I would http://216.105.128.240/Cherry/Skyrim/havok/skeleton_female-Original.doc

You can load that file in a xml editor also
User avatar
ImmaTakeYour
 
Posts: 3383
Joined: Mon Sep 03, 2007 12:45 pm

Post » Sun May 20, 2012 1:07 pm

Finally!! I am getting somewhere now.
I edited the xml version of skeleton_female.hkx and I am able to add additional content to it without crashing the game or getting stuck in a T pose.

If you add additional bones then you must change the size value to match the bone count (For example if you are going to add one additional bone change it from 99 to 100.
You must do so to the following 3 values:

So if you add a bone below the array bones, at it at the bottom of the array (below "Camera Control") something like:
	  		NPC R NewBone01		1	  

Then under the "referencePose" section you need to add the bone as a child to another bone. For example if you are going to set it as a child of Spine2, Then you need to change the size from 6 to 7 for the additional child bone and add a reference number to it. The new bone also needs a unique id number to specify it. (I used 400 in this case, not sure if you cant use certain numbers or not yet)
  	NPC Spine2 [Spn2]		  #0073	  #0076	  #0079	  #0082	  #0097	  #0101	  #0400	    	NPC R NewBone01  

Now this works in the game (You can leave the hkx file in xml format it still works in game)
The problem I have is I dont understand what the "parentIndicies" section is and what the numbers represent (I just added a random number of 99 at the end in testing):
		  -1 0 0 0 0 4 5 6	  7 5 9 10 5 12 13 5	  15 16 5 18 19 5 21 22	  4 24 25 26 27 28 26 30	  31 0 0 26 35 36 29 32	  38 39 38 39 27 30 24 38	  39 36 8 11 29 29 28 54	  32 32 31 58 26 5 26 26	  5 5 5 38 67 68 38 70	  71 38 73 74 38 76 77 38	  79 80 39 82 83 39 85 86	  39 88 89 39 91 92 39 94	  95 -1 0 99	
So I need to find out what the numbers above represent.

Lastly Im guessing that the "referencePose" is the Positional, and Rotational values for each bone listed in order of the bones listed in the "bones" array above it.
Heres an example from the "referencePose" section:
x00000000  xb480000f  xa9bffffc  x3f800000  x33f33233  x27caad4b  x335558fb  x3f7fffff  x3f800000  x3f800000  x3f800000  x00000000 

I just copied and pasted a finger bone and put it at the bottom of the array to reference the new bone i put on the bottom of the "bones" array.

I was wondering if anyone can make any sense of the "parentIndicies" and the "referencePose" sections. If we can understand those two pieces then we can easily manually add as many bones as we want or need.

Soo close! I know we can get this. The XML is the key I think. That and the fact that the game will load the .hkx in its xml format is a super bonus!
User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am

Post » Sun May 20, 2012 11:39 pm

I was wondering if anyone can make any sense of the "parentIndicies" and the "referencePose" sections. If we can understand those two pieces then we can easily manually add as many bones as we want or need.

Parent Indicies is the simple mapping of nodes to thier parents you notice the first one is -1 this indicates that this node has no parent then you see 4 "0" this is the next 4 bones in your bones array all parented to bone 0 -> NPC Root [Root], so the value you want for your nodes is 26 -> NPC Spine2 [Spn2]

referencePose is the bind Pose base Positions, Rotations and Scales though its a Vector 12 so I am not sure what the extra bits of data are related to most likely properties like Visibility and such, easiest option would be to export a Skeleton.xml.hkx with your bones included and just copy/paste these values straight in.

Also I would suggest converting the XML.hkx back into a binary.hkx as the xml version is huge, when your done editing it.

----

Note: You may also need to edit the SkeletonMapper Containers at the bottom of the file, though I would only do this if things do not function without updating these.
User avatar
Johnny
 
Posts: 3390
Joined: Fri Jul 06, 2007 11:32 am

Post » Sun May 20, 2012 5:14 pm

Parent Indicies is the simple mapping of nodes to thier parents you notice the first one is -1 this indicates that this node has no parent then you see 4 "0" this is the next 4 bones in your bones array all parented to bone 0 -> NPC Root [Root], so the value you want for your nodes is 26 -> NPC Spine2 [Spn2]

referencePose is the bind Pose base Positions, Rotations and Scales though its a Vector 12 so I am not sure what the extra bits of data are related to most likely properties like Visibility and such, easiest option would be to export a Skeleton.xml.hkx with your bones included and just copy/paste these values straight in.

Also I would suggest converting the XML.hkx back into a binary.hkx as the xml version is huge, when your done editing it.

----

Note: You may also need to edit the SkeletonMapper Containers at the bottom of the file, though I would only do this if things do not function without updating these.

I thought about exporting my bones and taking the values but there is nothing like that in my export. in fact my export looks completely different then the original skeleton_female.hkx.

a couple posts back you can see the original skeleton_female.doc and the new one thats exported from 3dsmax skeleton_female.doc.
The files are completely different and there is no Vec12 nor any odd data in it either :(

Omg thank you for the "parentIndices" information! That makes perfect sense. Thats one more mystery solved. Thank you SaidenStorm!

I am not sure if I can get it to export the data the same way. Or if there is some way I can translate which vectors are which.

Because I cant make heads or tails of the 12 vectors.

This is Spine2 Vec12:
x341cf200  xbc8c2400  x411dd338  x38420000  xbdf67f22  xb4c0ba99  xb52a897e  x3f7e2393  x3f800001  x3f800001  x3f800001  x00000000 

im trying to find out if the numbers for example are positional, rotational or scale numbers. some of them even have letters in them.
Also the x numbers what the represent like: x341cf200

I wonder if anyone can shed light on it? Or know the way that I can get the havok exporter filters to export the bones in vec12 format?

Thanks
User avatar
Da Missz
 
Posts: 3438
Joined: Fri Mar 30, 2007 4:42 pm

Post » Sun May 20, 2012 11:54 pm

Eureka!
I think i figured it out!

It seems that if i export as a tagfile and XML in the Write to File filter then I can see the Vector data!
User avatar
Mandy Muir
 
Posts: 3307
Joined: Wed Jan 24, 2007 4:38 pm

Post » Sun May 20, 2012 1:48 pm

I realize you already figured it out but the x numbers are hexadecimal representation of the float. Its more accurate than converting to traditional format and back where it can actually change due to rounding. If you looked at a float in a hex editor that is what you would see.

I think there are some flags you can set on the hkxcmd to do conversion from the command line that I dont describe in the readme but do in the help if you just run hkxcmd help convertkf. You might try the Tools\BatchProcess\AssetCc\AssetCc2.exe tool from Havok as it probably has a few more options for converting the files.

I've sort of missed the rest of this conversation as I was working other things. Can I assume you have figured out a workflow that is reasonable at this point.

Edit and as SaidenStorm indcated the vec12 numbers is the bindpose matrix or local transform matrix. (I havent actually check the file myself)
User avatar
Ruben Bernal
 
Posts: 3364
Joined: Sun Nov 18, 2007 5:58 pm

Post » Sun May 20, 2012 1:05 pm

Hi The Hologram,

Looks like I have the bone files matching after hand editing the skeleton_female.hkx as a xml file.

The only issue I have now is trying to export the Animations back to hkx files as the tool here says the bones do not exist even when I point to my new skeleton_female.hkx that I created that DOES contain the files.
So the application you provide skips thos bones.
Is there a way to have it check what bones are provided in the skeleton_female.hkx file and accept the new bones?

If not then do you know the exact method of exporting the animationsfrom max with havoks filters?
This is how I have my filters set so far and it is not successful (Mind you it is successful if I export it as a .kf and use the app here but it skips the new bones in the skeleton_female.hkx file):

Create Skeletons Filter:
[img]http://216.105.128.240/Cherry/Skyrim/havok/HavokAnimationCreateSkeleton.JPG[/img]

Create Animations Filter:
[img]http://216.105.128.240/Cherry/Skyrim/havok/HavokAnimationCreateAnimation.JPG[/img]

Spline Compression Filter:
[img]http://216.105.128.240/Cherry/Skyrim/havok/HavokAnimationSplineCompression.JPG[/img]

Prune Types filter:
[img]http://216.105.128.240/Cherry/Skyrim/havok/HavokAnimPruneOptions.JPG[/img]

Write to platform Filter:
[img]http://216.105.128.240/Cherry/Skyrim/havok/HavokAnimationWriteToPlatform.JPG[/img]

If you have any ideas on how I need to set the filters so the animation is successfully exported or if the application created in this thread can read a skeleton_female.hkx with custom bones in it I would be a very happy girl!
I had everything set up for the bone system, all bones matching in the .nif and the .hkx files and all the original animations work on the new skeleton and the original animations show on the new bone rigg in the Havok previewer too.

Im sooo close. I can put together a whole writeup for you on how I edited the havok xml files to match the custom bones I made in max when this is all working too.
User avatar
Jenna Fields
 
Posts: 3396
Joined: Mon Dec 11, 2006 11:36 am

Post » Sun May 20, 2012 4:18 pm

Yeah I think the code is explicitly dropping the last couple of nodes which are usually the 3rd person camera because they caused problems when they were present. Mainly the third person camera would go wild when the animation was played. And didn't when I dropped them.

You might try the AssetCc2.exe converter. It has a number of options to on export but you might run into a similar problem.

Edit. I think SaidenStorm indicated that he had settings for export that actually worked properly. Your settings look reasonable to me but I think both of you have spent more more time with Havok than I have at this point.
User avatar
Sara Lee
 
Posts: 3448
Joined: Mon Sep 25, 2006 1:40 pm

Post » Sun May 20, 2012 10:09 am

Would you happen to know what the export filters would be for animations out of 3dsmax havok filters from post 58 here (a couple posts back)?

Do you know how to use the AssetCc2 converter provided from havok, or if the application you have here can be modified to allow custom bones and have it ignore camera?

Btw thank you very much for replying!
User avatar
kirsty joanne hines
 
Posts: 3361
Joined: Fri Aug 18, 2006 10:06 am

Post » Sun May 20, 2012 10:56 pm

Actually I think I misread part of what you were doing. AssetCc2 wont help in this particular case. I could put out a release without the camera block and let you sort out if you can make it work but I cannot promise anything. The next is maybe not using automatic skeleton select and explicitly selecting nodes that aren't being exported if that is what I read the problem to be.

AssetCC2 and "hkxcmd convert ..." are for converting XML Tag Packed. You have more of a straight export problem.

Saiden had the better export setting I think but I've not seen them. I figured using a bone list explicitly after adding the missing bones after initial import of the nif would be about whats required but I haven't look at this stuff since I wrote the tool last month and have forgot most of the details.

Edit: I dont have time to look at it today but I might be able to do a little over the weekend if you provide me with whatever work-in-progress you are trying to make work now.

Edit 2: I put up a new release of hkxcmd under the miscellaneous files at skyrimnexus with the noparent check for cameras removed which may help your missing bone on skeleton issue. Try at your own risk.
User avatar
Scarlet Devil
 
Posts: 3410
Joined: Wed Aug 16, 2006 6:31 pm

Post » Sun May 20, 2012 8:01 pm

Hi. Sorry for My English.

Ok I'm not animator but I have same problem here . Skew \Scale on some bones.
There is a way to fix it?

[img]http://216.105.128.240/Cherry/Skyrim/havok/HavokAnimationCreateAnimation.JPG[/img]
User avatar
Alister Scott
 
Posts: 3441
Joined: Sun Jul 29, 2007 2:56 am

Post » Sun May 20, 2012 10:06 am

The Skew/Scale problem is because you used Holograms updated NifTools importer and it imports the bones basically currupt I believe I mentioned this somewhere maybe not here...

What you have to do is completely recreate the entire rig from new bones -> what I do is create (I do this for every imported skeleton not just this one I prefer Nubs but thats just me) a new bone chain just one bone and the Nub then I clone the Nub the number of times required to replace every imported bone -> from there just use the Align Tool and give the new bones the correct names.

As for you export options you have to reconstruct the Rig File otherwise the animations would get exported in Hierarchy and that is not how the Mapping is designed -> its designed to work from the Perspective of BoneLOD so higher priority nodes are higher in the export hierarchy then nodes like fingers cameras toes and similar unimportant from a distance nodes.

https://sites.google.com/site/saidenstorm/tesv---skyrim-rig-files

You should be able to just edit in your new bones its plain text.
User avatar
Emzy Baby!
 
Posts: 3416
Joined: Wed Oct 18, 2006 5:02 pm

Post » Sun May 20, 2012 10:13 pm

Sorry buit I do not understand why is it usefull? To convert animations from the game to havok? Shouln't be the opposite more usefull?
User avatar
Georgine Lee
 
Posts: 3353
Joined: Wed Oct 04, 2006 11:50 am

Post » Sun May 20, 2012 2:59 pm

Sorry buit I do not understand why is it usefull? To convert animations from the game to havok? Shouln't be the opposite more usefull?

It does both.

But from the perspective of Blender users its absolutely required to be able to go both ways other wise they have zero ability to get animations in the game.
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Sun May 20, 2012 10:41 pm

So I downloaded

http://software.intel.com/sites/havok/downloads/HavokPcXsContentTools_X64_2011-2-0_20110916.exe?a=1325847469&b=dc88be78eb584cfc172ecc6ea0e46927 (2011.2.0, 64-bit)
and
http://software.intel.com/sites/havok/download/Havok_Physics_Animation_2011-2-0_PC_XS_win32_VS2010_keycode_perpetual_20111216.zip?a=1325847469&b=dc88be78eb584cfc172ecc6ea0e46927 (2011.2.0, VS2010)

is that right?

After I am able to create my own skeletons , and animation loops and export back to game?
Can I use CAT system to animate?
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am

Post » Sun May 20, 2012 9:17 pm

So I downloaded

http://software.intel.com/sites/havok/downloads/HavokPcXsContentTools_X64_2011-2-0_20110916.exe?a=1325847469&b=dc88be78eb584cfc172ecc6ea0e46927 (2011.2.0, 64-bit)
and
http://software.intel.com/sites/havok/download/Havok_Physics_Animation_2011-2-0_PC_XS_win32_VS2010_keycode_perpetual_20111216.zip?a=1325847469&b=dc88be78eb584cfc172ecc6ea0e46927 (2011.2.0, VS2010)

is that right?

After I am able to create my own skeletons , and animation loops and export back to game?
Can I use CAT system to animate?

Beth used 2010.2 not sure if you will have issues using 2011.2 instead, but if you do... revert to the older version

I have never used CAT but it seems to work fine off of bones from what I was able to read.
User avatar
Brad Johnson
 
Posts: 3361
Joined: Thu May 24, 2007 7:19 pm

Post » Sun May 20, 2012 11:11 am

Beth used 2010.2 not sure if you will have issues using 2011.2 instead, but if you do... revert to the older version

I have never used CAT but it seems to work fine off of bones from what I was able to read.

I usually use Cat to create and rig creatures and stuff from scratch , I dodn't use yet to apply on already exhisting skeletons , what do you use instead to animate?
anyway I would really like to know how to rig stuff with those rotated bones? It's impossible to me atm with the knowledge I have at least...
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Sun May 20, 2012 3:33 pm

I usually use Cat to create and rig creatures and stuff from scratch , I dodn't use yet to apply on already exhisting skeletons , what do you use instead to animate?

I have never needed any overly complex skinning utilities the Skin Modifier works for me just fine, I have never had an issue getting my Skin just how I want it.

As for Animating I use a combination of a Free Tool called PoseTool (Love this tool its absolutely fantastic for setting up a ton of poses you can blend into animations at will) -> the basic came with Max Animation Layering along with the Curve Editor and once I have a base I like I export into MotionBuilder and layer gravity, weight and secondary motion -> I then export from MB back into Max and clean up the physics simulated tracks (robes, hair, body fat, anything that need to wiggle or jiggle) and from there into whatever game it was meant for.

I do not usually do the MotionBuilder steps for my Mods because it adds hours to the development time for a single animated sequence.

anyway I would really like to know how to rig stuff with those rotated bones? It's impossible to me atm with the knowledge I have at least...

You tried painting the weights ? or just hand editing them ? Rigging is generally a slow and iteration intensive process to get a good skin.
User avatar
Peter P Canning
 
Posts: 3531
Joined: Tue May 22, 2007 2:44 am

Post » Sun May 20, 2012 6:49 pm

I have never needed any overly complex skinning utilities the Skin Modifier works for me just fine, I have never had an issue getting my Skin just how I want it.

As for Animating I use a combination of a Free Tool called PoseTool (Love this tool its absolutely fantastic for setting up a ton of poses you can blend into animations at will) -> the basic came with Max Animation Layering along with the Curve Editor and once I have a base I like I export into MotionBuilder and layer gravity, weight and secondary motion -> I then export from MB back into Max and clean up the physics simulated tracks (robes, hair, body fat, anything that need to wiggle or jiggle) and from there into whatever game it was meant for.

I do not usually do the MotionBuilder steps for my Mods because it adds hours to the development time for a single animated sequence.



You tried painting the weights ? or just hand editing them ? Rigging is generally a slow and iteration intensive process to get a good skin.

I do usually use the envelopes from the bones so expanding or reducing I get the influences by color zones , how do you do then ?
The bones are all [censored] up and I can't use "my technique" ..... Unless someone fixes them ...
User avatar
Nathan Barker
 
Posts: 3554
Joined: Sun Jun 10, 2007 5:55 am

Post » Sun May 20, 2012 10:01 pm

I do usually use the envelopes from the bones so expanding or reducing I get the influences by color zones , how do you do then ?
The bones are all [censored] up and I can't use "my technique" ..... Unless someone fixes them ...

You can move the Envelope where ever you want including to the next bone in the chain, its going to be a bit more tedious but its better then hand editing -> which I end up doing anyways on the fine tuning phase of my skining
User avatar
Jon O
 
Posts: 3270
Joined: Wed Nov 28, 2007 9:48 pm

Post » Sun May 20, 2012 6:08 pm

You can move the Envelope where ever you want including to the next bone in the chain, its going to be a bit more tedious but its better then hand editing -> which I end up doing anyways on the fine tuning phase of my skining
I tried that but its really working only for small and easy stuff , the bones are rotated and I always end up having smashed envelopes -_- ....

I hope someone could find a fix for that ....
User avatar
Devils Cheek
 
Posts: 3561
Joined: Sun Aug 13, 2006 10:24 pm

Post » Sun May 20, 2012 11:12 pm

Btw is there a way to just import an animation file into a 3dsmax scene for a ready to export mesh + rig to test the skinning without having to go in and out of the game?
User avatar
I love YOu
 
Posts: 3505
Joined: Wed Aug 09, 2006 12:05 pm

Post » Sun May 20, 2012 11:06 am

Actually I think I misread part of what you were doing. AssetCc2 wont help in this particular case. I could put out a release without the camera block and let you sort out if you can make it work but I cannot promise anything. The next is maybe not using automatic skeleton select and explicitly selecting nodes that aren't being exported if that is what I read the problem to be.

AssetCC2 and "hkxcmd convert ..." are for converting XML Tag Packed. You have more of a straight export problem.

Saiden had the better export setting I think but I've not seen them. I figured using a bone list explicitly after adding the missing bones after initial import of the nif would be about whats required but I haven't look at this stuff since I wrote the tool last month and have forgot most of the details.

Edit: I dont have time to look at it today but I might be able to do a little over the weekend if you provide me with whatever work-in-progress you are trying to make work now.

Edit 2: I put up a new release of hkxcmd under the miscellaneous files at skyrimnexus with the noparent check for cameras removed which may help your missing bone on skeleton issue. Try at your own risk.

Awesome I will try this tonight when I get home.

The Skew/Scale problem is because you used Holograms updated NifTools importer and it imports the bones basically currupt I believe I mentioned this somewhere maybe not here...

What you have to do is completely recreate the entire rig from new bones -> what I do is create (I do this for every imported skeleton not just this one I prefer Nubs but thats just me) a new bone chain just one bone and the Nub then I clone the Nub the number of times required to replace every imported bone -> from there just use the Align Tool and give the new bones the correct names.

As for you export options you have to reconstruct the Rig File otherwise the animations would get exported in Hierarchy and that is not how the Mapping is designed -> its designed to work from the Perspective of BoneLOD so higher priority nodes are higher in the export hierarchy then nodes like fingers cameras toes and similar unimportant from a distance nodes.

https://sites.google.com/site/saidenstorm/tesv---skyrim-rig-files

You should be able to just edit in your new bones its plain text.

SaidenStorm have you been able to export vanilla animations from 3ds max Havok filters with no problem (If you have do you have an example file and filter HKO file that shows the filters used?)?
Also I just realized I also have the 2011.2.0, 64-bit plugin for max. Perhaps I should be using the 2010.2 instead? Do you happen to know where to download previous versions (as long as it will work in 3ds max 2011)?

Also the link you have there, do I put that file in the filter instead of automatic in the create animations filter or the create skeletons filter?

(Sorry so many questions)
User avatar
Shelby McDonald
 
Posts: 3497
Joined: Sat Jan 13, 2007 2:29 pm

Post » Sun May 20, 2012 2:43 pm

Awesome I will try this tonight when I get home.



SaidenStorm have you been able to export vanilla animations from 3ds max Havok filters with no problem (If you have do you have an example file and filter HKO file that shows the filters used?)?
Also I just realized I also have the 2011.2.0, 64-bit plugin for max. Perhaps I should be using the 2010.2 instead? Do you happen to know where to download previous versions (as long as it will work in 3ds max 2011)?

Also the link you have there, do I put that file in the filter instead of automatic in the create animations filter or the create skeletons filter?

(Sorry so many questions)

That file is required for the Create Skeletons and Create Animations filters just choose "From File" -> also that file is incomplete as it does not contain any of the Float Slots, I recreated it from scratch and have not gotten to adding those as yet I'll do them later.

Created anims yes -> I have an entire sets of animations for Spears, Crossbows, Throwing Weapons, among others built off of the 1st and 3rd person rig files -> I will progress the files and my animations after the CK arrives and I know for sure exactly what it going to take to get new animation sets functioning if its at all possible.

Just sign up on the Havok web page to DL the older version -> I have no time now but I do have the 2011.2 plugins/tools I think I will install them later and see if they are compatible or not, I can give you an answer sometime tonight about 7-10 hours from now is the earliest I can test anything.
User avatar
Eibe Novy
 
Posts: 3510
Joined: Fri Apr 27, 2007 1:32 am

PreviousNext

Return to V - Skyrim