Jump to content

HKXPack/HKXAnim - Animations in FO4


Recommended Posts

Animations in FO4


See this thread for how to actually make animations right now using 3DsMax and HCT


Creating animations

  • With Blender
    • Tool in developpement
  • With 3DsMax
    • Tool in developpement
  • With Havok animation studio
    • Done (native)
  • With Havok Content Tools and the 3DsMax Nif plugin

Adding animations to the game


People are in the process of making tutorials to explain how to add animations with the CK. In the meantime, you can check how some mods are made to see how they did it.

Note : as of now, there is no planned FNIS because, well, the CK seems to be able to do everything. If you EVER hit a road block which would require FNIS, don't hesitate asking here, so we can start to work on a FNIS-like solution immediately !

  • Simple animations
    • Done (from the Creation Kit directly)
  • Furniture animations
    • Done (from the Creation Kit directly)
  • Animobjects
    • Done (from the Creation Kit directly)
  • Killmoves
    • Not known yet
  • Paired animations
    • Not known yet

The modding tools

HKXPack

The HKX file editor

 

What is HKXPack ?

HKXPack is an HKX file editor. It can convert the binary HKX files to an XML file and back, as well as provide an API on this extracted data.

This tool is written with the Fallout 4 format in mind (2014.1.0-r1 x64). Support for Skyrim format is a possible evolution but not a priority.

 

What is the status of HKXPack

HXKPack is in Pre-release stage. There is no known bug.
 

How can I be updated on the state of the tool ?

You can check this thread for any future updates. I'll try to keep you updated for any breakthroughs and/or new tools. You can also check the GIT (linked below) 
 

How can I help making this mod?

There is a git of the HKXPack mod here (GitHub).
If you have experience with behavior files or any other insight on how the Havok animation system works, don't hesitate to post it here too. I admit I'm a complete noob about Havok, so any infos are welcome.

Don't hesitate to post any findings here. If that matters to you, any contributions to the mod will make your name appears in the "Contributor" section just below!
 

Contributors

