It converts .tex files to png, webp or jpg. Also slices the files into separate image files when applicable.
- Some of the formats like
B8G8R8A8_UNORM
are not supported byRawtexCmd
.
- Clone this repo (https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
- Clone
d4data
from https://github.com/blizzhackers/d4data - Download and extract
RawtexCmd.exe
from https://forum.xentax.com/viewtopic.php?t=16461 - Download
texconv.exe
from https://github.com/microsoft/DirectXTex/releases - Extract texture assets from the game using
CASCExplorer
, you can download it from https://github.com/WoW-Tools/CASCExplorer/releases. After downloading and extracting, you need to add the following line toCASCExplorer.exe.config
file:
<add key="fenris" value="Diablo IV" />
You can find the texture files are in base/payload/Texture
folder.
Alternatively you can download CASCConsole
from the same URL and use the following command line to extract the textures:
Using your local copy of Diablo 4:
CASCConsole -m Pattern -e "Base\payload\Texture\*.tex" -d Texture -l All -p fenris -s "C:\Program Files (x86)\Diablo IV"
Using the CDN version:
CASCConsole -m Pattern -e "Base\payload\Texture\*.tex" -d Texture -l All -p fenris -o
- Set the correct paths by editing
config.js
file. - Run
npm install
in the app folder.
Usage: node ./index.js [options]
Options:
-c, --concurrency <number> number of concurrent tasks
-o, --outputformat <format> png, jpg or webp
-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 slices to the output folder, prefixed with the texture name
-h, --help display help for command
Example:
node .\index.js -f 2DUI* -c 10 -o webp