Request: Document process for creating replacement textures or shaders
hemebond opened this issue · comments
I've yet to see a clear example in screenshots or videos, but I'm assuming it is possible to provide replacement textures with PBR information.
If so, could this process (how they should be provided to the game) please be documented somewhere?
for textures i was able to add 2 different ways . 1 would be by adding .tga files in quake-rt\id1\textures . And the 2nd way would be to add to make a ktx2 file and place it in quake-rt\ovrd\mat\maps
Creating custom textures
ovrd/mat
folder contains new textures to use with the new lighting system.
Each texture is compressed and wrapped into .ktx2
format.
Assume that AFLOOR
texture needs to be modified.
-
Setup environment:
- Install CompressonatorCLI
- and append a path to its executable to
$PATH
environment variable (socompressonatorcli.exe
can be called from anywhere)
- and append a path to its executable to
- Install Python3
- Find
CreateKTX2.py
script in theovrd
folder- this tool is a part of RTGL1
- Install CompressonatorCLI
-
Create files:
- create folder
ovrd/matdev
ovrd/matdev/maps/AFLOOR.png
-- albedo map- alpha channel (transparency) is used, if Doom uses transparency for that texture
ovrd/matdev/maps/AFLOOR_rme.png
:- roughness in
R
channel - metallicity in
G
channel - emission in
B
channel, color is controlled by albedo map at the same pixel
- roughness in
ovrd/matdev/maps/AFLOOR_n.png
-- normal map,G
channel is ignored (it's assumed to be always 255)
- create folder
-
Run
CreateKTX2.py
script with Python3- it will pack textures from
ovrd/matdev
toovrd/mat
- it will pack textures from
-
Changes should be visible, when the game reloads textures (usually, on game re-enter)
--
ovrd/texture_custom_info.txt
contains some meta-info for the textures, e.g. if a texture should have a light source to be attached
Hot-reloading
There's a very limited and unstable hot-reloading:
- Create empty
RayTracedGL1.txt
in the same folder asvkQuake.exe
. Writedeveloper
inside. - Now it will check files inside
matdev
folder, if a file has changed it date/time, then it will reload it directly from.png
(ignoring.ktx2
; but while publishing, everything must be in.ktx2
and withoutdeveloper
mode)
Limitations:
- A new
.png
must have the same size as the previous one, otherwise it will crash - Hot-reloading works only for the files that existed on
vkQuake
start. So it's not possible to add new files while runningvkQuake
, need to restart it to see new files