DexesTTP - CPU - Figment - Fore + others that are listed on GitHub (and didn't come from here, so yeah.)
 

HKXAnim

The HKX animation creator

HKXAnim's aim is to convert the HKX data found in animations and skeletons to a more useable format, and back to a HKX file.

At first, the tool should be used only to create new FO4 animations.

HKXAnim is in indev stage. There's no versions out yet, and there isn't even results to extract data from an animation file.
 

How will HKXAnim work ?

The final version should work like this. Each step is either light blue (done), orange (indev) or red (not started)

  • Open Blender or 3DsMax sample project with rigged body. (no project for 3DsMax yet)
  • Create your animation in Blender/3DsMax
  • Export the animation in Collida (.dae) [for 3DsMax, use the non official plugin]
  • Launch the HKXAnim tool
  • Drop the Collida file on the HKXAnim window
  • Choose the saving location of the animation file
  • Add the animation to your project
  • Connect the animation to the game (using the CK)

How can I help making this mod?

Here is the git of the HKXAnim mod here (GitHub).
 

Contributors

DexesTTP - CPU - Figment - Leito86 - Lordescobar666 - Volfin

 

Updates

This will be updated when I make any discoveries/progress worth sharing. Check the git for a more detailed list of findings.

 

2016-11-19 Updated this thread to put direct links to the F4AK thread at the top of the page, and to add a short explanation about FNIS.

2016-11-06 Updated HKXPack to correct the last reaminign bug. No known bugs as of now.
2016-07-16 Updated thread to add instructions for the Havok export. Added mention about the 3DsMax project not being available.
2016-05-25 Updated thread due to it being stickied.
2016-05-24 No more progress on the tool at the moment, will try to get back to it as soon as possible.
2016-05-15 Finished COLLIDA animation extracting, working on mixing it with skeleton data.
2016-05-12 Chosen COLLIDA as export format.
2016-05-08 Thanks to Lordescobar666's work, beginning to work on a bvh => hkx converter.
2016-04-29 Changed the topic focus from AF4 (now defunct) to HKXPack and HKXAnim.
2016-04-20 Continued ironing out bugs from HKXPack.
2016-04-10 Started working on animation conversion
2016-03-25 Finished work on skeleton data.
2016-03-06 Finished improving everything. Most files are 100% the same now ! I'll start working on skeleton data.
2016-03-02 I managed to get things working in-game using an improved but imperfect padding algorithm.
2016-02-28 Finished rebuilding a theoretically valid HKX file from the XML. The in-game test failed though. I have some ideas about what to fix.
2016-02-23 Finished rebuilding data from the XML. There's still the hkx generation to do.
2016-02-21 Finished most of the refactor. Starting working on the writer... again.
2016-02-19 Back, with a big refactor of the code. Some fixes to do and the new code will work just as the old one.
2016-01-30 I have to rewrite near everything to make writing back work. Won't be doing it for a couple weeks.
2016-01-29 Released version 0.0.5 with most data support done, started work on writing back.
2016-01-23 Finished most of the implementation. HKXPAck can now extract animation files just fine !
2016-01-19 Finally found the nearly complete hkx creation algorithm. Began resolving bugs for old version.
2016-01-17 Long time no updates : continued work on hkxunpack (now hkxpack)
2015-12-31 Started work on hkxunpack, to unpack hkx files.
2015-12-29 Linked data1, data2 and data3 components. hkx file structure is now nearly fully understood.
2015-12-28 Added all data and type analysis to tool. Added support for animations and other versions (i.e. Skyrim version)
2015-12-28 Added data1 analysis to tool. Studying organization of types elements.
2015-12-27 Decrypted hkx file data part 1. Working on types.
2015-12-26 Created git
2015-12-25 Decrypted hkx file header. Working on data
2015-12-23 Started working on analysis tool
2015-12-21 Started working on AF4

 

Link to comment

Before you even begin this project, is it confirmed that custom animations suffer the same tragedy as Skyrim?

You mean if we won't be able to add them easily ? The format is basically the same, so I guess the work to do is similar too.

 

If you mean the fact an animation editor isn't in the CK, I don't know about the GECK but from what I know it's the same tool Bethesda devs use. Animation edition is a separate tool (Havok Animation Studio) so I guess it won't be shipped with the GECK.

Link to comment

Well done.

Keeping modders (and user) informed is important.

 

 

As the "best section" for this (until it will become a real Framework) probably the section Modders Resources is better.

(Or you will end in tons of requests like: "can you add this specific animation?" that is not related to the framework.)

 

Link to comment
Guest endgameaddiction

Not trying to discourage you, believe me when I say a FNIS like tool is something that IS going to be needed for Fallout 4 if the same happens for Fallout 4 as Skyrim, but it would suck if custom animations can be added in GECK.

 

I'm familiar with the havok tools. I was fortunate to grab the version used for 3dsmax 2012 for Skyrim before MS took over havok and took down the download links. I don't know if 3dsmax 2012 will be useful for Fallout 4 because I don't know if the scripts/plugins support for 2016 would also support older versions, or if older versions will be supported as well.

 

But this is wonderful news. lets just hope that Bethesda has consideration for animators and ships it with GECK. If not, this tool will definitely be a must.

Link to comment

Well, even if there's an option to add animations in the GECK, I don't see how an open-source alternative is a bad thing (especially to help other games/future games who will be less fortunate).

 

When I was thinking of the Havok Animation studio, I was thinking of the whole suite, not just the free SDK. I'm sure Bethesda is using the full version - especially when they made an offiical review of the software. That's why it seems really unlikely they will ship it with the GECK, they just won't have the right on the tool.

Maybe at most they will add a way to convert files from Havok XML to compiled, and even that would be a godsend. I don't see how hey would do it easily though, so I have little hope.

 

The plugin for 3DsMax 2012 is what allowed the old hkxcmd tool to exist. However, the format changed (mostly, the format changed to 64bits) and the old plugin doesn't work for the new animations. I don't know if we can put old files in FO4 though, I guess i'll have to try it.

Link to comment
Guest endgameaddiction

hmmmm I hope so. I was really thinking of getting into animations for Fallout 4 and had some mods I have been taking notes to work on. Thanks for the insight and if you do find out if you can or can't put old files in FO4, let us know. I do not currently have Fallout 4.

 

Getting it is a give or take. Hard to say no when good stuff comes out like body slide, expired working on a RM like mod for Fallout 4 and you with this. :)

