Jump to content

HKXPack/HKXAnim - Animations in FO4


Recommended Posts

Posted

Awesome. Yeah, I will write a little bit more detailed guide later, but for now this will do... Maybe try it out with Maya as well... Hm, can anyone describe to me steps to test animation in the game myself? So I don't bother you guys with testing each one :D In skyrim I remember I was just replacing the main idle loop animation, that was okay... It would be great if I could replace multiple animations at once and test them one after another through console like garg did.

 

Few more questions to answer

  • There is also concern about how to add new skeletons, right?
  • And is there a separate male and female skeletons in the game?
  • Here I used JoshNZ's scene, it already had a skeleton and mesh inside. But where did he get it? It has a CBBE mesh inside. Did he get it from CBBE generator app, or did he rip it from the game? How do I import skeleton and mesh? This will be needed to work with any other future skeleton.
====

 

But still, Dexes, don't stop developing your tool.

 

 

New skeletons is personally not something I'm willing to support for now. The work to do with actually linking it to the Nif skeleton seems like hell, and there is an additional layer of "collision" to add to the skeleton making to make it sufficiently streamlined for a single conversion tool. I don't even know how i'd take that data out of blender/3DsMax :/

 

There is a single skeleton for nearly all humanoids in game I believe, plus one skeleton for the first person view. Changing that would require doing something to the engine itself and assuming it is possible changing a lot of behaviors I believe.

 

I believe the rigged CBBE body + skeleton is the one created directly by JoshNZ (see here for details), but Lordescobar made a brief explanation of the workfow here which is as you can believe very experimental.

 

And don't worry about me stopping :) I might not finish it right away but I'll finish it one day.

 

My only worry concerning it is whether you'd be able to replicate all the required features or not... Like animation notifies, I remember they used them a lot in Skyrim. Generally animation notifies are used for ALOT of stuff in gamedev, it is basically the way to call any game function at a given animation frame. Which includes:

 

- sounds (footsteps for example)

- effects (dust from footsteps, particles spawning at a given socket\locator\helper object)

- damage triggering

- decapitation ("decapitate" notify in Skyrim worked in death animation, i spent weeks playing with it :D)

 

So that's what it is !

 

I know about this feature, called "annotations", that look like this in the XML :

<hkobject>
	<hkparam name="trackName"/>
	<hkparam name="annotations" numelements="4">
		<hkobject>
			<hkparam name="time">0.0</hkparam>
			<hkparam name="text">SoundPlay.Attack1</hkparam>
		</hkobject>
		<hkobject>
			<hkparam name="time">0.3333333432674408</hkparam>
			<hkparam name="text">preHitFrame</hkparam>
		</hkobject>
		<hkobject>
			<hkparam name="time">0.4333333373069763</hkparam>
			<hkparam name="text">weaponSwing</hkparam>
		</hkobject>
		<hkobject>
			<hkparam name="time">0.5333333611488342</hkparam>
			<hkparam name="text">HitFrame</hkparam>
		</hkobject>
	</hkparam>
</hkobject>

(taken from a deathclaw animation : DeathClaw_AttackLeft.hkx)

 

As of now, adding an annotation is as easy as opening the animation file in HKXPack and modifying a track to add one of the above blocks - so, not that easy but doable. If there really is a need to make it even easier, I guess it'd be the role of another tool. If there's a way to export them from a 3D software that'd be cool too.

Posted

Well

I did a similar file for Skyrim. Now for Fallout, skeleton linked to the biped rig.

6 bones replaced by point helper to fully mirror skinning (at vanilla bones skin modifier can't find mirror for this bones), although you still need to slightly increase the threshold.

 

To export animations take files (BethSoftAnimation.hko & Fallout4Rig.txt) from JoshNZ Fallout 4 Anim SDK V0.1.7z

Although I do not know, in the bones file for Havok missing right shoulder, arm twists, finger and toes and supporting bones type like weapon.

 

Max2014 x64

niftools-max-plugins-3.8.0

HavokContentTools_2014-0-5_20140331

 

Anyone wants to test it? :)

Fallout4_Biped.7z

post-958123-0-15358800-1468695478_thumb.png

post-958123-0-86198200-1468696417_thumb.png

Posted

 

I believe the rigged CBBE body + skeleton is the one created directly by JoshNZ (see here for details), but Lordescobar made a brief explanation of the workfow here which is as you can believe very experimental.

 

