Textures: Importing, editing, exporting
How to edit images and preserve transparency
Rache Bartmoss once said: the first step to importing a texture is exporting a texture.
For documentation on the Wolvenkit Import/Export tool, see here.
Exporting a texture
Add the texture you want to overwrite to your Wolvenkit project.
If necessary, move and rename it. You should stick to the game's naming convention.
Find the Export Tool (Tools -> Export Tool) and export the texture.
You can now find a png file in your project's
raw
folder.
Editing a texture
Editing textures is straightforward: just change them in your image editor of choice. The only hitch for reimport is the transparency.
Wolvenkit supports the .dds file format, but since that is more complex, we won't talk about it here and stick to the .png
format.
If you're using .dds files, you probably know what you're doing anyway :)
Paint.NET
Paint.NET is a free image editing software for Windows. It supports PNG transparency out-of-the-box.
Adobe Photoshop
To export with transparency in Photoshop, you need an alpha channel. Fortunately, creating one is simple. (For the initiated: The alpha channel is just a layer mask over the entire image.)
Find the Channels palette at the bottom right of your Workspace and add a new channel:
Your image will turn black now, because the selected alpha channel will not have transparency yet.
To get your image back, select "RGB" on the Channels palette — but we'll stay on the Alpha channel for now.
In the layers palette, use your image as selection by ctrl+clicking on the layer's icon:
With the alpha channel selected, fill your selection with white to mark the transparent parts.
The fastest way to do that is to press d, x, delete
You can now save your image as a PNG with transparency. If you have exported a texture in the first section, you should overwrite that file.
Importing a texture
Find the Import Tool (Tools -> Import Tool) and select your texture.
If you have stuck to the game's naming convention, Wolvenkit will select the right preset for you. Otherwise, you need to select the right preset:
TexG_Generic_Color
for a diffuse/albedoTexG_Generic_Normal
for a normal mapTexG_Generic_UI
for anything that you want to use in .inkatlas files… etc
If your texture is upside-down, uncheck the box for
VFlip
.Click the "import" button. Your
.png
will now be imported Into the.xbm
file.
Troubleshooting
My texture shows up completely black or completely white
Change Compression
to TCM_None
, then reimport
"Must have dimensions in powers of 2"
Your texture must be a square, and its size must be a power of two (512x512, 1024x1024, and so on). If you want to know more about the theory behind this, you can read this external tutorial. Otherwise: just make it a square!
All images must be the same size
If you are importing a .masklist
, all images for the resulting .mlmask
must be the same size. Cyberpunk will crash otherwise.
Invalid color space
Some textures need to be in a certain colour space (theory on wikipedia). For certain types of textures, the game requires certain colour spaces. Here's a list:
File type | required colour space |
---|---|
.mlmask / .masklist | Black and White / Non-Color |
If you don't know how to achieve that, google something like
<name of your editor> color space <color space>
e.g. Photoshop color space black and white
Didn't help!
Maybe your .mlmask
has gotten corrupted or is simply incompatible. Replace it with any mlmask from the game files and try a reimport.
Last updated