Jump to content

alt3rn1ty
 Share

Recommended Posts

SSE NIF Optimizer by ousnius

at Nexus

https://www.nexusmods.com/skyrimspecialedition/mods/4089/?

 

- a tool to optimize Skyrim NIFs for SSE -

 

Description:


This is a tool for mod authors to optimize old Skyrim meshes into the new SSE format and fix issues with them on the way.

Make sure to create backups of your NIFs beforehand!
Don't run it on your entire meshes folder at once either.


Use the head parts option on ONLY head parts, without exception!
So it's better to temporarily copy/paste all those heads, eyes, hairs to a separate folder for optimization.
Things like helmets are regular meshes, not head parts.


If a NIF is already in the SSE format, the tool optimizes them as well.
Note that SSE-formatted NIF files do NOT work in the old Skyrim any longer.

To view the new NIF format in NifSkope, you will need the very latest version currently found here:
NifSkope releases by jonwd7

Please let me know if there are any problems with a NIF and if possible, provide the files before and after optimization.
If this tool helped you with your mod, it would be cool if you could give it credits, but that's not required of course. :)

For the source code, you can check out the BodySlide and Outfit Studio repository on GitHub instead.
They share the same functionality with the exception of the UI.

 

What it does:

 

  • Optimizes NIFs to the new SSE format (BSTriShape, changes to NiSkinPartition).
  • Optimizes head parts to BSDynamicTriShape (separate checkbox).
  • Triangulates the geometry and skin partitions.
  • Cleans up the NiSkinData (source for vertex weights that are unused in-game).
  • Calculates new bounding spheres for geometry and all of the bones.
  • Adds tangents to all meshes that need them.
  • Removes normals and tangents from all meshes that don't need them, such as body meshes.
  • Removes all-white vertex colors from meshes.
  • Renames all meshes that have the same name, since they need to be unique.
  • Cleans up the header strings.
  • Deletes all blocks that aren't referenced somewhere within the root node tree.
  • All of this results in a hopefully working NIF that's cleaned up and smaller in file size.
  • Works on NIFs that already are in the SSE format as well.

 

Installation:


This can't and doesn't need to be installed with a mod manager, as it is a utility for modders.
Simply download the archive, extract the executable and run it, then follow on-screen instructions.

 

Uninstallation:


There's no uninstallation process, simply delete the executable from your computer.
 

Credits:


jonwd7 - For assistance with the format and general help.

Link to comment
Share on other sites

I dont think ousnius pops in here, so made a topic on this useful tool to keep everyone informed of updates

 

Changelog

Version 2.9.2

- Calculating new geometry bounds for skinned meshes is now optional. 
- Now removes invalid triangles that point to non-existent vertices. 
- Fixed handling for root nodes that aren't at block index 0. 
- Now fixes faulty "Has Vertex Weights" boolean values in NiSkinData. 
- Files with names that have UTF-16 encoded characters can now be loaded and saved.

Version 2.9.1

- Fixed writing of breakable and malleable constraints. Please re-optimize NIFs using "bhkMalleableConstraint" and "bhkBreakableConstraint" in case they cause crashes.

Version 2.9

- Multiple references to the same shape in a node no longer count as duplicates, so they won't be renamed.

Version 2.8

- Further important fixes for files with duplicate shape names. 
- Some more code refactoring.

Version 2.7

- Fixed regression in v2.6 where shapes with duplicate names (not under the same parent) weren't optimized.

Version 2.6

- Now processes terrain and LOD meshes (.btr and .bto files) as well. 
- Added option to remove parallax shader flags and textures from meshes (on by default). 
- Fixed reading NIFs with disabled constraint motors. 
- Fixed renaming of duplicate shapes not being aware of its parent node and siblings. 
- Removed checkbox for unused strings - they are now always removed. 
- Major refactor of the underlying code for handling NIF files.

Version 2.5

