Jump to content

HKXPack/HKXAnim - Animations in FO4


Recommended Posts

Ok, some hype : http://puu.sh/mzeTk/93bc472f35.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.

 

It's a start, even if you know you'll have to expand, normalize, refine and optimize several times (make sure to keep a backup right before each normalization, so you can always go back to some version with core data instead of derivates). But, a project always gets nicer when you start to "see" how it works. When I was still programming, I used to test my work a lot. Not just for testing purposes, but also because it simply gave a kick to see things take shape, giving energy (and ideas) to add the next piece of the puzzle.

Link to comment

Hello again;

 

I managed to fix most of the forementionned issues, but there is still a lot to do, especially on the data formatting and similar.

But why not see for yourself ? I've taken a few minutes and made a basic release of the software. You can find it here : https://github.com/Dexesttp/hkxpack/releases/tag/v0.0.1-alpha

 

To launch the extractor, just type 'java -jar hkxpack.jar <filename>.hkx' in your console and you'll have a <filename>.xml file created, containing all the information I could extract.

 

Note that you'll need java 8 to run it. I also won't provide any kind of support for this version either, as it's an EARLY BUILD of an UNFINISHED PRODUCT. Don't expect the results to make sense either (especially the numbers), I mostly just want to show that it (somewhat) works.

Link to comment

New version is out, it can now read Animations, Behaviors and i think most Physics (e.g. BSClothExtraData) hkx files, and I didn't find any bug while doing it (except some enum bugs that aren't breaking anything).
There is still problems with Skeletons, I'm currently working on that. I'll then begin to work on xml -> hkx conversion.

get the 0.0.5-alpha release

Link to comment

New version is out, it can now read Animations, Behaviors and i think most Physics (e.g. BSClothExtraData) hkx files, and I didn't find any bug while doing it (except some enum bugs that aren't breaking anything).

There is still problems with Skeletons, I'm currently working on that. I'll then begin to work on xml -> hkx conversion.

 

get the 0.0.5-alpha release

 

Awesome. Do let me know once you have a useful XML->HKX conversion going (for tweaking CBBE physics). :)

Link to comment
  • 1 month later...

Awesome. Do let me know once you have a useful XML->HKX conversion going (for tweaking CBBE physics). :)

I hope you didn't wait exclusively for it. I took some time finishing it... But finally ! It's here !

 

I released a version that supports packing : here. Use the "pack" option to go from XML to HKX.

 

There's still two problems the tool can't handle :

  • one thing called "arrsize", which is a value I don't consider while reading/writing the file and therefore the tool not using some values (they don't show up in the XML and are set to 0 in the output file). This will be my main focus for the next release, as I have some good ideas about how to make it work.
  • Another thing called RelArray, which is the main data structure for skeletons. I have no idea how it works, so I'll tinker with it later and try to solve it. Basically, it makes the tool unable to read the skeleton data (you'll see a bunch of errors while using the tool as well as a lot of "error" comments in the output XML).
If you compile a XML file and you don't manage to make the output work in-game, please consider giving me the file name so that i can see what is happening exactly. There's some error messages scattered through the tool but I don't think it would be enough to understand the cause of the bug directly.

 

As always, I won't yet give support for the tool, as it is still an early alpha version. If you don't understand how to use it after reading the instructions, the tool is probably not ready for you yet. A GUI [Graphical User Interface] will come eventually (once all the bugs are ironed out).

 

edit : just in case, the how-to.

 

edit 2 : just found a itty tiny bug... the MATRIX_4 option seems to make the software crash. Ill release 0.0.71 in a few minutes to fix that (it's kind of important as it's a component of the cloth data)

 

edit 3 : fixed ! re-download the file, please.

Link to comment

 

Awesome. Do let me know once you have a useful XML->HKX conversion going (for tweaking CBBE physics). :)

I hope you didn't wait exclusively for it. I took some time finishing it... But finally ! It's here !

 

I released a version that supports packing : here. Use the "pack" option to go from XML to HKX.

 

There's still two problems the tool can't handle :

  • one thing called "arrsize", which is a value I don't consider while reading/writing the file and therefore the tool not using some values (they don't show up in the XML and are set to 0 in the output file). This will be my main focus for the next release, as I have some good ideas about how to make it work.
  • Another thing called RelArray, which is the main data structure for skeletons. I have no idea how it works, so I'll tinker with it later and try to solve it. Basically, it makes the tool unable to read the skeleton data (you'll see a bunch of errors while using the tool as well as a lot of "error" comments in the output XML).
If you compile a XML file and you don't manage to make the output work in-game, please consider giving me the file name so that i can see what is happening exactly. There's some error messages scattered through the tool but I don't think it would be enough to understand the cause of the bug directly.

 