I don't think he made the rig.

 

 

As of now, adding an annotation is as easy as opening the animation file in HKXPack and modifying a track to add one of the above blocks - so, not that easy but doable. If there really is a need to make it even easier, I guess it'd be the role of another tool. If there's a way to export them from a 3D software that'd be cool too.

 

It is possible to add annotation track in max,maya (and blender i guess) in dope sheet.

 

 

 

I did a similar file for Skyrim. Now for Fallout, skeleton linked to the biped rig.

 

Yeah, I guess it should do... Did not test it yet, but for most people just joints linked to biped should work. I'd personally prefer CAT in max or custom\AdvancedSkeleton rig in Maya though. Or, if I'm going to use mocap, just HumanIK in maya or motion builder, only using max to export animations. Not sure about which pipeline I'll choose yet.

 

 

Okay, nobody gave me a hint about where Fallout stores animations, so I'll guess Ill have to find it myself :D

Posted

 

 

 

But what's wrong with native Archive2 tool which comes with CK? 

 

 

Both are good.

In my experience both have exactly the same results.

The one posted by (there is another one also in the F4SE archive) seems to be a little bit faster.

Posted

 

Yeah, I guess it should do... Did not test it yet, but for most people just joints linked to biped should work. I'd personally prefer CAT in max or custom\AdvancedSkeleton rig in Maya though. Or, if I'm going to use mocap, just HumanIK in maya or motion builder, only using max to export animations. Not sure about which pipeline I'll choose yet.

 

 

Heh, actually I use Motionbuilder. Max for import/export and with Biped comes least bugs when converting. In general all this garbage remained because of the evil Skyrim skeleton. I think I will do later fully Motionbuilder rig

Posted

Making MoBu rig is a simple process :) Just export fbx, import into MoBu and specify the joints. 

 

Hmm, another question... So, do I understand correctly that hkx files are just bytecoded xml files? Is that correct?

If so, how do I convert hkx to a readable xml? HKXPack?

 

I wanna take a look at the xml file, maybe I'll have some new ideas.

And how hard is it to convert xml back to hkx? Does HCT add some specific information to it, which is bytecoded or something?

Posted

 

Hmm, another question... So, do I understand correctly that hkx files are just bytecoded xml files? Is that correct?

If so, how do I convert hkx to a readable xml? HKXPack?

 

 

The work done by @DexesTTP, that is available on GitHub does exactly this: converting the HKX files to readable XML.

Posted

 

 

Hmm, another question... So, do I understand correctly that hkx files are just bytecoded xml files? Is that correct?

If so, how do I convert hkx to a readable xml? HKXPack?

 

 

The work done by @DexesTTP, that is available on GitHub does exactly this: converting the HKX files to readable XML.

 

 

Thanks, found it. And actually quickly wrote a simple GUI for it, if anyone's interested.

Here is windows exe version, but it's in python and pyside, if anyone needs the source, feel free to ask.

It has to be in the same folder as hkxpack_cli.jar file.

 

hkxpack_gui.zip

 

It just runs the cmd in background, through subprocess.call, if this is interesting to anyone.

Drag and drop files into the field and click a button. If a file is hkx, it will unpack it, if a file is xml, it will pack it. Simple as that.

Posted

For HCT 2014 it's DS Max 2013 ? not 2014 ?

 

HCT 2014 installs on any:

 

3ds max: 2010-2015

Maya: 2010-2015

Xsi: 2010-2014

 

NifTools 3ds max plugin also works with a lot of max versions: 9, 2008-2016.

 

JoshNZ's scene was made with max 2013 (or 2014, i'm not sure).

I opened it in both 2014 and 2015, and successfully exported an animation using 2015.

 

So, currently best choice to work with FO4 animations is max 2015 (latest possible version). 2014 and 2013 should both work fine as well.

 

At least until we get more information about some potential plugin which only works with some specific version :D

 

 

 

=======

 

 

Guys, is it still enough to have files extracted into Data folder with same structure as they were in the archive to override them in the game?

Posted

 

Guys, is it still enough to have files extracted into Data folder with same structure as they were in the archive to override them in the game?

 

 

Yes it is :) Good luck !

 

(for reference, I put my test animations somewhere below /Fallout 4/Data/meshes/actors/character/)

Posted

 

For HCT 2014 it's DS Max 2013 ? not 2014 ?

 

