Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

epinter

Uploaded by

epinter

Virus scan

Safe to use

Tags for this mod

About this mod

A SSEEdit script to export textures usage and data. You will know what textures are missing for your meshes, metadata from existant textures, their usage and where they are installed.

Requirements
Permissions and credits
Changelogs
A SSEEdit script to export textures usage and data. You will know what textures are missing for your meshes, metadata from existant textures, their usage and where they are installed.


How to use
On SSEEdit, right click on any esp and select "Apply script", then select the script "Export textures usage and data.pas", you see the interface below (after you select 'Apply script', BE SURE TO NOT SAVE when prompted, it's a very common mistake to type something on the script and save it after):



You can process your entire load order, or select a mod directory. If you select your load order, the script will analyze each mesh installed, on Data\ and all .BSAs, then verify if the textures are found in any containers, and tell you where they were found.
If you select a mod directory, the mod meshes will be analyzed and you will know if the meshes inside that directory uses textures that can be found in your game installation or not. For a mod directory, select one that contains textures/ and meshes/ subdirectories.
You will have to wait more than an hour if you have a big load order and select to analyze it. To run the script on a mod directory, it can take one or two minutes on medium sized mods, seconds on smaller ones.
At the end of the processing, you should see an 'Exception Summary', a list of all errors occurred during meshes analysis, like this:

***** Exceptions summary *****
Exception processing mesh: Probably invalid Nif file, NifNumBlocks > 5000. Mesh ignored: meshes\effects\fxtg09nocturnalbirds.nif
******************************

Together with the SSEEdit script, I'm providing Powershell scripts to view and filter the resulting .CSVs files. All scripts have a parameter -csvDirectory, so you can specify where the .CSV files are.
Considering you have PS-Scripts subdirectory inside your SSEEdit directory, the csvs will be searched in the directory of SSEEdit (parent of PS-Scripts), then inside Output directory.

The directory structure would be like this:
Edit Scripts\
PS-Scripts\
Output\
SSEEdit.exe


get-texturesdata.ps1: for TexturesData.csv
get-missingtextures.ps1: for MissingTextures.csv
get-texturesusage.ps1: for TexturesUsage.csv
get-meshesdata.ps1: for MeshesData.csv

Output

Textures data (TexturesData.csv)

This list contains data about textures, the fields are the following:

Texture: texture filename
Format: texture format, textures not compressed will have the name "DDS Uncompressed"
Width: texture width
Height: texture height
Mipmap count: The number of mipmaps the texture have.
AlphaFlag: The alpha flag from 'HEADER\ddspf\dwFlags' or from 'HEADER_DXT10\miscFlags2', depends on texture format.
Container: where the texture was found
OverriddenContainers: other containers the texture was found, that was overridden by the one in the previous field.

Example:
Spoiler:  
Show



Missing Textures (MissingTextures.csv)

This list contains the textures name your meshes are trying to use, but are missing.

Container: Container where the mesh was found
Mesh: filename of the mesh
Texture: the texture defined inside the mesh

Example:
Spoiler:  
Show



Textures Usage (TexturesUsage.csv)

This list contains textures usage information and metadata.

Container: Container where the mesh was found
Mesh: filename of the mesh
MeshTexture: the texture defined inside the mesh
Found: true if the texture was found, false if not
TextureFoundMod: if a mod directory is selected for processing, this field will contain the path of the texture inside the mod directory
TextureFoundInstalled: the container where the texture was found installed
TextureDataFrom: indicates the texture used to show the data for the fields below
Format: texture format, not compressed textures will have the name "DDS Uncompressed"
Width: texture width
Height: texture height
Mipmap count: The number of mipmaps the texture have.
AlphaFlag: The alpha flag from 'HEADER\ddspf\dwFlags' or from 'HEADER_DXT10\miscFlags2', depends on texture format.

Example:
Spoiler:  
Show



Meshes Data (MeshesData.csv)

This list is a convenient way to have a summary of your meshes, it will tell you total number of textures referenced, and how much are missing.

Container: Container where the mesh was found
TextureCount: total number of textures used by the mesh
TextureFound: textures used by the mesh that was found
TextureMiss: textures used by the mesh the was NOT found

Example:
Spoiler:  
Show


Filtering with Powershell

.\PS-Scripts\get-meshesdata.ps1 -csvDirectory .\Output\test | ?{ $_.mesh -notmatch 'caliente'} | fl

.\PS-Scripts\get-texturesusage.ps1 -csvDirectory .\Output\test | ?{ $_.Container -notmatch 'data\\' }

.\PS-Scripts\get-texturesusage.ps1 -csvDirectory .\Output\test | ?{ $_.Container -match 'data\\' -and $_.width -ge 4096 }

.\PS-Scripts\get-texturesusage.ps1 -csvDirectory .\Output\test | ?{ $_.MipMapCount -eq 0 -and ($_.width -ge 4096 -or $_.height -ge 4096) }

.\PS-Scripts\get-missingtextures.ps1 -csvDirectory .\Output\test | ?{ $_.mesh -match '\\architecture\\'} | ft


To list textures with wrong dimensions:

.\PS-Scripts\get-texturesdata.ps1 -csvDirectory .\Output\test | ?{ -not $_._WidthPowerOf2 -or -not $_._HeightPowerOf2 }

.\PS-Scripts\get-texturesusage.ps1 -csvDirectory .\Output\test | ?{ -not $_._WidthPowerOf2 -or -not $_._HeightPowerOf2 }


Credits

SSEEdit team for their amazing work.