As always, I won't yet give support for the tool, as it is still an early alpha version. If you don't understand how to use it after reading the instructions, the tool is probably not ready for you yet. A GUI [Graphical User Interface] will come eventually (once all the bugs are ironed out).

 

edit : just in case, the how-to.

 

edit 2 : just found a itty tiny bug... the MATRIX_4 option seems to make the software crash. Ill release 0.0.71 in a few minutes to fix that (it's kind of important as it's a component of the cloth data)

 

edit 3 : fixed ! re-download the file, please.

 

 

Awesome! I'll see if I can put it to some use later. :)

Link to comment

Awesome! I'll see if I can put it to some use later. :)

Ping again !

 

 

New version is out ! here

 

It mostly fixes issue about data read wrong and padding, and it added support for dirarrays.

 

I have 100% reproduction on Clothdata/physics data and Behaviors, as well as padding removal from animation files (with the file working in-game). That means that if I convert an original file to XML then back to HKX, all the data is exactly the same. Needless to say, that is really really promising.

 

I'll next work on solving the problem with skeletons, then actually working on AF4 (the FNIS equivalent). I still can't read the skeleton data though. I'll get back to you when I have results ofc, until then... Have fun :)

Link to comment

Cool, I hope you guys allow for animations like 2 actors holding another while a 3rd actor collars them or cuffs them :)

 

 

Ok, so I first I dismissed that as an unrelated request - I thought it was more ST's job to handle that. But, that got me thinking.

 

There's no hugely weird clipping when you mount/ride a horse in Skyrim or when someone hops on/off a vertibird in FO4. However, in SL, ZaZ's stuff or other packs, there is always these situations where people are clipping into each other/objects while running animations. Of course, you can then use keyboard bindings to try to solve that but it only changes the position of actors to try to manually correct the original positions.

 

The reason for that is actually simple : I think vertibirds/horses/chairs/etc... mount and ride animations are handled via complex behaviors that allows I guess a combination of animations, while SL stuff is just two animations running next to each other.

 

I'd be interested about that, and trying to apply this to FO4 as a nearly base feature of AF4 if I can grasp how it works. However, as I previously said I'm new to modding (a couple months now) and mostly I have no experience with what happened in SL/ZaZ/FNIS or even the base Skyrim game related to animations.

 

So, if anybody could confirm or infirm my assumption about SL (two animations next to each other), that'd be great. In addition, I'll try to find where and how complex behaviors (sitting on a chair) are handled, and try to see if I would be able to adapt that to multi-characters animations (or even just some furniture animations). Then, I'll either release a tutorial or a tool to handle creating these custom behaviors and add an option to link them if needed using AF4. That'd be useful I think.

Link to comment

 

Cool, I hope you guys allow for animations like 2 actors holding another while a 3rd actor collars them or cuffs them :)

 

 

Ok, so I first I dismissed that as an unrelated request - I thought it was more ST's job to handle that. But, that got me thinking.

 

There's no hugely weird clipping when you mount/ride a horse in Skyrim or when someone hops on/off a vertibird in FO4. However, in SL, ZaZ's stuff or other packs, there is always these situations where people are clipping into each other/objects while running animations. Of course, you can then use keyboard bindings to try to solve that but it only changes the position of actors to try to manually correct the original positions.

 

The reason for that is actually simple : I think vertibirds/horses/chairs/etc... mount and ride animations are handled via complex behaviors that allows I guess a combination of animations, while SL stuff is just two animations running next to each other.

 

I'd be interested about that, and trying to apply this to FO4 as a nearly base feature of AF4 if I can grasp how it works. However, as I previously said I'm new to modding (a couple months now) and mostly I have no experience with what happened in SL/ZaZ/FNIS or even the base Skyrim game related to animations.

 

So, if anybody could confirm or inform my assumption about SL (two animations next to each other), that'd be great. In addition, I'll try to find where and how complex behaviors (sitting on a chair) are handled, and try to see if I would be able to adapt that to multi-characters animations (or even just some furniture animations). Then, I'll either release a tutorial or a tool to handle creating these custom behaviors and add an option to link them if needed using AF4. That'd be useful I think.

 

 

In Skyrim, mounts are implemented using Paired Animations (animations where 1 file contains animations for both actors). After that the actors are connected during the following animation playing their (separate) animations , until unmout as another paired animation which will disconnect both actors again.

 

This is already rather complicated to implement as a distinct sequence in xml (remember: we don't have this nice Havok GUI tool which Beth is using). But making FNIS or AF4 adds adds a huge complexity on top of that. Remember that both tools have the goal to make such things available to an "arbitrary" number of mods. So those things have to be parameterized, with different number of animations in between. And so on. And you don't know in advance what your customers want.

 

So unless you really want to spend most of your life with implementing AF4, you might have a hard time achieving such challenging goals.  :)

Link to comment

