Killing Floor

Killing Floor

Not enough ratings
Tutorial: Creating Zeds Reskins
By N7n and 1 collaborators
Steam has some decent guides covering the topic, yet there is still not enough information on certain aspects of ZEDs reskinning in Killing Floor. This guide is intended to cover working with ZEDs textures using GIMP.
   
Award
Favorite
Favorited
Unfavorite
Foreword
Although Steam has some decent guides covering the topic, there is still a shortage of information when it comes to certain narrow aspects of texture manipulation in Killing Floor.

There is a nice tutorial on character reskins, however it's not fully applicable to ZEDs retexturing because of somewhat different file organization.
Moreover, that tutorial focuses on editing in Photoshop which a) is a paid piece of software and b) has no out of the box support for .dds textures and requires a plugin which adds to the hassle.

This guide is intended to cover working with ZEDs textures using GIMP.
Required Software
  1. Killing Floor SDK (Shipped with Killing Floor).
  2. GIMP[www.gimp.org] as a graphic editor as it's free and supports .dds out of the box.
Source Textures
The ZEDs textures are located in two files in the KillingFloor/Textures folder:
KF_Specimens_Trip_T.utx -- All ZEDs except for Husk KF_Specimens_Trip_T_Two.utx -- Husk

! It's highly recommended that you save a backup copy of the files with the original textures !
Step 1. Exporting Textures
  1. Launch Killing Floor SDK and open Texture Browser:
    By default, the Texture Browser is the first thing you see after launching the SDK. However, if you've closed it / don't have it opened -- use top bar menu:

    View > Show Texture Browser

    Highlighted in red -- the name of the texture package whose contents are currently displayed (each corresponds to a file in KillingFloor/Textures directory).

    Highlighted in blue -- the name of the currently displayed group inside of the selected package.



  2. Open the package with ZEDs textures:

    The packages you will be looking for have names identical to texture source files:
    KF_Specimens_Trip_T -- All ZEDs except for Husk KF_Specimens_Trip_T_Two -- Husk

    As an example, in this guide we will be working on changing Clot, so we're selecting the first one.

    If you want to use some custom package you can load them via texture browser's menu:
    File > Open
    NB: Keep in mind that packages that have the same names as the original packages will be ignored.

    If, after selecting the package, you happen to not see all the textures, this is because a specific group is selected. To view all textures, click on "All".



  3. Find and export the needed texture:

    Although you might see numerous repeated images with seemingly the same contents, the thing that you should pay close attention to -- is the prefix before file's name. The ones you should be looking for are those prefixed with Texture. All other entities like Combiners, Shaders, TexPanners etc. use textures and apply different effects to them (e.g. lighting) thus looking nearly identical.

    Select the desired texture - RMB - Export to File.


Step 2. Changing Textures in GIMP
  1. Open .dds file in the editor:
    Most of the time when you open the texture in GIMP, you'll see it transparent because of the presence of alpha channel in the image.

    To edit the texture, you'll need to decompose the image into RGBA channels, then compose them into RGB. Once you made the changes to the texture, you'll need to decompose the RGB image again and then compose back into RGBA.




    In case your texture is opaque, it will be safe enough to assume that it has no alpha channel, so you can edit it right away and skip all the steps related to composing / decomposing between RGB and RGBA.

  2. Decompose RGBA:
    To decompose the image select in the top menu:
    Colors > Components > Decompose > Color Model: RGBA
    NB: Make sure to check the Decompose to layers box.




    In the new opened tab you will see 4 layers: Red, Green, Blue, Alpha.

  3. Compose into RGB:
    In order to work with the texture, you'll need to compose these layers into RGB:
    Colors > Components > Compose > Color Model: RGB
    NB: Make sure that each channel is linked to the correct layer in the Channel Representation section.



  4. Edit the texture:
    In the automatically created tab, you can see the RGB composed texture, which you can edit as you wish.

    Before Editing:


    After Editing:


  5. Decompose RGB:

    Once your work is complete, you'll need to decompose the texture into RGB channels:
    Colors > Components > Decompose > Color Model: RGB


  6. Restore Alpha Channel:
    Now you need to compose the layers back into RGBA.

    But here goes the tricky part -- the alpha channel. It needs to be added back.
    Alpha channel[en.wikipedia.org] is responsible for opacity. Roughly speaking, it's a greyscaled image, where white represents fully opaque areas and black -- fully transparent.

    Images that don't have alpha channel are implied to have fully white alpha channel and thus to be 100% opaque.

    If your changes are minor, you can use the alpha channel obtained from the RGBA decomposing step (given your decomposed RGBA tab is still open), and you can skip the section below.

    If your changes are significant, you'll need to create your own alpha channel.

    To create the alpha channel, select any of the three available layers (red, green, blue), copy it, and rename it to 'alpha' for convenience.

    NB: Alpha channel can play a decisive role in the look of your final texture, since it affects the ZED's appearance under lighting (fully transparent parts are unlit whereas fully opaque are glossy).

    Fully white alpha channels can lead to funny consequences - here's a BRIGHT example of a BRIGHT alpha channel.

    It's all up to your taste at this point, but the general principle is to minimize brightness and, optionally, increase contrast.
    You can achieve this using any of the three tools: Brightness / Contrast, Levels, Curves, but if you're a beginner, we would recommend the Brightness / Contrast tool (All tools are in the Colors section).

    As an example, the blue layer was copied and renamed to alpha.


    Initial look of the alpha layer (pretty bright):


    Adjusting the brightness and contrast:


  7. Compose into RGBA:
    Now, compose the texture back into RGBA:
    Colors > Components > Compose > Color Model: RGBA
    Once again, pay attention to links between RGBA channels and their respected layers, especially focus on the alpha channel.


    This is how your result should look like:


  8. Export edited texture as .dds file:
    Export texture as DDS with DXT5 Compression (The exact format of the texture can be found in the Properties of the specific texture in the SDK).

Step 3. Importing Edited Textures
Go back to Killing Floor SDK and select the package you loaded the texture from.

The simplest way to replace the texture is by importing it with the original name, as you typically don't want to manually deal with shaders and combiners that depend on texture:
File > Import > Select your .dds file
In the import window, in order to replace the source texture correctly (rather than accidentally create a new one), make sure that:
  1. Package name corresponds to the package your source texture is from (KF_Specimens_Trip_T or KF_Specimens_Trip_T_Two).
  2. Group name corresponds to the group where your source texture is located (unless you are editing some custom pack it must be empty).
  3. Name is identical to source texture's name.


Visually verify that the texture has changed and save the package:
File > Save
NB: Note that you may see a window regarding changes in file size. If the sizes of the original and modified packages differ way too much, it might be the case that some texture may have been deleted occasionally. If this happens, restart the SDK and try again.
Final Steps
  1. Testing Edited Textures:
    You may want to test your modified ZEDs without restarting the game each time you make a change. If this is the case and if it's one of the default packages that you modified -- you can see how textures are applied in the Animations Browser (Animations tab).

    Just select one of the ZEDs animation packages (KF_Freaks_Trip, KF_Freaks2_Trip) and choose a Mesh:



  2. Making Textures Work Online:
    After you modified the original texture packs you will definitely encounter a "Package version mismatch" error when connecting to online servers. There is a great guide which explains how to enable your custom textures to work online.
Conclusion
This guide is intended for educational purposes only and is created due to the lack of comprehensive articles on this topic.
If you face any problems, feel free to reach out in the comments or via direct messages to the authors. We're always happy to help!