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.
GNU General Public License v3.0
160 stars 14 forks source link

Import NIF does not scale bones on skeletons #76

Open poisenbery opened 2 years ago

poisenbery commented 2 years ago

Scaling applied to bones is not imported.

BadDogSkyrim commented 2 years ago

True. Can you give me a sample nif where there is scaling on bones? I'm curious as to how that's even useful, given that the bones generally have to match the skeletons.

poisenbery commented 2 years ago

I have a lot of CME -> NPC Follower conversions in my collection that I've made over the years. The skeleton_female.nif that I have for the NPC's have scaling on a lot of the bones to do things like adjusting proportions and size of the limbs and body.

My process for importing is as follows: 1.) Import an unaltered CME Skeleton 2.) Import all body parts and clothing onto the base skeleton 3.) Use NiDumpScale (3rd party program) on the NPC skeleton to see which bones have a scale value that does not equal 0 4.) Scale the bones in blender 1 by 1 in pose mode 5.) Apply visual geometry to mesh and apply pose to rest pose, reparent with empty groups 6.) Create a new object and import the NPC Skeleton [if I import with nothing selected, it seems to combine with the other skeleton] 7.) Use a script to automatically match bone positions from the skeleton I first imported onto the NPC skeleton I imported last. 8.) Delete the skeleton I have imported last [it was only needed to match position]. 9.) Apply geometry to all objects, apply pose as rest pose to skeleton, reparent with empty groups. 10.) [Probably my fault in the character creation process] Move the eyes, brows, and mouth to the correct location. [They always appear on the ground with the head in the correct place, not sure why.]

This is the only workflow I have found that allows me to get the exact shape of the NPC as it appears in-game. If I import the body parts with the NPC skeleton instead of an unaltered one, the body parts get positioned in the correct location, but the scaling vaules that you see in nifscope don't seem to appear at all in blender, so it ends up looking very strange.

It's a very specific thing; AFAIK, nobody else does this. Cleo.zip

Here's a skeleton and output from NiDumpScale that shows which bones were scaled

Kalessin42 commented 1 year ago

This can matter with custom bones (e.g. for SMP). For instance, https://www.nexusmods.com/skyrimspecialedition/mods/90194 has bones on the earrings, and they're quite small to fit the earrings. Importing the nif for the earrings into blender results in the bones being the wrong size, and they overlap.

So, as things stand, if I don't want bones to be messed up on any SMP stuff that I'm doing, I can't export any such meshes and then reimport them if I don't want to have to fix the bones every time that I reimport the mesh.