Skip to content

Tool to batch .nif files, to apply glossiness and specular strength value to body parts (Head, body, hand, feet)

Notifications You must be signed in to change notification settings

Hyperen0r/HTool_NifBatchTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTool - NifBatchTools

Tool to batch .nif files, to apply glossiness and specular strength value to body parts (Head, body, hand, feet)

WARNING : The tool is in BETA, I strongly advise you to use this tool only on generated meshes from Bodyslide !

Description

Overview

This tool will scan specified folder to find relevant .nif files, in order to modify the glossiness and specular strength of the body parts. To do so, the tool is looking in the .nif file, a block whose name is matching one of the provided keywords, so that only body parts are affected.

Verified on Skyrim Legendary Edition and with UUNP meshes. It may works with Special Edition and CBBE bodies, but you may have to adjust the keywords, so that the meshes are not ignored

Installation

Requirements

Not a hard requirement, but if Nifskope is installed and set as the default program to open .nif files, you will be able to open files from the tool, by double-clicking on an item from a list view.

Note : I'm using PyInstaller to bundle the program into an executable :

  • One big .exe file
  • A directory containing an .exe, but also dependencies Two options are possibleFlagged as a threat by 4 out of 70 engines. So I also provide an archive

I provide the two options because, when using VirusTotal, the one big .exe file is flagged by 4 engines out of 70, while the archive is not. You can also launch the tool from source, if you prefer.

From executable (one file)

Run HTool-NifBatchTools.exe anywhere.

From archive (directory with executable and dependencies)

Extract anywhere and run HTool-NifBatchTools.exe

From source

If you do not want to use the provided executable, you can launch the tool from the source code, available on GitHub. See section Tools/Libraries used.

How to use

  1. Scan folders where .nif files are located. Preferably, the one where the meshes generated by bodyslide are generated. Scan as many folders as you want. Press "Del", to delete unwanted items.

  2. Set desired glossiness and specular strength

  3. Click on "Apply" and wait. The process is sadly quite slow. On my system it takes approximatively 13 minutes to patch 100 meshes.

Also, the gui will be mostly unresponsive (moving, resizing the window is near impossible). If the completion pourcentage has not changed for a very long time, the application may have crashed. To report an issue, please include the log file, situated alongside the executable.

If NifSkope is installed and set as the default program to open .nif files, double-clicking on an item of a list view will open it, in NifSkope.

F.A.Q

  • What are the default keywords ?

UUNP, FemaleHead, Hands, Feet, CL0, CL1

  • How can I add keywords ?
  1. Open htool.ini (located alongside the .exe. If not, run the tool once to generate the default one).
  2. Add your entry to the list of keywords, e.g: keywords= keyword1, your_keyword, ...
  • How can I set the default value for glossiness and specular strength ?
  1. Open htool.ini (located alongside the .exe. If not, run the tool once to generate the default one).
  2. Find those lines and modify accordingly :
glossiness = 500.0
specularstrength = 5.0
  • My meshes are ignored/grey/red/not processed

The goal of this tool is to affect only body parts. So by using keywords, only the block matching one of the keyword will see his glossiness and specular strength modified. If you need a block to be processed, add his name to the keywords (provided by the .ini file situated alongside the executable. If not, run the tool once to generate the default one). To find the name, you need to open the mesh with NifSkope. You are looking for a block of type NiTriShape (1) that, when selected, highlight the vertices of a body part (2). The name is situated on the same line in the second column (4). See image below : How to find the name of a block, using NifSkope

Tools/Libraries used

Command used to bundle program as onefile :

pyinstaller --windowed --name="HTool-NifBatchTools" --onefile --add-binary="venv/Lib/site-packages/pyffi/;./pyffi/" --add-data="README.md;." src/HTool.py

Command used to bundle program as a directory :

pyinstaller --windowed --name="HTool-NifBatchTools" --add-binary="venv/Lib/site-packages/pyffi/;./pyffi/" --add-data="README.md;." src/HTool.py

Known problems

  • Applying patch is very slow

Sadly the read and write operation of the plugin used to manipulate .nif files are very slow (almost 100% of the compute time)

About

Tool to batch .nif files, to apply glossiness and specular strength value to body parts (Head, body, hand, feet)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages