The Diablo 4 Texture Extractor is a tool that extracts and converts .tex files to PNG, WebP, or JPG formats. It can also slice the files into separate image files when applicable.
- Some of the intermediate DDS files might not be valid, which can cause texconv to fail.
- Clone this repository by following the instructions in the GitHub documentation.
- Download the latest
CASCConsole.zip
from https://github.com/WoW-Tools/CASCExplorer/releases. - Extract the contents of the
CASCConsole.zip
into theCASCConsole
folder underd4-texture-extractor
folder.CASCConsole.exe
and the other files from the zip file should be in the same folder withextract_cascconsole.exe_and_other_files_here
- Run
npm install
ind4-texture-extractor
folder. You should have at least latest LTS version of NodeJS installed.
Usage: node ./index.js [options]
All options are optional
Options:
-e, --extract Automatically extract game files before processing (this will delete previously extracted files)
-g, --gameFolder <path> Path to Diablo IV folder, for example "C:\Program Files (x86)\Diablo IV\"
-c, --concurrency <number> number of concurrent tasks
-o, --outputformat <format> png, jpg or webp
-p, --outputpath <path> Full or relative path to output folder, default is './{outputformat}'
-f, --filter <wildcard> Wildcard to filter files to process, for example '2DUI*', no need to include .json extension, default is '*'
-nc, --nocrop Do not crop images to the size of the texture, useful for map textures
-ns, --noslice Do not slice the images, useful for map textures
-nsf, --noslicefolders Do not use slice folders, instead save slicers to the output folder, prefixed with the file name
-h, --help display help for command
You can find the full list of texture file names here
Example 1: Extract and convert all texture files starting with 2D into webp folder in webp format.
node .\index.js -f 2D* -c 10 -o webp -g "C:\Program Files (x86)\Diablo IV" -e
Example 2: Convert previously extracted files starting with zmap in webp format without cropping and slicing.
node .\index.js -f zmap* -c 10 -o webp -nc -ns
- Nishimura-Katsuo for d4data and all the guidance.
- WowTools Team for the beautiful CASCExplorer.
- chuanhsing of Diablo 4 Database for being a early tester and valuable feedback.
- InterCeptor for providing all the texture formats.
- daemon1 for inspiring work on Rawtex tool.
- Tspoon from Map Genie for helping me to start this.
- DevLeon from Diablo 4 Map for his crazy bash scripts.
And finally to ChatGPT for doing half of the work for me. :)