Link to comment

Update : I already managed to write the beginning of a parser for the FO4 behavior files, but I now added support for FO4 animation format and the old Skyrim behaviors and animations. If I find what are the missing links in the file, I'll be able to write a tool to convert back and forth from Fallout AND Skyrim to XML, and even to add support for other games "relatively" easily.

It might also allow people to use the old 3DsMax plugin, but I don't know yet. Can anyone tell me how it used to work ? Especially :
> Did the output files have to be converted before being included into Skyrim ?
> What was the workflow to create animations ?

Link to comment

Hi DT,

 

I got your PM, and I'm willing to help with information. But I think it's probably in your interest as well when we do this in public.

 

 


Hello,

 

I'm currently working on a way to port FNIS and HKXcmd into Fallout 4 (thread here). I think I have a pretty good grasp of what to do, however I try to base myself on your work (sources + documentation) and there is some things I didn't understand yet.

 

You mention in your modding documentation that FNIS changed the standard behavior files. Based on what FNISCreatures does (I work on simpler things that the character for now), I saw you added two new objects (a behavior reference generator and a state machine state info). I couldn't however find anything on how you did it or why.

 

Do you have any documentation I didn't find ? And, if not, would you be willing to either make some or explain a little bit to me what you did ?

comment_new.png Reply

 

 

The sources you talk about probably are the old FNIS 3.3 sources. I'm willing to share the current ones. Although not yet publicly. Because I'm very much afraid that as soon as I release sources there will be people distibuting FNIS clones, and then I cannot distinguish any more. I also think that for a port those 3.3 sources are even better suited. Because they implemented the principles of custom "Idles".

 

In the meantime FNIS is several times as big as it was then. But all add-ons are so Skyrim specific, that I think they will ewven be in your way of bringing it to FO4. The original set of "basic" and "sequenced" animations was rather simple compared to that, and that was the only reason why I was able to add creature animations in a relatively short period of time.

 

And no, there is no documentation at all. Everything is HBT internal. I analyzed what what I saw in existing behavior files, and then I tried to use the same structures for FNIS. Although they way I used the behavior reference generator was a little different then this is used in Skyrim. In Skyrim there are events that lead to the animations encapsulated in the referenced behavior files. In FNIS I only list the reference generators. But apparently that worked as well. 

 

Link to comment

Instead of A.F.F.F. as a name, why not AF4? Animations Framework for Fallout 4. It's a Fallout reference and a nerdy math reference. Win-win in my book.  ;)

Probably because most people can't be bothered learning how to do sub-text so will just type AF4 instead and because I have limited vision I had to Zoom to even see the "4" otherwise I thought it was just a comma
Link to comment

Instead of A.F.F.F. as a name, why not AF4? Animations Framework for Fallout 4. It's a Fallout reference and a nerdy math reference. Win-win in my book.  ;)

Actually, that was what the name was supposed to be apparently. I just didn't understand it that way when I made that thread, and now I'm too lazy to change it.

 

Edit : just for you bby

Link to comment

Not sure if your aware of this or if it would help. Someone managed to get some animations into the game. not sure if its custom work or just finding unused animations already in game.

 

http://www.nexusmods.com/fallout4/mods/6113/?

 

But I'll give you the link in case it might help. Really looking forward to seeing this in action!

No sorry, this would be far beyond my abilities. I'm only renaming animations that are currently in the game, and making them available to the player character.

