infiniteone Posted May 7, 2022 Posted May 7, 2022 1 hour ago, dagobaking said: Andrelo got back to me and pointed out that the correct list of bones to work with comes from skeleton.hkx. Not skeleton.nif. I was able to convert skeleton.hkx to XML and confirm that the bones in there are the same ones as bonelist.txt. But, I'm not sure how to convert from XML to Blender. It's probably true that I can just manually add those bones as you say. But, I worry that something about my addition will be off. Maybe that's a product of my lack of Blender experience... Im not sure skeleton.hkx would be of any use to blender, we can import skeleton.nif or a character to have the rig in there, but skeleton.hkx is more a data file for havok, we can get the bone names and index off it though, Skyrim is the same in this regard. Looking at example.config.hko we can see he calls the bonelist.txt on line 52, so its generic & should take account to any variations we have of the bonelist.txt. There's some bat tools for skyrim to extract the bonelist from skeleton.nif to .txt file, but its for 32 bit, and maybe more than is needed, once we get the list for each skeleton its not changing for any given skeleton or variation again. 1
Vader666 Posted May 7, 2022 Posted May 7, 2022 1 hour ago, Bad Dog said: How did you convert skeleton.hkx to xml? You can do that the same way you can convert animations from .hkx to .xml There is a tool for that in the F4AK.. 2
dagobaking Posted May 7, 2022 Posted May 7, 2022 10 hours ago, infiniteone said: Im not sure skeleton.hkx would be of any use to blender, we can import skeleton.nif or a character to have the rig in there, but skeleton.hkx is more a data file for havok, we can get the bone names and index off it though, Skyrim is the same in this regard. Looking at example.config.hko we can see he calls the bonelist.txt on line 52, so its generic & should take account to any variations we have of the bonelist.txt. There's some bat tools for skyrim to extract the bonelist from skeleton.nif to .txt file, but its for 32 bit, and maybe more than is needed, once we get the list for each skeleton its not changing for any given skeleton or variation again. I'm not sure if something changed in Fallout 4 compared to Skyrim. But, there are bones listed in bonelist.txt and skeleton.hkx that are not in skeleton.nif at all. I'm guessing that the game attaches them to the skeleton at some point during game? In any case, I think they need to be included in animation .hkx or it could break weapon positioning during animations. I'm thinking that I can probably just import the test blend file andrelo made and copy those bones over to the Zex nif imported armature. FWIW, the nif also includes a ton of bones that dont get put into animation data ( various twist and skin bones etc ). 7 hours ago, Bad Dog said: How did you convert skeleton.hkx to xml? I was able to do that with this: https://github.com/Dexesttp/hkxpack 1
infiniteone Posted May 9, 2022 Posted May 9, 2022 (edited) On 5/7/2022 at 4:42 PM, dagobaking said: I'm not sure if something changed in Fallout 4 compared to Skyrim. But, there are bones listed in bonelist.txt and skeleton.hkx that are not in skeleton.nif at all. I'm guessing that the game attaches them to the skeleton at some point during game? In any case, I think they need to be included in animation .hkx or it could break weapon positioning during animations. I'm thinking that I can probably just import the test blend file andrelo made and copy those bones over to the Zex nif imported armature. FWIW, the nif also includes a ton of bones that dont get put into animation data ( various twist and skin bones etc ). I was able to do that with this: https://github.com/Dexesttp/hkxpack Yeah that sounds about right, but im curious if those bones will export in the fbx if they're not rigged or keyframed? I seem to remember there's some sort of culling that takes place in some circumstances, but may be changeable with a setting perhaps or it was an older version of blender, I guess we will find out soon enough testing lol. I looked at the hkxpack, he mentions hkxcmd which is the one ive used, I suppose the changes were enough in the format fo4 needs its own tools. If its feature complete with hkxcmd then it can do many things, including converting an animation to .kf (bethesdas custom hkx format), which is importable with the blender niftools addon, so long as you convert to 32bit files, I have not tested that yet so perhaps not. Edit: Wow that skeleton.hkx converted to xml is over six thousand lines ? given the compressed hkx is only a bit over a hundred lines Id say thats some pretty epic compression lol. Bless you for digging thru to see the bones, thats a massive doc. Edit2: After looking thru hkxpack I see he only ported xml conversion aspects, so converting to .kf is nope. Maybe havok tools has other things we can run, and converting to kf is still possible. On his hkxanim repository readme he also mentions not being able to convert hkx anims to fbx, only one way at present, from fbx to hkx. Getting the vanilla anims into blender seems important, especially when wanting to create variations to mix in, like adding more idles, but having blends of other idles mixed in, or re-targeting/repurposing animations for different uses, etc. Edited May 9, 2022 by infiniteone
Vader666 Posted May 9, 2022 Posted May 9, 2022 (edited) 1 hour ago, infiniteone said: he also mentions not being able to convert hkx anims to fbx, only one way at present, from fbx to hkx. I used the tool to convert a vanilla furniture animation to .fbx in order to correct the camera position in the 3dsMax rig. Which means the tool is at least somewhat able to convert to fbx. For animation purposes the extra bones in skeleton.hkx don't really matter, as long as they are taken into account for bone hierachy / boneIDs, thats why you generate the rigmap.txt out of skeleton.hkx and not skeleton.nif. For example the skeleton.hkx contains the camera nodes, so you can animate the camera, but the "_skin" helper bones are not present in the skeleton.hkx so you can't animate these. The skeleton.hkx also contains the ragdoll skeleton which is maped to the animation skeleton in order to get ragdoll effects when needed. Edited May 9, 2022 by Vader666 1
infiniteone Posted May 9, 2022 Posted May 9, 2022 2 hours ago, Vader666 said: I used the tool to convert a vanilla furniture animation to .fbx in order to correct the camera position in the 3dsMax rig. Which means the tool is at least somewhat able to convert to fbx. For animation purposes the extra bones in skeleton.hkx don't really matter, as long as they are taken into account for bone hierachy / boneIDs, thats why you generate the rigmap.txt out of skeleton.hkx and not skeleton.nif. For example the skeleton.hkx contains the camera nodes, so you can animate the camera, but the "_skin" helper bones are not present in the skeleton.hkx so you can't animate these. The skeleton.hkx also contains the ragdoll skeleton which is maped to the animation skeleton in order to get ragdoll effects when needed. Thanks for the info and help. ? In my recent test I was able to get the vanilla fo4 animation keyframes into latest Blender 3. Few steps, using the animation kit you recommended prior, and the tool within havok2fbx. First had to open the animation hkx in question in Havok Content Tools standalone, then save the file as 32bit version hkx. Maybe theres a cli or .bat way to do that? Then run the havok2fbx cli command on it along with the correct matching skeleton.hkx there in the folder and the cli command. Strangely it makes an acsii fbx, so we must run it thru the free Autodesk Fbx converter on default settings in order to have an FBX that blender can import. I was able to get the keyframes in and they play perfect, but the rig it built looks strange, all the hierarchy & names are correct, but the bone widgets look to be placed oddly, not lined up to each other, perhaps its better to have a rig in the blend file already and selected when importing the fbx? Im guessing the fbx import options might need specific settings for fo4 too, but im not sure what yet & have to tinker, I just used the default settings. Here quick example, Its the vanilla anim IdleKickDoor.hkx 94bffa6d4ad180aacc6116b17ecaf4da.mp4 2
infiniteone Posted May 9, 2022 Posted May 9, 2022 (edited) LOL, yes import settings matter..., I just needed to tick Automatic Bone Orientation in fbx import settings for the bones widgets to line up proper. I also set the scale on import to be 10x larger since it was tiny AF. 7854ac630e16faf95f75445e258b8c06.mp4 Edited May 9, 2022 by infiniteone 2
infiniteone Posted May 9, 2022 Posted May 9, 2022 (edited) If you notice, it seems it brought in all the bones for the rig too, so we dont need to manually create the rig, if we have an animation hkx already available to convert to .fbx that has a skeleton.hkx to go with it, with the 3 steps I outlined two posts above. Edit See, its all the bones, will work the same with Zex skeleton and other creatures too I wager. Edited May 9, 2022 by infiniteone
infiniteone Posted May 9, 2022 Posted May 9, 2022 So we just have to do that once for each skeleton type and save as a source file and we have all the rigs for blender.
infiniteone Posted May 9, 2022 Posted May 9, 2022 (edited) If we recompile havok2fbx we can remove step 3 in my list above by exporting the fbx as binary and not acsii, controlled here in this code. https://github.com/Highflex/havok2fbx/blob/master/Core/FBXCommon.cxx Edit: Further streamlining may be had by tweaking it to work with 64bit files? Thats beyond me where thats being done in the code.... Doing that too though would remove step one from my list above leaving only step 2. Edited May 9, 2022 by infiniteone
Vader666 Posted May 9, 2022 Posted May 9, 2022 6 hours ago, infiniteone said: and we have all the rigs for blender. No, you just got the game skeletons. You could certainly do animations with that but its a pain in the back. Not sure how blender handles it but having a control rig the game skeleton is constrained to typically makes things like mirroring motions much easier. 2
infiniteone Posted May 9, 2022 Posted May 9, 2022 (edited) 6 hours ago, Vader666 said: No, you just got the game skeletons. You could certainly do animations with that but its a pain in the back. Not sure how blender handles it but having a control rig the game skeleton is constrained to typically makes things like mirroring motions much easier. Yea, but its rig based on skeleton.hkx so everything is in there at least, no missing bones, of course setting up ik and convenience widgets and all the other bits is lots more work besides. That animating rig from skyrim guild, and the other ones listed here in this thread are showing some of the ik and constraints possibilities for putting in the animating rig. On the vanilla anims, im pretty sure I can import only the keyframes without the rig too, so once there's a good animating build setup that'd be what I do. Mostly what i was sharing earlier was to get past the issue of not having all bones in the rig, adding them manually could be laborious and isnt needed for any of the skeletons using the fbx steps I mentioned. Edited May 9, 2022 by infiniteone
dagobaking Posted May 10, 2022 Posted May 10, 2022 (edited) 17 hours ago, infiniteone said: If you notice, it seems it brought in all the bones for the rig too, so we dont need to manually create the rig, if we have an animation hkx already available to convert to .fbx that has a skeleton.hkx to go with it, with the 3 steps I outlined two posts above. Edit See, its all the bones, will work the same with Zex skeleton and other creatures too I wager. That's good. Though, essentially, isn't that armature the same as the example one andrelo included? This would work for people using the Zex skeleton. But, without any data for the bones Zex adds. I suppose you could do this HKX to FBX process on an animation for Zex and get the extended skeleton that way? Want to share a .blend of that? 10 hours ago, Vader666 said: You could certainly do animations with that but its a pain in the back. Not sure how blender handles it but having a control rig the game skeleton is constrained to typically makes things like mirroring motions much easier. Indeed. I was looking into that and got stuck on the bone differences issue. The video [series] I posted above covers 90% of the control rigging. It's pretty straight forward. But, tedious. I feel like by the time I figure it all out though, someone who already knows what they are doing will make a better one. Edited May 10, 2022 by dagobaking 1
infiniteone Posted May 10, 2022 Posted May 10, 2022 7 hours ago, dagobaking said: That's good. Though, essentially, isn't that armature the same as the example one andrelo included? This would work for people using the Zex skeleton. But, without any data for the bones Zex adds. I suppose you could do this HKX to FBX process on an animation for Zex and get the extended skeleton that way? Want to share a .blend of that? Indeed. I was looking into that and got stuck on the bone differences issue. The video [series] I posted above covers 90% of the control rigging. It's pretty straight forward. But, tedious. I feel like by the time I figure it all out though, someone who already knows what they are doing will make a better one. Vanilla stuff all works, but Ive been trying it with Zex based animations and skeleton just recently and its a no go for me so far. ? I cant even open the Zex skeleton.hkx in Havok content tools to convert it to 32 bit, it crashes instantly, and the havok2fbx cant use it at 64bit. If I use the vanilla skeleton.hkx with an animation based on Zex when converting to fbx, it works but not really, I get ERROR: Number of tracks is not equal to bones An impasse. I will keep tinkering because I love to lol, maybe i'll figure it out. We may have to just export the Zex rig files from 3ds to fbx once, since they're built already, so we have them to work with as a starting base for blender, still lots more work after that though. And we'd still have the issue of no 32bit skeleton.hkx for Zex, so we could import Zex based anims for retargeting to different creatures/uses etc.
infiniteone Posted May 10, 2022 Posted May 10, 2022 (edited) I may even recompile havok2fbx so it doesnt force acsii fbx, and can work with 64bit files, then maybe there'd be less problems, but I wont unless I can figure how that'd be done, & can get all the needed sources. Im not even sure why they ever made it 32 bit, fallout 4 is 64bit, maybe its their source files that forced it? hmm. Edit: Found this here, looks useful for batch converting a bunch of filesto 32 bit, it works on the anims, but not the zex skeleton.hkx unfortunately. Edited May 10, 2022 by infiniteone
Vader666 Posted May 10, 2022 Posted May 10, 2022 Just imported the ZeX skeleton + a FusionGirl body into blender 3. Should work, but can't test it myself. ZeX-FG_BlenderImport.blend 4
infiniteone Posted May 10, 2022 Posted May 10, 2022 (edited) 33 minutes ago, Vader666 said: Just imported the ZeX skeleton + a FusionGirl body into blender 3. Should work, but can't test it myself. ZeX-FG_BlenderImport.blend 8.14 MB · 0 downloads Sweet, thanks ill test it, did you import the nif or the skeleton.hkx? Edit: Totally worked as far as I can tell all the bones are there. woot! I have been importing Atomic Male into blender fine with pynifly, but I was assuming there was missing bones I should check, maybe with Zex we're getting all the bones. ☺️ Edited May 10, 2022 by infiniteone
infiniteone Posted May 10, 2022 Posted May 10, 2022 (edited) Well, looking at the atomic male bodies Ive been working on, the bones seem strange, they're all mixed up in one level under scene root, and I dont see camera or the other extra bones there. I have been testing my body modifications and they work fine, editing the tri files of the body as well, but I do run thru bodyslide afterwards, so perhaps thats fixing the bone structure for me as it looks whacky in blender on the pynify imports. You must have imported the skeleton.hkx somehow? Or does that fusion girl mod just include all the bones in their nif? Edit: Coffee is just kicking in lmao... I was able to import the Zex skeleton.nif and have all the bones ? It did import with everything, but I still had the same issue of bones hierarchy flattened & unconnected, but I see your import did, turns out I was using an ancient version of pynifly oooooooooffff... ? Edit:Thanks so much for the nudge! Now I have the full skel and also can repair my custom atomic male build with proper bones lol. Edited May 10, 2022 by infiniteone
Vader666 Posted May 10, 2022 Posted May 10, 2022 14 minutes ago, infiniteone said: You must have imported the skeleton.hkx somehow? Just imported the FG body and the ZeX skeleton.nif on top. The FG body does include some more bones scince its skinned to the ZeX skeleton, but not everything. There might still be issues with camera positions and ingame foot ik, tho i can't remember wether they used an actual footIk bone for the ingame Ik target or just used the normal foot bones for that. Taking a look into rigmap.txt or skeleton.hkx should solve that riddle however. 2
infiniteone Posted May 10, 2022 Posted May 10, 2022 (edited) 10 hours ago, Vader666 said: Just imported the FG body and the ZeX skeleton.nif on top. The FG body does include some more bones scince its skinned to the ZeX skeleton, but not everything. There might still be issues with camera positions and ingame foot ik, tho i can't remember wether they used an actual footIk bone for the ingame Ik target or just used the normal foot bones for that. Taking a look into rigmap.txt or skeleton.hkx should solve that riddle however. I did the same only did the skeleton first, in blender if you then have that rig selected in the outliner when you import the body nif it will parent it to the existing rig and bones, so you dont get numbered renames of the bones with two rigs loaded. I will look at some tutorials for the 3ds methods, perhaps viewing their rig we can approximate what they found was the best setup for fo4. Edited May 10, 2022 by infiniteone
infiniteone Posted May 10, 2022 Posted May 10, 2022 I found this script for exporting from .max file in 3ds to blender usable, im not sure how well it works, might need to run in blender 2.7 for the initial import, but its script says it can export most of the max data to blender. https://archive.blender.org/wiki/index.php/Extensions:2.6/Py/Scripts/Import-Export/3DS_MAX_Scene_Interchange/
Ulfberto Posted May 11, 2022 Posted May 11, 2022 14 hours ago, infiniteone said: Well, looking at the atomic male bodies Ive been working on, the bones seem strange, they're all mixed up in one level under scene root, and I dont see camera or the other extra bones there. I have been testing my body modifications and they work fine, editing the tri files of the body as well, but I do run thru bodyslide afterwards, so perhaps thats fixing the bone structure for me as it looks whacky in blender on the pynify imports. You must have imported the skeleton.hkx somehow? Or does that fusion girl mod just include all the bones in their nif? Edit: Coffee is just kicking in lmao... I was able to import the Zex skeleton.nif and have all the bones ? It did import with everything, but I still had the same issue of bones hierarchy flattened & unconnected, but I see your import did, turns out I was using an ancient version of pynifly oooooooooffff... ? Edit:Thanks so much for the nudge! Now I have the full skel and also can repair my custom atomic male build with proper bones lol. what's broken exactly if i may ask? I imported the nif with the plugin as well and it seems all bones are there. Penis bones included. 1
dagobaking Posted May 11, 2022 Posted May 11, 2022 (edited) On 5/10/2022 at 2:43 AM, Vader666 said: Just imported the ZeX skeleton + a FusionGirl body into blender 3. Should work, but can't test it myself. ZeX-FG_BlenderImport.blend 8.14 MB · 1 download Thank you. This looks the same as when I imported zex nif with pynifly. Unless I did something wrong it appears to be missing the same bones (WeaponExtra1, etc.) Also has those extra bones that aren't needed for animation (rear skin, twist, characterbumper, etc). Not that it would be difficult to just delete those. When you go to publish animations with this it gives errors due to the missing bones (may still work minus positioning where weapons should be etc). pynifly also breaks the bones names (moves leading R and L to end of names) unless you uncheck autorename on import. 13 hours ago, Ulfberto said: what's broken exactly if i may ask? I imported the nif with the plugin as well and it seems all bones are there. Penis bones included. It looks like it at first glance. But, you will see what is missing when you go to publish animations. (or look at the rig txt that comes with the 3DS zex rigs as vader suggests) Edited May 11, 2022 by dagobaking 1
dagobaking Posted May 11, 2022 Posted May 11, 2022 (edited) 17 hours ago, infiniteone said: I will look at some tutorials for the 3ds methods, perhaps viewing their rig we can approximate what they found was the best setup for fo4. I think what you suggested before would probably work. Fallout 4 Zex Rig for 3DS -> FBX -> Blender -> <Clean Up and Re-Do Controls> Though, my experience going from 3DS->FBX->Blender never quite worked. I've heard that it's finicky and settings need to be just right. Haven't had time to test much yet. Another thing I've noticed is that Leito's 3DS rig for Zex includes BOTH all nif bones and the extra hkx ones. After testing, it seems like a lot of those extra bones can just be removed, making the setup easier to understand/use. But, maybe I'm missing something? Like do the animateable bones somehow influence the skin bones which then manipulate the mesh in special ways? Edited May 11, 2022 by dagobaking 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now