HCT 2014 installs on any:

 

3ds max: 2010-2015

Maya: 2010-2015

Xsi: 2010-2014

 

NifTools 3ds max plugin also works with a lot of max versions: 9, 2008-2016.

 

JoshNZ's scene was made with max 2013 (or 2014, i'm not sure).

I opened it in both 2014 and 2015, and successfully exported an animation using 2015.

 

So, currently best choice to work with FO4 animations is max 2015 (latest possible version). 2014 and 2013 should both work fine as well.

 

At least until we get more information about some potential plugin which only works with some specific version :D

 

 

 

=======

 

 

Guys, is it still enough to have files extracted into Data folder with same structure as they were in the archive to override them in the game?

 

 

Tks mate ! But when i try to install HCT 2014 in the 'choose component menu" it  displays until max 2014 but not with 2015 ,i need to do something about it ? i ask because i've the max 2015 and i would like to know if i need to install an other version or not :)

 

Posted

 

 

Guys, is it still enough to have files extracted into Data folder with same structure as they were in the archive to override them in the game?

 

 

Yes. And you should be able to add new animations with the CK rather than over-ride existing ones. Making a hotkey to run them on button press for testing could be a simple Quest script.

Posted

Hey, I have been following this for a while and I have a question. How would this stuff work with weapon animations? Would they be easier to add in then say the looping animations you guys are going for?

Posted

 

 

Guys, is it still enough to have files extracted into Data folder with same structure as they were in the archive to override them in the game?

 

 

Yes it is :) Good luck !

 

(for reference, I put my test animations somewhere below /Fallout 4/Data/meshes/actors/character/)

 

 