from here

 

But, don't worry. I'm making steady progress on the tool.

 

Thanks for the info :)

Link to comment

Same as before, as :

PS: the havok physics data is copy from vanilla bathrobe one, so it may looks a bit strange ans has some clips. Without fully discovery the secret of it, I can do nothing about it.

(from file description)

 

I'm interested in it anyways, because some of the NIF data is physics, and it's interesting to compare the format with what I found.

 

Thanks a lot :)

Link to comment
  • 3 weeks later...

An update, because it has been a long time:

I'm still working on the project, and I've made steady progress on the "hkxpack" tool. There's no ETA yet, as I don't know if it is gonna work at all and I'm working on the hkx -> xml part only, but I might say that this functionality is gonna be finished Soon™.

The main reason for this update is because it occurred to us the hkx files contains also animations, and the animators out there might want a way to put new things in the game. However, there's a problem: we don't have a good file format to output the animations to.
 
So, does anyone have a good animation format? The requisites are:
 - Open-source: I want to know exactly what's in it. I spent a month understanding what the binary in the .hkx files means, I don't really want to start this work on another one.
 - Compatible: The best would be readable by 3DsMax and Blender, but we can settle for just one or the other. I'll still need at least a format for each.
 - Not too difficult to write: This is a little bit vague, but basically if it's binary this might be difficult to do. If this is XML or text-based it becomes much easier. The best way to judge it would be: if you open it in a text editor, can you read something about the animation?

Link to comment

You mean something like the .bvh file format? It's an extremely basic format for animating, but it's supported by Blender, 3DS, and lots of other modeling software.

Files can get a bit big depending on frame, because every node/joint is always declared for each frame.

Conversion is another matter. It's a really basic format, but you'll still have to convert into .bvh format and convert back from .bvh format.

 

http://www.character-studio.net/bvh_file_specification.htm

 

Googling BVH Open Source should return some open source code to work with these files as well, even if it's just to get an idea about those pesky rotations.

Link to comment

I think the easiest format for animations would be the KF format that Bethesda has used for many years.

In fact the Skyrim HKXCMD tool was able to convert the hkx files into a kf file which then could be imported into Max with the Max nif tools (and probably into blender with the nif / kf import functions).

I'm not sure on the Maya Nif tool for skyrim if it also supported KF animations.

 

That was one of the ways I used to test bodies in Max, load the body + xpmse skeleton, then load the kf (usually used the twerk animation) and would go thru it one frame at a time to see if there was any improper deformation (IE bad weight painting).

 

One thing I would like to see is a simple GUI to work with the command tool (for manual conversion of files outside of AF4).

You could stick the gui exe in the same folder with the command line exe and just have the gui do an easy to understand command line perimeter.. Like Take File ABC.HKX and convert to ABC.XML, or take file XYZ.KF (with FO4 skeleton of course) and generate XYZ.HKX animation.

A simple From path (folder and file set), type of conversion, and output path.

 

If that is possible anyway (cause that would sure beat using bat files when you are trying multiple animations).

Link to comment

You mean something like the .bvh file format? It's an extremely basic format for animating, but it's supported by Blender, 3DS, and lots of other modeling software.

Files can get a bit big depending on frame, because every node/joint is always declared for each frame.

Conversion is another matter. It's a really basic format, but you'll still have to convert into .bvh format and convert back from .bvh format.

 

http://www.character-studio.net/bvh_file_specification.htm

 

Googling BVH Open Source should return some open source code to work with these files as well, even if it's just to get an idea about those pesky rotations.

 

Thanks @AsariX, this information is really useful.

both Blender and 3DS can import export it naively, and the actual format is really simple.

I think the easiest format for animations would be the KF format that Bethesda has used for many years.

In fact the Skyrim HKXCMD tool was able to convert the hkx files into a kf file which then could be imported into Max with the Max nif tools (and probably into blender with the nif / kf import functions).

