Updated the Blender HKX plug-in using Coach's updated Fork, the plug-in will remember your length scale now so you don't need to set it each time you export after opening a file
Sped up animation playback by Changing the “Playback” > “Sync” To “Frame dropping” this should speed up slow animation playback(If the playback lags in blender ) a bit, it has no effect on exported animation speed
Added a 3rd person Paired rig (1st person paired rig to come later on)
Thanks to PhiloSocio, he fixed weapon Positions in 3rd person
Added a Scaler bone to 3rd person rigs, Skyrim doesn’t support scaling, but this allows you to visualise different actor scales if need be
All rigs now, can have LE HKX animations imported onto them, You can import by selecting the control rig, going File >> Import >> "Havok Animation (.hkx)" make sure "Length Scale" is set to 1 and your skeleton is the XP skeleton after importing you need to set each limb to FK mode If importing to the paired rig, select both rigs before importing your HKX
If you wanted to edit the anim you imported, because I'm doing 2 way retargeting with one rig you need to unhide the import bones layer in Blenders far right pane then you'd animate those controllers Select the rig >> click the little green dancing man in the left hand pane and click the eye next to "Import Bones" Once unhidden you'll see little pale purple ball controllers, not every bone has an import bone(as they are import bones themselves) The weapon bone in first person does not get imported, I can't figure out why but the whole import thing is jank as anything so I just scraped importing it
When exporting the paired rig, select the Victim first, check the read me for a better description
BeefClot/Coach has taken this rig and updated it with a few new features, check it out here
I'm posting this both here and on Coach's rig since the problems affect both.
I kept getting the "Exactly 0 or 0 Armatures must be selected" error whenever I tried to import some animations. After a couple days, I managed to isolate the problem to 2 causes:
1. The file is formatted incorrectly. For some reason, some animations would be labeled an hkx file but would be structured like an xml file. As in it would be called "anim.hkx" but opening it in notepad++ shows it structured like an xml file instead of the wall of random characters and NUL that you expect. Sometimes changing the .hkx to .xml allows it to be converted by a converter, but not always. No idea what can be done about that.
2. The skeleton doesn't have enough bones. The included skeleton.hkx and xpskeleton.hkx have 99 and 156 bones respectively. This works for vanilla animations and some modded ones, but some animations (including most of the ones I wanted to import) need a skeleton with 242 bones. This matches the XPMS rig rather than than the 156-bone XPMSE rig. This can be fixed easily by just adding the missing skeleton. It would also be nice to add something to detect which skeleton to use automatically during the importing process rather than need to manually specify the skeleton.
Another problem I found after importing is that many animations that use either the 156-bone or 242-bone skeleton will have some sort of transformation effect (location, rotation, and/or scale) on bones that shouldn't be affected. They will even affect locked transforms.
Anyway this rig is fantastic. I'm not using it to make animations for skyrim but instead using it to render skyrim animations in blender. It works great for that (apart from the issue mentioned above).
Those issues sound like something I couldn’t really fix(other than including the old skeleton) Beefclot/Coach maybe able to fix them up on his rig as he's smarter than me and actually knows things
I've ran into the incorrect skeleton stuff a lot I didn't think about the older XP rig, thanks for the heads up I'll try to include that when I get around to releasing an update to this, thanks for the heads up
I'm glad the rig is working out well for you, I'm sure you've looked into it but I have got a bunch of other meshes included in the blend file(like 2 different hair meshes) that may slow it down a tiny tiny tiny bit be sure to clear them out if you don't need them
Nak, ive got another question thats a bit rougher around the edges. ive managed to get blender and niflys versions lined up to import models, and there may be an easier way around this-
in the paired rig, how would i go about replacing the victim rigs mesh with the male model? what i found is trying to use this the other way around causes textures on the "victim" rig to disappear. my notion is i would import basically the same nif you used, just pulled myself from BS/OS, but im a bit fuzzy on how id import the nif onto the victim rigs location
still lovin these rigs, btw; big thx
edit- figured this one out except for the texture issue. this one is very strange- depending on the angle of the camera, body overlays will disappear off of the character in game, but it seems to be coming from the paired control rig; the texture vanishing doesnt appear on the main rig and obviously not on the FP. its not a huge deal honestly
i am wondering tho- how did you solve the issue of the player character changing heights when the pelvis/hip nodes are modified in your TTTL anims? ive been dealing with that bizarre problem for a while. i think its something to do with the games IK
i followed your instruction for creating annoations. but when i click the export markers button. a text file appears that is empty ! i've added 2 annotation markers, changed to deform rig, selected everything (+ the markers) and then clicked on the export markers button. let me know what i'm doing wrong.
also switching from IK to Fk... is there a way to switch all bones to FK all at once for importing an animation ? because right now, not only do i have to switch everybone to FK manually, but it seems that i have to do it, for literally every single keyframe in an animaton... which is a Craaaaazy thing to do, if that is indeed the way to do it, rather than some easier way that i'm not aware of.
Tbh the export markers button was made before I had the HKX plugin set up, I'm not 100% sure if it exports pose markers, it may only be scene markers, I just left it there as it may have been useful in some way, but with the hkx exporter you don't need to export markers like that just add them to the deform rig as pose markers(pose markers are diamonds with an elongated top point not just triangles) then export your animation via the hkx exporter and the annotations will be in your animation The IK FK switching it sounds like you've got a keyframe that sets IK to be enabled, by default with no key frames once you switch to FK/IK it'll stay in FK/IK you don't need to do it for each keyframe
UNLESS you mean snapping FK to IK? If so then yeah, you'd have to do for every keyframe, I haven't looked into it yet but that was something I was eventually gonna get around to looking into The best thing to do currently is select the entire rig then remove most keyframes on your imported animation but keep some at regular 5 frame intervals(unless it's and idle or something) and when ever a limb starts or stops moving
You could also try using constraints and baking to do it yourself(it's how the UI buttons do it) you'd select the The IK Hand controllers(Hand Ctrl.R/L) add a Copy Transforms constraint, set the target to "Control Rig Root" then the Bone to "Hand FK to IK Snap.R" (Hand FK to IK Snap.L if your doing the left hand) Then select the Elbow IK Target for your Arm (Pink Sphere hovering behind the Arms) add another Copy Transforms constraint to it, set the target to "Control Rig Root" then the Bone to "Elbow FK to IK Snap.R"(.L for left)
With that done make sure you're still in Pose mode, Press F3 then type in bake then select Bake Action: Make sure the start and end frames match your animation length Make sure frame step is set to 1 Tick the following: Only Selected Bones Visual Keying Clear Constraints Overwrite Current Action
Bake data should be set to Pose
This will then transfer all the FK movement to your IK Bones but also adding a keyframe to every frame of your Selected IK bones(it's based on the frame step value) You'd have to go and clear up the Extra added keys to the IK bones but at least you got your animation in IK mode
You can set up the constraints on each limb and IK target then with all 8 IK(Hands feet Knees and Elbows) bones selected Bake the animation
For the legs instead of using Hand FK to IK Snap.R you'd use Heel Pivot Snap.R instead of using Elbow FK to IK Snap.R you'd use Knee FK to IK Snap.R
but with the hkx exporter you don't need to export markers like that just add them to the deform rig as pose markers(pose markers are diamonds with an elongated top point not just triangles) then export your animation via the hkx exporter and the annotations will be in your animation
so i tried and done the 2 things i could think of, that you might've meant by this: A. i just straight up used your instructions to export the animation Via blender's .HKX exporter addon, while have 2 pose markers.
B. after i exported the animation, i put it in the folder literally called "HKX exporter" and dragged and dropped the animation (also called the animation 1hm_attackright.hkx) straight on the "blender-hkx.exe". the app opened and then closed instantly and no changes were made to the animation.
neither way produced the intended purpose of creating annotations for the animation. unless once again i made a mistake and i would welcome it if you would correct me on it.
as for the Ik/Fk bones switch. your solution, to delete some frames from an imported animation every 5 keyframes, isn't really viable, because i am literally undoing a complicated 40+ keyframes animation and only leaving 9 keyframes. this way after i am done with making changes to the imported animation, i literally have to remake the animation from ground up by recreating those keyframes and poses. that is an insane amount of work in order to just import an LE animation, observe it and make some minor changes to it such as removing the excess hits that it may have.
also here you've said:
The IK FK switching it sounds like you've got a keyframe that sets IK to be enabled, by default with no key frames once you switch to FK/IK it'll stay in FK/IK you don't need to do it for each keyframe
this kept happening to me with multiple LE animations, and even SE animations that i backported to LE to test here. infact i was never able to get a single animation to behave properly and have the bones in the right place when i put IK bones into FK mode as you suggested on another post that had this same issue here:
You need to put each IK bone(arms and legs) into Fk mode, the importer can't import into IK bones due to how they work
also i do not understand the process of baking as you explained (btw thank you for putting the effort into explaining it regardless), eventhough your explanation seems thorough, i'm just not well versed enough in this process to be able to do that without further and much more thorough explanation. maybe add it in the description as a separate topic, explaining how to import an animation into the rig properly ? or maybe an optional file readme that explains the process from 0 to 100, in a more newbie friendly way ?
that would be great. i'd await your response, and thank you again, both for the rig and for being active in answering us in the comments.
so i tried and done the 2 things i could think of, that you might've meant by this: A. i just straight up used your instructions to export the animation Via blender's .HKX exporter addon, while have 2 pose markers.
B. after i exported the animation, i put it in the folder literally called "HKX exporter" and dragged and dropped the animation (also called the animation 1hm_attackright.hkx) straight on the "blender-hkx.exe". the app opened and then closed instantly and no changes were made to the animation.
The instructions do work, I do this all the time when making animations, Are you sure you're spelling your annotations right? You just need the event name, no time like you'd need with hk anno
I don't know what to suggest to you about the IK FK switching now, Sorry to say that's just the way it works, I don't know
Beefclot took my rig and made some improvements on it here: https://www.nexusmods.com/skyrimspecialedition/mods/148736
He has a switch all limbs to and from IK/FK button as well as switch all keyframes from IK to FK, they may be more up your street?
By spelling the annotations right I mean exactly that, you're not adding spaces or extra characters in the annotations? Say you got an event called "fredy" that you want as an annotation, are you spelling it as just "fredy" and not something like "1.123 fredy" or "FREDY" or " fredy "
If it's a custom event does the event exist in the behaviours your animation plays in? An event wont fire if it doesn't exist in the behaviour files
If you're doing AMR stuff make sure you're typing it like: "animmotion 0 40 0" instead of "animmotion 0,40,0" as per AMR's mod description
thanks for explaining. i am indeed trying to add AMR annotations and naming them "animmotion" as well as removing some hitframes from MCO's animations because they hit multiple times when you use them in the vanilla game.
my tools are really old though, i haven't made animations for skyrim since 2022 (before mco), and i just recently returned. i use hkanno64 & skyrim guild's annotation tool to create annotations. maybe that's not how it works with your rig and everything is updated now, so feel free to let me know, if that is the case.
Tried on a fresh rig download, installed HKX plugin and configured it to point to the included converter and temporary map, i set default skeleton to the skeleton.hkx, and tried importing a LE animation. Only ending up with a slightly angled twitching mess. Uploaded an image showing the method and result.
Is there any way to switch the FK mode animation to a IK mode animation? Some of the controller nodes don't really do much in FK mode, unless i am misunderstanding.
I'm not sure what you mean? But below this post I just did a little write up on how to bake an entire animation's FK movement into IK movement that may be helpful to what you need?
Errr, I actually have no clue, I'm guessing everything is unreal there and not using KFs(I think Oblivion used kf animations) so existing tools may not work with it, I'm assuming it's a very specific unreal version so unreal tools may need updating to fix that issue, I don't know
I'm also not a fan of over 100gb of my pc being taken up by a single non modded game
Hello! When I follow the instructions as outlined in the readme, I end up seemingly being able to export to .hkx properly, but when I try to import it back in, it says "file contains no skeleton". I follow the import guideline to the letter as well. Am I missing something incredibly obvious that might have not been added to the readme?
EDIT: I have to assume this rig is dysfunctional due to issues with importing .hkx files, if anyone is experiencing the same or experience no issues I'd love to hear, otherwise this edit will remain until I've seen this rig function properly.
Nak, greatly enjoying the rig so far. im coming at this from Mike's rig, but so far so good
i have two questions, one is dumb and the other is possibly dumb
firstly, how the heck to i display the menu where the finger poses are stored? i feel like i am just missing it somewhere obvious
and second, ive partially figured out how to get the importer to cooperate with me, but there are certain anims ill attempt to import that will trigger the 0 and 0 armature error; from what i can determine, its the animation itself and not the importer, or at least i think so. is there any way around this? further note on this, i know out of the gate that the 64x anims cant be brought in yet, but at least as far as i can tell these are 32s that just wont come in at all- not mangled or anything, just stopped at the armature warning
at any rate, love the rig, thank you greatly
edit. ignore this one. slowly but surely im overcoming my fear of just messing with options. in case anyone else cant find it, its "View" in pose mode, enable "Asset Shelf"
firstly, how the heck to i display the menu where the finger poses are stored? i feel like i am just missing it somewhere obvious
This has changed a few times between versions but It think with blender 4.x you can show it by clicking the little tiny up arrow at the bottom right of the 3d view port, or if there's no arrow there then go to "View" in the 3d viewport(next where your current mode is displayed) then tick Asset shelf, you can then hide it either view that menu or by dragging it back down, like you would resize any window
Ah I just saw your edit lol
I'm not sure about your animation importing issues, maybe you have more than just rigs selected, or it could just be the animations like you said, I know some people myself included did export animations with weird bone lists in the past that may also be an issue
Not sure if it's within your power to fix, but the hkx exporter plugin repeatedly points to a drive that doesn't exist on my PC when I'm preparing to export my animation(s). Specifically, it does this with the primary skeleton file path. I noticed it only does this when loading the provided rigs, as trying to export with the default Blender project points to the correct skeleton file path I put when setting up the exporter plugin.
EDIT: Managed to fix the issue by exporting a generic unmodified animation with the correct skeleton file path and saving the rig as a new .blend file.
Yeah it's trying to export to a place on my PC, just the nature of how Blender stores the file path after I set it up, I know you solved it now but if you select the rig then click the armature button (green dancing man) on the right of Blender and scroll down you can select the path to your skeleton there, or like you did just exporting an animation with the correct path
Be sure you've set up the plug-in correctly too in Blender's plug-in options!
210 comments
make sure "Length Scale" is set to 1 and your skeleton is the XP skeleton after importing you need to set each limb to FK mode
If importing to the paired rig, select both rigs before importing your HKX
If you wanted to edit the anim you imported, because I'm doing 2 way retargeting with one rig you need to unhide the import bones layer in Blenders far right pane then you'd animate those controllers
Select the rig >> click the little green dancing man in the left hand pane and click the eye next to "Import Bones"
Once unhidden you'll see little pale purple ball controllers, not every bone has an import bone(as they are import bones themselves)
The weapon bone in first person does not get imported, I can't figure out why but the whole import thing is jank as anything so I just scraped importing it
When exporting the paired rig, select the Victim first, check the read me for a better description
BeefClot/Coach has taken this rig and updated it with a few new features, check it out here
I'm facing the same issue with Coach's rig
I kept getting the "Exactly 0 or 0 Armatures must be selected" error whenever I tried to import some animations. After a couple days, I managed to isolate the problem to 2 causes:
1. The file is formatted incorrectly. For some reason, some animations would be labeled an hkx file but would be structured like an xml file. As in it would be called "anim.hkx" but opening it in notepad++ shows it structured like an xml file instead of the wall of random characters and NUL that you expect. Sometimes changing the .hkx to .xml allows it to be converted by a converter, but not always. No idea what can be done about that.
2. The skeleton doesn't have enough bones. The included skeleton.hkx and xpskeleton.hkx have 99 and 156 bones respectively. This works for vanilla animations and some modded ones, but some animations (including most of the ones I wanted to import) need a skeleton with 242 bones. This matches the XPMS rig rather than than the 156-bone XPMSE rig. This can be fixed easily by just adding the missing skeleton. It would also be nice to add something to detect which skeleton to use automatically during the importing process rather than need to manually specify the skeleton.
Another problem I found after importing is that many animations that use either the 156-bone or 242-bone skeleton will have some sort of transformation effect (location, rotation, and/or scale) on bones that shouldn't be affected. They will even affect locked transforms.
Anyway this rig is fantastic. I'm not using it to make animations for skyrim but instead using it to render skyrim animations in blender. It works great for that (apart from the issue mentioned above).
I've ran into the incorrect skeleton stuff a lot I didn't think about the older XP rig, thanks for the heads up I'll try to include that when I get around to releasing an update to this, thanks for the heads up
I'm glad the rig is working out well for you, I'm sure you've looked into it but I have got a bunch of other meshes included in the blend file(like 2 different hair meshes) that may slow it down a tiny tiny tiny bit be sure to clear them out if you don't need them
in the paired rig, how would i go about replacing the victim rigs mesh with the male model? what i found is trying to use this the other way around causes textures on the "victim" rig to disappear. my notion is i would import basically the same nif you used, just pulled myself from BS/OS, but im a bit fuzzy on how id import the nif onto the victim rigs locationstill lovin these rigs, btw; big thx
edit- figured this one out except for the texture issue. this one is very strange- depending on the angle of the camera, body overlays will disappear off of the character in game, but it seems to be coming from the paired control rig; the texture vanishing doesnt appear on the main rig and obviously not on the FP. its not a huge deal honestly
i am wondering tho- how did you solve the issue of the player character changing heights when the pelvis/hip nodes are modified in your TTTL anims? ive been dealing with that bizarre problem for a while. i think its something to do with the games IK
i've added 2 annotation markers, changed to deform rig, selected everything (+ the markers) and then clicked on the export markers button.
let me know what i'm doing wrong.
also switching from IK to Fk... is there a way to switch all bones to FK all at once for importing an animation ? because right now, not only do i have to switch everybone to FK manually, but it seems that i have to do it, for literally every single keyframe in an animaton... which is a Craaaaazy thing to do, if that is indeed the way to do it, rather than some easier way that i'm not aware of.
thanks in advance.
The IK FK switching it sounds like you've got a keyframe that sets IK to be enabled, by default with no key frames once you switch to FK/IK it'll stay in FK/IK you don't need to do it for each keyframe
UNLESS you mean snapping FK to IK? If so then yeah, you'd have to do for every keyframe, I haven't looked into it yet but that was something I was eventually gonna get around to looking into The best thing to do currently is select the entire rig then remove most keyframes on your imported animation but keep some at regular 5 frame intervals(unless it's and idle or something) and when ever a limb starts or stops moving
You could also try using constraints and baking to do it yourself(it's how the UI buttons do it) you'd select the The IK Hand controllers(Hand Ctrl.R/L) add a Copy Transforms constraint, set the target to "Control Rig Root" then the Bone to "Hand FK to IK Snap.R" (Hand FK to IK Snap.L if your doing the left hand) Then select the Elbow IK Target for your Arm (Pink Sphere hovering behind the Arms) add another Copy Transforms constraint to it, set the target to "Control Rig Root" then the Bone to "Elbow FK to IK Snap.R"(.L for left)
With that done make sure you're still in Pose mode, Press F3 then type in bake then select Bake Action:
Make sure the start and end frames match your animation length
Make sure frame step is set to 1
Tick the following:
Only Selected Bones
Visual Keying
Clear Constraints
Overwrite Current Action
Bake data should be set to Pose
This will then transfer all the FK movement to your IK Bones but also adding a keyframe to every frame of your Selected IK bones(it's based on the frame step value) You'd have to go and clear up the Extra added keys to the IK bones but at least you got your animation in IK mode
You can set up the constraints on each limb and IK target then with all 8 IK(Hands feet Knees and Elbows) bones selected Bake the animation
For the legs
instead of using Hand FK to IK Snap.R you'd use Heel Pivot Snap.R
instead of using Elbow FK to IK Snap.R you'd use Knee FK to IK Snap.R
i didn't quite understand what you meant by this:
so i tried and done the 2 things i could think of, that you might've meant by this:
A. i just straight up used your instructions to export the animation Via blender's .HKX exporter addon, while have 2 pose markers.
B. after i exported the animation, i put it in the folder literally called "HKX exporter" and dragged and dropped the animation (also called the animation 1hm_attackright.hkx) straight on the "blender-hkx.exe". the app opened and then closed instantly and no changes were made to the animation.
neither way produced the intended purpose of creating annotations for the animation. unless once again i made a mistake and i would welcome it if you would correct me on it.
as for the Ik/Fk bones switch. your solution, to delete some frames from an imported animation every 5 keyframes, isn't really viable, because i am literally undoing a complicated 40+ keyframes animation and only leaving 9 keyframes. this way after i am done with making changes to the imported animation, i literally have to remake the animation from ground up by recreating those keyframes and poses. that is an insane amount of work in order to just import an LE animation, observe it and make some minor changes to it such as removing the excess hits that it may have.
also here you've said:
this kept happening to me with multiple LE animations, and even SE animations that i backported to LE to test here. infact i was never able to get a single animation to behave properly and have the bones in the right place when i put IK bones into FK mode as you suggested on another post that had this same issue here:
also i do not understand the process of baking as you explained (btw thank you for putting the effort into explaining it regardless), eventhough your explanation seems thorough, i'm just not well versed enough in this process to be able to do that without further and much more thorough explanation. maybe add it in the description as a separate topic, explaining how to import an animation into the rig properly ? or maybe an optional file readme that explains the process from 0 to 100, in a more newbie friendly way ?
that would be great. i'd await your response, and thank you again, both for the rig and for being active in answering us in the comments.
The instructions do work, I do this all the time when making animations, Are you sure you're spelling your annotations right? You just need the event name, no time like you'd need with hk anno
I don't know what to suggest to you about the IK FK switching now, Sorry to say that's just the way it works, I don't know
Beefclot took my rig and made some improvements on it here: https://www.nexusmods.com/skyrimspecialedition/mods/148736
He has a switch all limbs to and from IK/FK button as well as switch all keyframes from IK to FK, they may be more up your street?
thank you so much for the hint. that Skeleton rig is exactly what is was looking for.
i don't know what do you mean by this. do i have to name them something specific in your skeleton rig, for them to work ?
Say you got an event called "fredy" that you want as an annotation, are you spelling it as just "fredy" and not something like "1.123 fredy" or "FREDY" or " fredy "
If it's a custom event does the event exist in the behaviours your animation plays in? An event wont fire if it doesn't exist in the behaviour files
If you're doing AMR stuff make sure you're typing it like: "animmotion 0 40 0" instead of "animmotion 0,40,0" as per AMR's mod description
my tools are really old though, i haven't made animations for skyrim since 2022 (before mco), and i just recently returned. i use hkanno64 & skyrim guild's annotation tool to create annotations. maybe that's not how it works with your rig and everything is updated now, so feel free to let me know, if that is the case.
Tried on a fresh rig download, installed HKX plugin and configured it to point to the included converter and temporary map, i set default skeleton to the skeleton.hkx, and tried importing a LE animation.
Only ending up with a slightly angled twitching mess. Uploaded an image showing the method and result.
Any help is appreciated.
I'm also not a fan of over 100gb of my pc being taken up by a single non modded game
EDIT: I have to assume this rig is dysfunctional due to issues with importing .hkx files, if anyone is experiencing the same or experience no issues I'd love to hear, otherwise this edit will remain until I've seen this rig function properly.
i have two questions, one is dumb and the other is possibly dumb
firstly, how the heck to i display the menu where the finger poses are stored? i feel like i am just missing it somewhere obvious
and second, ive partially figured out how to get the importer to cooperate with me, but there are certain anims ill attempt to import that will trigger the 0 and 0 armature error; from what i can determine, its the animation itself and not the importer, or at least i think so. is there any way around this? further note on this, i know out of the gate that the 64x anims cant be brought in yet, but at least as far as i can tell these are 32s that just wont come in at all- not mangled or anything, just stopped at the armature warning
at any rate, love the rig, thank you greatly
edit. ignore this one. slowly but surely im overcoming my fear of just messing with options. in case anyone else cant find it, its "View" in pose mode, enable "Asset Shelf"
This has changed a few times between versions but It think with blender 4.x you can show it by clicking the little tiny up arrow at the bottom right of the 3d view port, or if there's no arrow there then go to "View" in the 3d viewport(next where your current mode is displayed) then tick Asset shelf, you can then hide it either view that menu or by dragging it back down, like you would resize any window
Ah I just saw your edit lol
I'm not sure about your animation importing issues, maybe you have more than just rigs selected, or it could just be the animations like you said, I know some people myself included did export animations with weird bone lists in the past that may also be an issue
EDIT: Managed to fix the issue by exporting a generic unmodified animation with the correct skeleton file path and saving the rig as a new .blend file.
Be sure you've set up the plug-in correctly too in Blender's plug-in options!