And how do I activate them? I tried replacing a few idles in Player folder, but it seems that Fallout just ignores me :(

 

 

 

Hey, I have been following this for a while and I have a question. How would this stuff work with weapon animations? Would they be easier to add in then say the looping animations you guys are going for?

 

I think someone already made new weapon animations on nexus, so it should be possible. Easier or not, I don't think so, I think it's pretty much the same process for all animations.

 

 

 

Yes. And you should be able to add new animations with the CK rather than over-ride existing ones. Making a hotkey to run them on button press for testing could be a simple Quest script.

 

Not sure if I want to dive into CK and scripting much, should be enough to replace existing ones for testing purposes... I don't think I plan to create my own mods, just supply modders with animations.

 

But if you could tell me step-by-step what to do, it would be great. Maybe it'll give me a jump start and I'll start making my own mods too, who knows :D  I don't have experience with CK or Quest script, though I have experience with other languages.

 

So, adding new animations is now possible through CK without then nees for FNIS and stuff, right? if so, cool.

 

Posted

Hey, I have been following this for a while and I have a question. How would this stuff work with weapon animations? Would they be easier to add in then say the looping animations you guys are going for?

 

It should be the exact same thing; we're not working with any specific animation registering in mind, and weapon animations are just animations registered in a certain way.

 

You should even be able, using the above technique, to create a new animation and replace an already existing weapon animation with it.

 

If you want to add new weapon animations for a new modded weapon, it's a totally different thing. I don't even know how you'd approach that problem though, but it's definitely not HKXAnim's aim. I'd recommend checking in the CK for a way to do that.

Posted

 

And how do I activate them? I tried replacing a few idles in Player folder, but it seems that Fallout just ignores me :(

 

Weird, I don't really see why it wouldn't be registered.

 

Running the test animations themselves is just a matter of using the "player.playidle" command, I usually use the psycho one (character/animations/common/UsePsychoOnSelf.hkx).

 

There was an INI config setting to set also, add the following lines into %HOME%/my games/Fallout4/Fallout4Custom.ini. I thought it wasn't necessary anymore, but it might be the issue.

[Archive]
bInvalidateOlderFiles=1
sResourceDataDirsFinal=
Posted

 

I think someone already made new weapon animations on nexus, so it should be possible. Easier or not, I don't think so, I think it's pretty much the same process for all animations.

 

 

It should be the exact same thing; we're not working with any specific animation registering in mind, and weapon animations are just animations registered in a certain way.

 

You should even be able, using the above technique, to create a new animation and replace an already existing weapon animation with it.

 

If you want to add new weapon animations for a new modded weapon, it's a totally different thing. I don't even know how you'd approach that problem though, but it's definitely not HKXAnim's aim. I'd recommend checking in the CK for a way to do that.

 

Okay thank you guys. I was thinking about new modded weapons and I do not know why it never occurred to me that adding new animations for new weapons would require creating new animation sets altogether... This changes a lot about what I was thinking, because with how weapon mods are now, mostly with rifle that use the SMG animations, they couldn't have a replacement without screwing up the regular SMG animations. So the only way would be to create all new animation sets for weapons, which I have no idea about, I guess that would require linking the hkx files to the nifs? I'm new to modding so I am not sure on how the animations part works.

 

Anyway thanks for the info.

Posted

Well 

I did a similar file for Skyrim. Now for Fallout, skeleton linked to the biped rig.

6 bones replaced by point helper to fully mirror skinning (at vanilla bones skin modifier can't find mirror for this bones), although you still need to slightly increase the threshold.

 

To export animations take files (BethSoftAnimation.hko & Fallout4Rig.txt) from JoshNZ Fallout 4 Anim SDK V0.1.7z

Although I do not know, in the bones file for Havok missing right shoulder, arm twists, finger and toes and supporting bones type like weapon.

 

Max2014 x64

niftools-max-plugins-3.8.0

HavokContentTools_2014-0-5_20140331

 

Anyone wants to test it? :)

 

     Attached is the bone file I am used to making pose/animation since last December. hope it's helpful to you.  

 

    The bone order is the same as one in skeleton.hkx. (you can open the hkx file in text editor, searching the bone names). I thinks this bone file is  correct with confidence. I had done many dance animation with that (usually porting some Skyrim dance to Fallout4)

 

https://www.youtube.com/watch?v=nIot2AngKbA&feature=youtu.be&t=153

01_export_3rd_full.txt

Posted

 

Well 

I did a similar file for Skyrim. Now for Fallout, skeleton linked to the biped rig.

6 bones replaced by point helper to fully mirror skinning (at vanilla bones skin modifier can't find mirror for this bones), although you still need to slightly increase the threshold.

 

To export animations take files (BethSoftAnimation.hko & Fallout4Rig.txt) from JoshNZ Fallout 4 Anim SDK V0.1.7z

Although I do not know, in the bones file for Havok missing right shoulder, arm twists, finger and toes and supporting bones type like weapon.

 

Max2014 x64

niftools-max-plugins-3.8.0

HavokContentTools_2014-0-5_20140331

 

Anyone wants to test it? :)

 

     Attached is the bone file I am used to making pose/animation since last December. hope it's helpful to you.  

 

    The bone order is the same as one in skeleton.hkx. (you can open the hkx file in text editor, searching the bone names). I thinks this bone file is  correct with confidence. I had done many dance animation with that (usually porting some Skyrim dance to Fallout4)

 

https://www.youtube.com/watch?v=nIot2AngKbA&feature=youtu.be&t=153

 

 

Yeah, I also opened hkx file and checked the order, and copied almost all joints into Fallout4Rig.txt frile from Josh, making my own extended version. I wanna try a few animation and tests a few particular things in engine, and once i'm confident that everything works, Ill upload my "animation kit" with all the tools and preset files needed for animation. Maybe with a few rig options as well, dunno yet.

 

But I still can't override Fallout4's animation D:

Posted

 

But I still can't override Fallout4's animation D:

 

 

Try to "delegate" the problem.

 

Create a folder, inside create all sub-folders you need to reach the exact path for the animation you wish to replace.

Then place the animation inside with the correct name.

 

Then zip it, and let NMM to install it.

Usually all the "file replacements" problems can be handled by the mod manager.

 

Probably works also on MO, but for FO4, I never tried it.

Posted

Okay, I was able to play an idle, using this:

player.playidle IdleUseJet

And replacing the file: Data\Meshes\Actors\Character\Animations\MT\Neutral\PoseA_JetUse.hkx

 

And the cool thing is that I can just replace the file while the game is running and it works, thats cool

Posted

Okay, I was able to play an idle, using this:

player.playidle IdleUseJet

And replacing the file: Data\Meshes\Actors\Character\Animations\MT\Neutral\PoseA_JetUse.hkx

 

And the cool thing is that I can just replace the file while the game is running and it works, thats cool

 

Hot replacing the files sometimes works, sometimes it does not.

Depends if the file is in memory or not. For example all the "walking" animations are stored in memory for quick access.

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...