I'm not sure on the Maya Nif tool for skyrim if it also supported KF animations.

 

That was one of the ways I used to test bodies in Max, load the body + xpmse skeleton, then load the kf (usually used the twerk animation) and would go thru it one frame at a time to see if there was any improper deformation (IE bad weight painting).

 

One thing I would like to see is a simple GUI to work with the command tool (for manual conversion of files outside of AF4).

You could stick the gui exe in the same folder with the command line exe and just have the gui do an easy to understand command line perimeter.. Like Take File ABC.HKX and convert to ABC.XML, or take file XYZ.KF (with FO4 skeleton of course) and generate XYZ.HKX animation.

A simple From path (folder and file set), type of conversion, and output path.

 

If that is possible anyway (cause that would sure beat using bat files when you are trying multiple animations).

 

KF is a problem, because it is completely custom.

So you need to export the HKX in this KC format and then use another tool to import it in Blender/3DS.

And because the actual content of FO4 is not exactly the same of Skyrim, you need new plugins.

Extra info.

A UI may be done, but not for release 1.

Link to comment

 

You mean something like the .bvh file format? It's an extremely basic format for animating, but it's supported by Blender, 3DS, and lots of other modeling software.

Files can get a bit big depending on frame, because every node/joint is always declared for each frame.

Conversion is another matter. It's a really basic format, but you'll still have to convert into .bvh format and convert back from .bvh format.

 

http://www.character-studio.net/bvh_file_specification.htm

 

Googling BVH Open Source should return some open source code to work with these files as well, even if it's just to get an idea about those pesky rotations.

 

Thanks @AsariX, this information is really useful.

both Blender and 3DS can import export it naively, and the actual format is really simple.

I think the easiest format for animations would be the KF format that Bethesda has used for many years.

In fact the Skyrim HKXCMD tool was able to convert the hkx files into a kf file which then could be imported into Max with the Max nif tools (and probably into blender with the nif / kf import functions).

I'm not sure on the Maya Nif tool for skyrim if it also supported KF animations.

 

That was one of the ways I used to test bodies in Max, load the body + xpmse skeleton, then load the kf (usually used the twerk animation) and would go thru it one frame at a time to see if there was any improper deformation (IE bad weight painting).

 

One thing I would like to see is a simple GUI to work with the command tool (for manual conversion of files outside of AF4).

You could stick the gui exe in the same folder with the command line exe and just have the gui do an easy to understand command line perimeter.. Like Take File ABC.HKX and convert to ABC.XML, or take file XYZ.KF (with FO4 skeleton of course) and generate XYZ.HKX animation.

A simple From path (folder and file set), type of conversion, and output path.

 

If that is possible anyway (cause that would sure beat using bat files when you are trying multiple animations).

 

KF is a problem, because it is completely custom.

So you need to export the HKX in this KC format and then use another tool to import it in Blender/3DS.

And because the actual content of FO4 is not exactly the same of Skyrim, you need new plugins.

Extra info.

A UI may be done, but not for release 1.

 

 

In Max or in Blender you are going to need the Nif Tools installed anyway to us the Skeleton unless you load the skeleton via something like an fbx file.

The latest Max niftoolset (on the skyrim nexus page and on there github page) supports what is currently known about the FO4 Nif format.

I actually wish the Maya 2016 Nif toolset was updated (or how to update it) as I kinda like Maya better then Max and Blender... Just seems easier to use.

 

Some things that would be useful for conversions would be skeleton rig conversions (say FO3/FNV to FO4 or Skyrim to FO4). But I'm not sure you could swap the skeleton out and keep the pose per frame (yeah I call it a frame cause to me its like making a short stop motion movie...but I'm a noob when it comes to understanding the animation side of things).

 

Link to comment

Ok, some hype : <dead link of a HKX file converted to XML>

 

I still have a lot to do (the data isn't the right one, there's a lot of things I'm not reading yet [arrays, ptrs], I have to de-serialize the members, etc...) but it's a start.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use