[Guide] Materials 101

Lacry

L6: Sharp Member
Feb 25, 2019
341
256
This is a super short guide about materials I made for myself and I felt like sharing it here. Most of this has been taken from VDC, so go there for more information. Keep in mind this is super short, so I won’t go in detail about the stuff I mention.

Also in this guide I will not teach you how to create cool textures images, that’s something you have to do yourself (sorry).

Getting started​

To create a material we need a little software called VTFEdit, which allows us to create textures (vtf) and materials (vmt).
If what you are trying to do is an edit of an official texture, you probably should use VTFEdit Reloaded, which exports textures correctly, but for some reason it doesn't import textures properly (at least to me), so in a nutshell:
VTFEdit Reloaded -> Extract textures
VTFEdit -> Import textures

Creating a Texture (VTF)​

First we have to create our texture, so we open VTFEdit, and we Import the image we want to use, this will open a box with some options. The most important thing here is the General options, we have to select different formats depending of what we want, here are the most useful ones:

TypeUseNotes
DXT1Most TexturesCompressed, no alpha
DXT5OverlaysCompressed, with alpha
BGR888SkyboxesUncompressed, no alpha
ABGR8888High Quality Overlays(?)Uncompressed, with alpha

Now we have our texture done, but we can still change a few things using the flags (down left corner). Since there is a lot of them I’ll just list the most useful ones:

TypeNotes
Clamp SPrevents horizontal texture wrapping
Clamp TPrevents vertical texture wrapping
SRGBUses sRGB color space
No MipmapLoad largest mipmap only
No Level Of DetailNot affected by texture resolution settings
Eight Bit AlphaUses alpha (this checks automatically when we choose a format with alpha)

Once we have set everything as we want, we can save the file and place it in the right direction:
tf/custom/”Any name you want”/materials/ ”Any name you want”

This is very important because later in the vmt we have to specify the exact location of the vtf.

Creating a Material (VMT)​

Now we have to create the material. so in VTFEdit we go to File > New, and that creates us a text file.
A vmt file is made of 2 parts; the header and the body (using html slang).

The header sets what type of material you are creating. These are the most used ones:

TypeUse
LightmappedGenericBrushes
WorldVertexTransitionBlend Brushes
VertexLitGenericModels
SkySkyboxes
UnlitGenericUI

The body contains the parameters of the material. Since there is a lot (and is not easy to understand) I’ll simplify the most useful ones:

Type
$basetextureShows the texture (basically the most important one)
$surfacepropIt sets what kind of surface is (wood, metal, ...)
$bumpmapIt provides lighting information to the material (basically a normal map)
$phongIt basically provides reflections
$rimlightIt adds a constant rim light (only works for models)
$translucentIt specifies that the material should be partially see-through (mostly used for stuff like windows)
$decalPrevents decal texture clipping
$vertexcolor
$vertexalpha
Basically used for transparent overlays
$nocullIt disables backface culling, meaning you can see the material from both sides (mostly used for stuff like pennants)
$ignorezIt shows things in front of everything else (basically for UI)
%keywordsIt filters materials in the browser, making easier to find them
%tooltextureSets a custom icon for the material in the browser (basically for blend materials)
%notooltextureHides the material in the browser (basically for skybox materials)

Keep in mind that many of these parameters require more parameters, this is just a small introduction after all.

Conclusion​

I hope this super quick guide was helpful. I’ll also leave a text file attached with the default parameters you need for any type of texture you wanna do.

Also if you have any suggestions on how to improve this guide, please let me know!
 

Attachments

  • Materials Settings.txt
    2.2 KB · Views: 28