Difference between revisions of "User talk:DavidJCobb/Tutorials/Editing NIFs"
Jump to navigation
Jump to search
imported>DavidJCobb |
imported>DavidJCobb |
||
Line 38: | Line 38: | ||
** 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 | ** 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. | ** 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), and this is significant in that it will cause you to lose your alpha. I'm not sure how to address this at this time.''' | ** '''Vertex colors will likely be exported incorrectly (converted to all white), and this is significant in that it will cause you to lose your alpha even with a NiAlphaProperty. I'm not sure how to address this at this time.''' | ||
*** It's also worth noting that even Blender 2.7x doesn't really ''support'' vertex alpha. It supports multiple sets of vertex colors, so the newer NIF scripts split the RGBA colors into two RGB sets for Blender (and in Blender 2.7x, these are recombined on export). This means that while editing your meshes, you can see the texture-based alpha but not the equally-important vertex alpha. | *** It's also worth noting that even Blender 2.7x doesn't really ''support'' vertex alpha. It supports multiple sets of vertex colors, so the newer NIF scripts split the RGBA colors into two RGB sets for Blender (and in Blender 2.7x, these are recombined on export). This means that while editing your meshes, you can see the texture-based alpha but not the equally-important vertex alpha. | ||
Revision as of 16:32, 8 July 2017
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, make sure they're all descendants of the same armature-object.
- When you look at the outline panel in Blender, you'll see two entries in the tree that have little person icons. One is the armature-object and the other is its armature-data. Modern Blender clearly differentiates objects from data by showing the former with orange icons and the latter in grey. Old Blender has no visual distinction, because it hates us all.
- If you must duplicate a mesh-object in Blender, then... well, just select that object. If you're unfamiliar with all this crap, your instinct will be to just select everything, but if you just select the meshes and dupe them, the dupes will be created as siblings within the same armature-object.
- Save two copies of your BLEND file for safety's sake. The latter must have the "legacy" flag ticked, so that Blender 2.49b can load it; that is the file we'll be working with from here on out.
- 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 the new NIF scripts created on import; it's incorrectly computed, and therefore it's trash that will break your export.
- Export as a Fallout 3 NIF with these settings.
- Scale Correction: 1.0 [defaults to 10, which we don't want; we already had the right scale on import]
- Export Geometry Only.
- Flatten Skin.
- Export Skin Partition.
- 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), and this is significant in that it will cause you to lose your alpha even with a NiAlphaProperty. I'm not sure how to address this at this time.
- It's also worth noting that even Blender 2.7x doesn't really support vertex alpha. It supports multiple sets of vertex colors, so the newer NIF scripts split the RGBA colors into two RGB sets for Blender (and in Blender 2.7x, these are recombined on export). This means that while editing your meshes, you can see the texture-based alpha but not the equally-important vertex alpha.
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.