In Skyrim, mounts are implemented using Paired Animations (animations where 1 file contains animations for both actors). After that the actors are connected during the following animation playing their (separate) animations , until unmout as another paired animation which will disconnect both actors again.

 

This is already rather complicated to implement as a distinct sequence in xml (remember: we don't have this nice Havok GUI tool which Beth is using). But making FNIS or AF4 adds adds a huge complexity on top of that. Remember that both tools have the goal to make such things available to an "arbitrary" number of mods. So those things have to be parameterized, with different number of animations in between. And so on. And you don't know in advance what your customers want.

 

So unless you really want to spend most of your life with implementing AF4, you might have a hard time achieving such challenging goals.  :)

Ok. That's actually awesome.

 

I understand your sentiment about implementing this feature. However, I'm kind of confident in my ability to do it eventually. I mean, I managed to make most of HKXPack already, which basically replaces the Havok SDK ;)

 

I'll begin to analyze these files (I guess there's similar files in Fallout 4 to see) and try to find patterns behind their content. If I manage that, then I guess automating the file creation behind a GUI might be possible - even if it isn't easy. In any case, I guess I'll document my findings as always and hope that it allows these kinds of things to happen in the future.

 

Thanks a lot !

Link to comment

 

 

Cool, I hope you guys allow for animations like 2 actors holding another while a 3rd actor collars them or cuffs them :)

 

 

Ok, so I first I dismissed that as an unrelated request - I thought it was more ST's job to handle that. But, that got me thinking.

 

There's no hugely weird clipping when you mount/ride a horse in Skyrim or when someone hops on/off a vertibird in FO4. However, in SL, ZaZ's stuff or other packs, there is always these situations where people are clipping into each other/objects while running animations. Of course, you can then use keyboard bindings to try to solve that but it only changes the position of actors to try to manually correct the original positions.

 

The reason for that is actually simple : I think vertibirds/horses/chairs/etc... mount and ride animations are handled via complex behaviors that allows I guess a combination of animations, while SL stuff is just two animations running next to each other.

 

I'd be interested about that, and trying to apply this to FO4 as a nearly base feature of AF4 if I can grasp how it works. However, as I previously said I'm new to modding (a couple months now) and mostly I have no experience with what happened in SL/ZaZ/FNIS or even the base Skyrim game related to animations.

 

So, if anybody could confirm or inform my assumption about SL (two animations next to each other), that'd be great. In addition, I'll try to find where and how complex behaviors (sitting on a chair) are handled, and try to see if I would be able to adapt that to multi-characters animations (or even just some furniture animations). Then, I'll either release a tutorial or a tool to handle creating these custom behaviors and add an option to link them if needed using AF4. That'd be useful I think.

 

 

In Skyrim, mounts are implemented using Paired Animations (animations where 1 file contains animations for both actors). After that the actors are connected during the following animation playing their (separate) animations , until unmout as another paired animation which will disconnect both actors again.

 

This is already rather complicated to implement as a distinct sequence in xml (remember: we don't have this nice Havok GUI tool which Beth is using). But making FNIS or AF4 adds adds a huge complexity on top of that. Remember that both tools have the goal to make such things available to an "arbitrary" number of mods. So those things have to be parameterized, with different number of animations in between. And so on. And you don't know in advance what your customers want.

 

So unless you really want to spend most of your life with implementing AF4, you might have a hard time achieving such challenging goals.  :)

 

 

Hmmm, paired animations. Makes sense to do it like that, it would solve all kinds of problems that animators face.

 

Just think of this: 2 characters kissing each other and locking their hands. Unless you know in advance exactly how the two characters look, you simply can't make such an animation to work perfectly. The hands won't meet properly, one character ends up with his or her nose inside the mouth of the other character, etcetera. Paired animations solve this problem, because the animation always causes the hands of both characters to go to the exact same shared relative position, to always go match the mouths in the same location, because the relative positions are shared between the two.

 

Synched single animations do not share their relative positioning and data. Each of the two animations is only relative to itself, which causes the misplaced hands, mouths and other body parts. And if your computer hickups while loading these animations, chances are that their timing will be off, starting one animation before the other.

 

Dexes, I know I won't hold it against you if you put that part on hold for now and instead work with singular animations that animators would have to synch and time and stuff. It's already quite an accomplishment to get that part to work. But, if you can, in time, get paired animations to work, then you've basically opened up a next generation in Animation Modding, allowing things that Skyrim modders could only dream of. Mis-synched and mis-aligned animations annoy a lot of people, but Skyrim modding simply doesn't allow any better yet. And while those problems might never disappear entirely, this would cut down on it quite a bit!

(Warning to animators: creating new paired animations might require you to jump through some additional hoops to get it working properly. Still, this is awesome technology!)

Link to comment

Unfortunately paired animations don't work like that (in Skyrim).

 

