Day 2 - Deeper into the boneyard...
The second day of modding was a shorter one because of other irl duties that needed taken care of, but we still got a lot done in terms of exploring custom skeletons and movement! The goal was to mainly fix his knees, palm, and fingers.
The first struggle was learning how to use PyNifly, a nifty and sleek tool for importing and exporting .nifs in Skyrim and FO4. (For context, I am using Blender version 4.2 and the latest version of this plugin!)
BadDogSkyrim/PyNifly: Export/Import tools between Blender and the Nif format, using Bodyslide/Outfit Studio's Nifly layer. Supports Skyrim LE, Skyrim SE, Fallout 4, Fallout New Vegas, Fallout 76, and Fallout 3.
The instructions on the wiki made it seem pretty easy, and I have used this tool in the past for doing small edits to meshes, but I still was left in the dark about how to import and export a skeleton without it turning out wrong. I ran into a couple issues.
The common issue I found myself in was that, when I exported the skeleton, the nif file would turn out blank. Turns out this happened because I selected the "export animations and collisions" options on import, when I should have set this to false. I selected the bounding boxes for collisions alongside the armature that contained the skeleton on export, resulting in an empty file. When I ignored the bounding boxes and only selected the armature, I was able to export the file without it turning empty.
Sometimes, after I would export the skeleton, the bones would be all over the place or not there at all. I solved this problem by ticking and disabling a few settings. On import, I disabled all the settings except the skin to mesh setting, then on export, I disabled all the settings, but ticked "preserve bone hierarchy," which was the golden ticket I needed to finally import a skeleton through blender then export a skeleton through blender without it doing anything wrong!
The last issue was moving the bones, but not seeing the changes in game. You would think that it would be as simple as moving the finger bones where Hazard's finger joints are, right? Unfortunately not. Skyrim's animations will snap the skeleton back into place if you move the vanilla bones. That's why, in spite of moving the bones in Blender, Hazard's body would shrink like a soda can! What you need to do is make a parent to node on the bones you wanna move and scoot that around instead. So you take the skeleton in nifskope, select the bones you would like to move, right click it, add a parent node, then select NiNode. Then you move the NEW bone you had just created in order to move the vanilla bone, not moving the vanilla bone directly.
This here was an instance of me trying to experiment with moving the bones, but I realized that it wasn't working right because the skeleton I was editing and the reference skeleton that was inside Hazard's mesh was different. Hazard's reference skeleton had the actual vanilla bones moved when they weren't supposed to, and the skeleton that was used in the mod esp was moved into position with the parented bones, causing this strange mess...
With all of these issues answered between the hours, I finally came up with a proper workflow for how to handle humanoid skeleton editing for custom models. I described the process I've made with Hazard so far in particular.
Import Hazard's Overwatch model using Overtools (You can get the tool by going to their Discord here.) in Blender, and scale it to the size of Skyrim's skeleton. Don't worry about it being too perfect because we'll be fitting our own skeleton later.
Create a jointmap.cfg that maps each of Hazard's bones to Skyrim's bone naming conventions. (i.e bone_0066=NPC L Thigh [LThgh] or something for a whole group of bones from 0066-006F.) Have outfit studio on the side so you can import the FBX and see what custom bone highlights where. So for instance, if you saw bone_08B3 highlight somewhere on Hazard's nose, you should probably put that bone under the NPC Head [Head] category in the cfg. This is the most time-consuming part, but will save you a lot of headaches of having to weight paint manually, especially if you find yourself in the position where you must reimport the entire fbx again...
After you have a jointmap.cfg that's the way you want it to be (you'll know you're there when, not only is everything mapped, but they're mapped to the proper group without any oddities), the model probably won't be moving correctly at all because the reference skeleton in outfit studio is set to the basic skeleton by default. This is when we make our custom skeleton. Take a skeleton and parent all the nodes you want to move. I had a friend of mine with a skeleton that had most of all the bones I wanted to move parented already, so I didn't have to do too much work here. But it might take a little bit of time.
Import the skeleton into Blender where your model is, and make sure you don't have an armature selected. (Pynifly might do something funky, idk.) Select the armature of the skeleton you just imported, then in pose mode select the parented bone. That's the bone that's going to look like "NPC R Clavicle [RClv]:225". It's going to have a number next to it, move that one! It's very important you make sure you're moving that one, and NONE of the vanilla bones.
When it looks right to you, go into the settings of outfit studio and set that skeleton as your reference skeleton. Create a new outfit with no reference mesh and import your FBX. If you go to the left and turn on the visibility of bones, you should see your bones in the spots you moved them. Pose your mesh around and make sure it moves the way you expect. If not, tweak the movement then repeat this step until it's correct.
Go into your mod esp in creation kit and make sure your custom skeleton is being used instead of the default skeleton. Now with the skeleton on your nif being the same skeleton used in-game, Hazard should be moving the way you expect him to. If not, repeat step 4-6 until he does, as you will have to update the mesh again. (This is why it was useful for us to have that output file made from the fbx renaming machine!)
For now, this was the result of all my hard work. Don't mind the fact he's blue! I just didn't feel like putting his textures on. I still need to do adjustments on his hand, though. But they should be simple tweaks. I also want to make his fingers connected, as for right now, they seem to all be disconnected for some reason. I also want to fix how his chains on his butt look, too.
After the tweaks on his bones, my next plan is either to begin rigging his face, or fixing his textures to look better. I think it would be best to tackle the more demanding task of doing facial animation first to get it out of the way. And besides, I'm getting really tired of looking at Hazard's sleepy, bored expression! Time to liven him up a little!
===========================
Welcome to the chicken scratch section! This is where you'll see the raw notes I write down for modding before I write it in an organized way for the dev blog. I figured the chicken scratch of raw information might help someone, and I just think it's neat, so here you go! You'll know it's the chicken scratch section by the equal sign divide and the🐔 emoji.
In pynifly, I think what I'm supposed to do is import the bones without renaming anything, without importing the animations, and export without renaming things... and things seem to be okay.
parent the bones with empty nodes.
move the bones with the numbers next to them in blender
export the skeleton, preserve the bone heiarchy.
use that same skeleton as a reference skeleton in outfit studio. dont import a reference mesh.
select the fbx that was outputted by the renaming fbx machine
delete the custom bones from the project or it'll crash
edit the skeleton in blender and repeat to tweak