User talk:DavidJCobb/Tutorials/Editing NIFs
< User talk:DavidJCobb
Jump to navigation
Jump to search
Revision as of 16:22, 8 July 2017 by imported>DavidJCobb (→Editing Skyrim hairs)
Editing Skyrim hairs
Use case:
- Vanilla Orc hairs for women are modeled terribly. You'd expect the non-hairline NIF to contain the bulk of the hair and the hairline NIF to just have the parts that need to blend; in practice, both NIFs contain the bulk of the hair, and the hairline NIFs' bulk actually covers the non-hairline meshes. This wouldn't be a problem except that while most of the hairline meshes are therefore opaque, vertex alpha blending is enabled for the whole meshes, and that blending prevents EffectShaders from affecting them. I'm working on a fix to go in my "tweaks" mod, wherein I edit the hairline NIFs and split the meshes.
- Hair tutorials claim that changing the "flags" on the NiAlphaProperty will fix EffectShaders. This is misleading. The "flags" aren't a bitmask; they're actually the entire set of alpha settings. Moreover, it's really only one flag inside of that data that has an effect, and it's the flag to force one-bit alpha with a threshold (as opposed to a smooth blend, which is what the textures are designed for). So no. That's not a fix.
- Test case is female Orc hair 05 since that's what I was using on my character at the time.
Basic process:
- Update the NIFs.
- Import hair NIF into Blender 2.7x and make edits there, since Blender 2.49b is an abomination unto God and its continued existence is a crime against humanity.
- Make a "legacy save" that Blender 2.49b will be able to open.
- Open the legacy file in Blender 2.49b and make minor fixes to prep for export.
- Export as a Fallout 3 NIF, and use NifUtilsSuite to upgrade to a Skyrim NIF.
- Make (numerous!) repairs in NifSkope.
- Update the TRI files.
- ?????
Updating the NIFs:
- Import hair mesh into Blender 2.7x and make edits as needed. Latest NIF scripts can import skinned meshes and preserve weights, but cannot export them (even unmodified).
- If you're working with multiple meshes, parent them to the same armature-object.
- Save two copies of your BLEND file -- the latter with the "legacy" flag ticked, so that Blender 2.49b can load it.
- Legacy save doesn't work properly: the length limit for object names is shorter in Blender 2.49b, and the legacy save doesn't account for this. Blender 2.49b is also a complete idiot when it comes to renaming objects (references to them aren't updated and still look for old names), so no, it's not worth the effort to fix it on that end. Good rule of thumb: before making the legacy save, nothing should have a name longer than 12 characters.
- Open legacy BLEND in Blender 2.49b and make minor fixes:
- Uncheck the "Envelope" flag on the Armature. Blender 2.7x doesn't handle the flag properly: it always sets it when making the legacy save, and the old NIF scripts can't work with that.
- Flip to the Text Editor view and delete the "BoneExNames" data block that was created on import; it's trash and it will break your export.
- Export as a Fallout 3 NIF.
- Use NifUtilsSuite's NifConvert to upgrade the NIF for Skyrim.
- Fix tree (Blender export generates a useless parent node), node flags, textures, etc. in NifSkope
- Rotations on the skeleton head node will likely be wrong
- NiSkinData bone lists will have bad transforms on the head bone; set translation to zero and rotation to the inverse of the skeleton node's rotation
- As with the Blender 2.49b-only process, Fallout 3 bone names are in use. Change them back to SBP_31_HAIR.
- Vertex colors will likely be exported incorrectly (converted to all white). Not sure how to address this at this time.
Updating the TRIs:
- Research pending.
- The Nexus has a TRI importer/exporter, but it's only for the version of Blender that hates you and everything you love.
- The Lascivious Slab has an updated importer/exporter for version 2.63+, but you'll need to make an account there to download it from the forums.
- TODO:
- Get the TRI tools from the Slab and see if they work in Blender 2.7x.
- See what editing a TRI file is even like.
- Document the process here.