The 2 actors are only connected in one place (I think "NPC Root"). It doesn't mean that anything else is or can be connected, or, even more, size adjusted.

 

For non-paired animation, Havok (Skyrim version) is able to do IK (Inverse Kinematics, the function that can make certain bone lines adapt to external positions) for 2 things: foot and hand IK. 

 

Foot IK is used by the game to keep feet close to the surrounding, for example when actors walk up or down stairs. Not nice, but it works.

 

Hand IK is NOT used in Skyrim. Zartar, who is probably the best around when it comes to know about features of Havok Behavior, has tried to find out how this can work under Skyrim, but without success.

 

Any other IK, like mouth or abdomen or whatever, is not possible to begin with.

Link to comment

I've done some preliminary analysis on paired takedowns and such. I based myself on 'PairedBodySlam_AttackerLead' and 'PairedBodySlam_Victim' to start, but as they don't seem to be as paired as I hoped I looked around too. My conclusion is that the animations are just two single animations with a "hkSimpleLocalFrame" bloc that will contain mostly transform data for what I assume is the given actor's transform.

 

As for behaviors, this is where everything gets a little bit confusing (mostly because I don't grasp yet everything about generators and such). Basically, every animation has its own stateMachineStateInfo, and all these stateInfos are in the exact same StateMachine (i mean, all paired animations, not just the given two). The StateMachine with all paired animations is linked to a ModifierGenerator, itself in a BoneSwithGenerator, itself in a StateMachineStateInfo that is in the root level StateMachine (which is linked to the root via a BehaviorGraph).

 

I searched around for a way to show that two paired animations must be launched simultaneously (such as "launch 50 and 51"). The closest thing I could find are "TriggerArrays" that seems to allow to launch an anim on a trigger like "this other anim started" / "this other anim finished". That may be what is needed to pair animations.

 

I still have to find how all this is launched to begin with (maybe unfold the behaviour graph). I'm making progress even for this though and it seems more and more that this might not be too difficult to do :)

 

(I just figured that this post got heavily technical. Don't expect to make sense of the post, it's Havok stuff and I don't get all of this either).

Link to comment

Just keep in mind, Dex, that creating advanced animation (like paired) can be good. But we need a way to start them through Papyrus commands.

 

And if for a "kill move" a paired animation may work well, for sexual-oriented animations it will not. Because you need paired animations for all possible couple of skeletons, and animators will not do that.

Link to comment

If you guys need the animation tool and content tool (maya/max/softimage) 2014 version here it is. DO NOT POST LINKS TO THIS ANYWHERE ELSE. They who shall not be named removed the tools from the Intel site, and the only other way to get them is through baidu. It probably won't be of that much use, but the animators will need it eventually.

 

https://mega.nz/#!a9xWHLRD!7LpEvkGQVE_kmCJbMCyCCQAwNlf-msOg4BeY4vczSHA

Link to comment

I think we shouldn't discuss technique and strategy in threads owned by users. :)

 

I recommend that you urgently inquire at the F4SE thread. AnimationEvent and AnimationVariable are THE interfaces to communicate with HBT runtime. So I believe there is a very good chance that there are internal engine functions like SendAnimationEvent, SetAnimationVariable<type> and GetAnimationVariable<type>. And that's all we need to trigger behaviors.

 

PlayIdle() in Skyrim in most cases was nothing but an additional layer connecting AnimEvents and conditions. Apparently they had planned more, as you can see from those unused additional parameters in CK. And they had made it a general habit to use only this layer within the CK (for example as part of an IdleMarker). That certainly makes sense. But it is totally unnecessary when you want an idling actor to execute another idle.

Link to comment
Next version of Outfit Studio will allow exporting BSClothExtraData (physics) blocks to HKX files and import the HKX files back into the current project.

That way you can export the physics data as HKX files, convert them to XML files using DexesTTP's tool, edit them, convert them back to HKX files and load them into NIFs as a BSClothExtraData block. :)

Link to comment

 

Next version of Outfit Studio will allow exporting BSClothExtraData (physics) blocks to HKX files and import the HKX files back into the current project.
That way you can export the physics data as HKX files, convert them to XML files using DexesTTP's tool, edit them, convert them back to HKX files and load them into NIFs as a BSClothExtraData block. :)

 

 

May the flame guide CELL!

Link to comment

Just keep in mind, Dex, that creating advanced animation (like paired) can be good. But we need a way to start them through Papyrus commands.

 

And if for a "kill move" a paired animation may work well, for sexual-oriented animations it will not. Because you need paired animations for all possible couple of skeletons, and animators will not do that.

 

I remember that FO4 have a ingame skeleton adjusting system right? So I think adjusting skeleton will be easier than change paired animation

 

OK,event like kiss/touch the breasts/tweak the nipples may cause problem, but hey these event need IK system, like Kriss's CM3D2

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