[TUTORIAL] How to make simple texture variants without bloating your map's file size

dabmasterars

L5: Dapper Member
Mar 20, 2023
230
37
As a mapper, you should always try to make the map less repetitive. One way of achieving this is by adding texture variants to spice up the layout. However, multiple texture variants can cause your map's file size to increase by a margin. Let's say you have a 512x512 texture that is ~600 KB. After creating five .vtf texture variants, the overall size fill increase by 3 MB. Doing this with other textures will increase the file size even further, which is not ideal.

However, you can make simple color and darkness variations by using the "color" parameter in your texture's .vmt file.
Copy your .vmt file, rename it and, instead of creating a new texture file for it, simply add the "color" parameter like this:
Code:
$color "[ 1 1 1 ]"
Decreasing the values will decrease the brightness of color channels. (RED/GREEN/BLU)
For example, if you want three variations of a texture with red green and blue colors, you can create a white/gray texture and decrease the brightness of certain channels. Setting the values to [ 0.3 0.3 1 ] will make the texture cyan, [ 0.4 1 0 ] will give you lime, and so on.
Setting the values above 1 is possible, but not recommended.

Here's an actual example: I took an already existing texture made by Valve and decreased it's color values to make it darker. Since every texture variant is only a .vmt file, adding another one would only increase the file size by less than a kilobyte.

texture_variation.jpg


What this method is good for:​

Simple color swaps (your original texture MUST be white/gary)
Textures with multiple brightnesses

What this method is NOT good for:​

More complex variations

Here's my guide! Have fun creating less bloated maps.

- dabmaster "mr optimize" ars