- Fix for meshes that have vertex weights disabled in their NiSkinData (some trees, maybe more).

Version 2.4

- Support for particle systems and emitter meshes.

Version 2.3

- Fixed an issue with skin partitions of meshes with flipped triangles.

Version 2.2

- Added support for head parts (head, eyes, mouth, ears, hair). Use the new checkbox FOR HEAD PARTS ONLY! 
- Fixed some partially see-through skinned meshes by using cleaner weights from BSTriShape instead of the NiSkinData. 
- Removed safety check for particle meshes - be careful about those for now.

Version 2.1

- Fixed optimizing meshes that shared the same NiTriShapeData block for some reason. 
- Fixed "removed vertex colors" message logging even if the mesh never had any to begin with. 
- Improved normal smoothing algorithms, there should be less black splotches now when using it. 
- Changed "Max. Degrees" selection range for normal smoothing from 0-100° to 0-180°.

Version 2.0

- The tool now has an actual user interface with a directory picker and progress bar. 
- Created some more options as checkboxes to toggle on/off. 
- Fixed some rare texture paths being trimmed the wrong way and causing purple meshes. 
- Added a "Smooth Normals" feature with a maximum angle in degrees and a toggle for close seams. 
- Tangents didn't always update for skinned meshes.

Version 1.9

- Fixed tangents not being calculated after the last update, sorry for that! 
- Fixed rare occasions of invisible static meshes by not calculating new bounding spheres anymore (bounds in .esm/.esp didn't match NIF).

Version 1.8

- Fixed files with the .NIF extension (instead of .nif) not being detected. 
- Fixed extended ASCII file paths not getting converted correctly.

Version 1.7

- Fixed vertex color flag not being removed properly for BSEffectShaderProperty blocks. 
- Added log message for added tangents and deleted unreferenced blocks.

Version 1.6

- Redone the console input from scratch, you can now choose a mode with sub directories or the working directory only. 
- Removed batch files, as they're not needed anymore. 
- Changed the logging, now with way more information and a better look. 
- Log file is always created now.

Version 1.5

- Unreferenced blocks that aren't under the root node tree are now deleted. 
- Fixed NiTextKeyExtraData strings being swapped out. Can fix crashes and animation sounds. 
- Fixed BSBoneLODExtraData being saved wrongly, mostly used in skeleton NIFs.

Version 1.4

- NIFs that are already in the SSE format are cleaned up now as well. 
- Fixed a crash for rare meshes without UVs. 
- Improved the logging batch file.

Version 1.3

- Fixed the bone indices in the BSTriShape pointing to the wrong bones. This eliminates the spaghetti monsters. They were fun while it lasted. 
- Cleans up the NiSkinData now as well (source for the vertex weights, unused in-game). 
- Now updates bounding spheres of all bones and geometry. 
- Added a batch file that produces a log file of the output. Otherwise acts the same.

Version 1.2

- Fixed skin partitions (invisible meshes, holes in meshes, black screen in NifSkope). 
- Added a batch script to optimize all NIFs found in the current sub directories at once.

Version 1.1

- Fixed meshes being added to the root node twice.

Version 1.0

- Initial release.

Link to comment
Share on other sites

  • 3 months later...

Changelogs

  • Version 3.0.1

    • - Fixed the cubemap check of the texture scanner.
  • Version 3.0.0

    • - Added "Scan Textures" button to scan for compatibility with SSE. 
      - The following warnings currently exist: 
      1.) TGA texture files are not supported. 
      2.) Dimensions must be divisible by 4 (currently <width> x <height>). 
      3.) Uncompressed cubemaps require an alpha channel, use ARGB8 or DXT1/BC1. 
      4.) Several warnings for unsupported uncompressed formats. 
      - Further fixed handling of NIF files without a root node. 
      - Ignore empty vertex weights (factor 0.0) in NiSkinData. 
      - Allow overflowing header string index to prevent losing strings.
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...