Version 2.0 Is now released! This version adds automated importing, exporting, nif attaching, and annotation handling via a python script. The old guide is now obsolete and will be replaced with this one.
Thank you very much for your tutorial. I've learned a lot from it.
However, I encountered an error. I'm using Blender 4.1, as required in the tutorial, but when I enabled the "FO4 Animation Addon" plugin, the following error occurred:
Traceback (most recent call last): File "F:\SteamLibrary\steamapps\common\Blender\blender-4.1.0-windows-x64\4.1\scripts\modules\addon_utils.py", line 376, in enable mod = importlib.import_module(module_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\SteamLibrary\steamapps\common\Blender\blender-4.1.0-windows-x64\4.1\python\Lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\Libra\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\assets\__init__.py", line 284, in current_filepath = bpy.data.filepath ^^^^^^^^^^^^^^^^^ AttributeError: '_RestrictData' object has no attribute 'filepath'
I've tried placing the plugin in 'F:\SteamLibrary\steamapps\common\Blender\blender-4.1.0-windows-x64\4.1\scripts\addons', but I'm still encountering this error.
Edit: I don't know what's going on, but this plugin is working normally now.
It's a script, not an add-on, so you're not supposed to put it anywhere and just leave it where you found it and let blender run the script when you open the.blend file. Good to hear that it's working now, though.
I can't express how much I appreciate all the work you have done <3 Really grateful for people like you!
Ugh, I hating having to ask people. But I'm still learning, on all fronts. What I want to do is weapon unique animations. Unique behaviors right? Can I use this rig to do that? I tried messing around and import the behavior files, but no luck.
Just need a pointer, so I can tinker and learn thru trial and error :P
If you only want to do skeletal animations, you don't need to touch behaviors; you just need the rig (and its requirements) and additive subgraph data stuff. https://www.youtube.com/watch?v=_y_yRYGShq8&list=PLGGw--fFEeZd5HM9shaaANPuXP9zAgmAN&index=20&ab_channel=TheRizzler The Rizzler has a great modding series that goes into detail about this stuff. Even though he uses 3dsMax, it's still worth watching just to get the general idea on the hows and whats. You only need to do anything with behaviors if you want to do nif animations. For example, the frost on the cryolator, the glow on the overheating minigun, or the acid soaker's tube.
Yes, thats what I want D: To do unique weapon nif animations. Basically I want to create whips and flails. What I noticed and with my basic comprehesion is that the on/off states are linked to the weapon animation states.
I love the rig, I might have said this before, but with this rig I'm saving a whopping 5-10 mins for EVERY EXPORT compared to all the old scripts and conversions. It has made it possible for me to actually just test anims without having to polish first, so thank you so much.
One suggestion though, if possible: The havok engine supports additive animations where you can for instance export just 1 bone and it will animate that bone proportional to the start position. When I was using the havok tool you could separate and choose which bones to animate. Is this possible with your approach or will you make it available? When I export now it will always export all bones.
I would love to support additive and partial animations but I've found painfully little about them and the testing I did was inconclusive and a bit confusing, so I'm flying pretty much blind here. Perhaps you can explain to me how you do it usually and walk me through the steps and expected results? Maybe on my Discord server for more direct communication than Nexus comments? (The link is in the description) I'm also not sure about the individual exported bones. If I remember correctly, Havok Filter Manager didn't want to export animations that didn't have every bone in the bone list file so I'd like for your insights on that too.
I was wondering if there was a way to animate using IK in blender without getting the jitter in game? I have tried "baking" the animation but for some reason its stil jittery.
Got it working this time, but came upon an animation-specific issue while trying to make a BCR/TR patch for Dak's 1887: For some reason, when I import the reload animation, the frame range is roughly ~35000 keyframes and plays extremely slowly because of this, but the annotations are in the correct place.
Checked the .hkx, for some reason it has "numFrames" set to 34561, despite most of the animations being perfectly fine? Some other animations like the "BoltReady" also have the insane frame range, is there any way I could potentially fix it to work correctly in Blender, seeing as how they work just fine ingame?
That happens when the animation is made using a higher framerate than the default 30 fps. Try higher framerates like 60. 120, or 240. Those are usually what's used.
I had to up the framerate to roughly 3000 to get it to play at the normal rate. It absolutely destroys my blender because theres 34561 keyframes for every single bone, so I'm going to have to leave it at that.
I just checked it myself and the framerate is 4800 frames per second, which is the most overkill framerate I've ever seen. It's probably to scale it down to 1/20 of the original to get it to 240 fps.
Hey there! Excellent work, thank you so much! Is it possible to make paired animations, do you think ? If you are interested about making a paired skeleton and such, contact me, I perhaps can help you to make it happen. New killmoves would be so nice. :)
https://discord.gg/5ydKyYSy6UI actually already have the animation side of paired killmoved done. It's the game side that's still problematic. I haven't done much testing yet because I don't have too much time/energy/motivation for modding right now but the problem is that when I replace a killmove animation, the game still uses the motion of the old killmove, even though it doesn't exist in the animation file. The assumption is that it's because of the animTextData stuff. You know, the stuff that gets generated with a bat file/startup command but how do you even generate that for the vanilla game? Next step would be to make a plugin with a new paired animation and generate the animTextData for that and see if that works but I don't know how to do npc interactions yet so ¯\_(ツ)_/¯. EDIT: I have a preview of the test stuff in my discord server if you want to take a look. https://discord.gg/5ydKyYSy6U the wips and previews channel.
Aiming is a value you change in the creation kit/fo4edit independent of the animation. Don't know about sprinting but there are no annotations that change fov so I guess the engine does it. So both of the animations don't really have a animation driven fov change, unfortunately.
I'm aware aiming values can be changed in the esp side of things, but you may notice that some weapons have 0 zoom in that field yet they will zoom a bit anyway when aiming.
If you check out some mods, like say 1st Person Sprint FOV Remover, and compare them with the vanilla hkx's using their XML convertions, you'll see that fov changes can in fact be baked-in in the animation (this includes aiming zoom, trust me). But so far I don't think anyone found a way (or disclosed it...) to do that for custom anims, be that through regular export or through XML-tweaking shenanigans
Takes some getting used to, (Especially considering how cumbersome animating in blender can be in the first place), but once you get past that it's an amazing tool for those unwilling or unable to use unobtainable versions of 3DS Max. I hope we start seeing a lot more people using this! (Some pics of a weapon I was able to animate)
Very cool! I heard Blender is also cooking up new and improved stuff on the animation side so hopefully that will make animating easier and more intuitive.
Amazing rig, but just came across an issue - the right foot isn't fixed to Foot_Fixed_R when I turn Feet Fixed on, but the left foot is (fixed to Foot_Fixed_L). Did I break something or is this an issue in the original Blender file?
Looks like there has been a problem with either Havok2fbx.exe, fbxconverter, or the files they rely on. Please check if: 1. Other files work or it fails every time. (you can select multiple files during the import) And make sure that: 2. The file path to the programs is correct. 3. The script is the newest version. (2.3.0) 4. The .blend file is in the same folder as the assets folder.
The console output might also give me some insight. You can get it by clicking the Window menu at the top left inside Blender and then Toggle System Console. Just post the last 20 or 30 lines in a [ CODE ] thingie like this.
Feel free to also drop by my Discord for more direct support.
I've triple checked now, and: 1. All .hkx files fail to import. 2. All paths are correct, even reorganized and ensured they were correct. 3. It is. 4. I've double-checked and made sure of this.
Checked the system console, it seems havok2fbx isn't working for some reason. I re-installed it from Github and it didn't work, and then I used the one included with F4AK and it didn't work either. The only error code it gives is the one I posted.
I did some googling and testing and got the same code when removing the .dll file that came with havok2fbx. So make sure that "libfbxsdk.dll" is in the same folder as havok2fbx.exe. It could also be possible that it requires some other common framework like .net framework or Visual Studio C++ redistributable but I can't say for sure. Checking the GitHub only tells me that you need "Visual Studio 2012 for Platform Toolset V110" to compile it but I doubt you need that to run it. So the last two suggestions I can think of are installing Visual Studio C++ 2012 redistributablesand making sure that the files and program aren't in a folder/subfolder with letters that aren't used in English. Usually, that's not a problem but some programs can have a problem with other languages. Maybe Havok2fbx is one of them?
88 comments
This version adds automated importing, exporting, nif attaching, and annotation handling via a python script.
The old guide is now obsolete and will be replaced with this one.
However, I encountered an error. I'm using Blender 4.1, as required in the tutorial, but when I enabled the "FO4 Animation Addon" plugin, the following error occurred:
How can I fix it?
I'm asking because none of the filepaths are the blender file.
Edit: I don't know what's going on, but this plugin is working normally now.
Good to hear that it's working now, though.
Really grateful for people like you!
Ugh, I hating having to ask people. But I'm still learning, on all fronts. What I want to do is weapon unique animations. Unique behaviors right?
Can I use this rig to do that? I tried messing around and import the behavior files, but no luck.
Just need a pointer, so I can tinker and learn thru trial and error :P
https://www.youtube.com/watch?v=_y_yRYGShq8&list=PLGGw--fFEeZd5HM9shaaANPuXP9zAgmAN&index=20&ab_channel=TheRizzler
The Rizzler has a great modding series that goes into detail about this stuff. Even though he uses 3dsMax, it's still worth watching just to get the general idea on the hows and whats.
You only need to do anything with behaviors if you want to do nif animations. For example, the frost on the cryolator, the glow on the overheating minigun, or the acid soaker's tube.
One suggestion though, if possible: The havok engine supports additive animations where you can for instance export just 1 bone and it will animate that bone proportional to the start position. When I was using the havok tool you could separate and choose which bones to animate.
Is this possible with your approach or will you make it available? When I export now it will always export all bones.
I'm also not sure about the individual exported bones. If I remember correctly, Havok Filter Manager didn't want to export animations that didn't have every bone in the bone list file so I'd like for your insights on that too.
For some reason, when I import the reload animation, the frame range is roughly ~35000 keyframes and plays extremely slowly because of this, but the annotations are in the correct place.
Checked the .hkx, for some reason it has "numFrames" set to 34561, despite most of the animations being perfectly fine?
Some other animations like the "BoltReady" also have the insane frame range, is there any way I could potentially fix it to work correctly in Blender, seeing as how they work just fine ingame?
It's probably to scale it down to 1/20 of the original to get it to 240 fps.
Thanks for your work, friend!
Next step would be to make a plugin with a new paired animation and generate the animTextData for that and see if that works but I don't know how to do npc interactions yet so ¯\_(ツ)_/¯.
EDIT:
I have a preview of the test stuff in my discord server if you want to take a look.
https://discord.gg/5ydKyYSy6U
the wips and previews channel.
If you check out some mods, like say 1st Person Sprint FOV Remover, and compare them with the vanilla hkx's using their XML convertions, you'll see that fov changes can in fact be baked-in in the animation (this includes aiming zoom, trust me). But so far I don't think anyone found a way (or disclosed it...) to do that for custom anims, be that through regular export or through XML-tweaking shenanigans
(Some pics of a weapon I was able to animate)
Could not convert WPNReload.hkx to ascii .fbx. returncode: 3221225781
Please check if:
1. Other files work or it fails every time. (you can select multiple files during the import)
And make sure that:
2. The file path to the programs is correct.
3. The script is the newest version. (2.3.0)
4. The .blend file is in the same folder as the assets folder.
The console output might also give me some insight. You can get it by clicking the Window menu at the top left inside Blender and then Toggle System Console. Just post the last 20 or 30 lines in a [ CODE ] thingie
like this.
Feel free to also drop by my Discord for more direct support.
1. All .hkx files fail to import.
2. All paths are correct, even reorganized and ensured they were correct.
3. It is.
4. I've double-checked and made sure of this.
Checked the system console, it seems havok2fbx isn't working for some reason. I re-installed it from Github and it didn't work, and then I used the one included with F4AK and it didn't work either. The only error code it gives is the one I posted.
So make sure that "libfbxsdk.dll" is in the same folder as havok2fbx.exe.
It could also be possible that it requires some other common framework like .net framework or Visual Studio C++ redistributable but I can't say for sure. Checking the GitHub only tells me that you need "Visual Studio 2012 for Platform Toolset V110" to compile it but I doubt you need that to run it.
So the last two suggestions I can think of are installing Visual Studio C++ 2012 redistributablesand making sure that the files and program aren't in a folder/subfolder with letters that aren't used in English. Usually, that's not a problem but some programs can have a problem with other languages. Maybe Havok2fbx is one of them?