Custom Portal 2 Textures

From Valve Developer Community
Jump to: navigation, search
Polski Русский


This article will cover a broad overview of how to create custom textures for Portal 2.
See this page for finer details.


Install VTFEdit

VTFEdit is the tool used for creating VTF and VMT files.
In order to create Portal 2 Textures version 1.3.3 or later is required.
It can be downloaded here

Create a texture

Using Photoshop or a similar tool, create a 32-bit TGA image.
Valve uses TGA files because they are a lossless format, while other formats work they may not yield desired results.

Using VTFEdit

Open VTFEdit.
Click on the Import Icon (looks like a new page icon).
Select the texture to import.
A window will pop up with a bunch of settings, make sure to go to the Advanced tab and set the version to 7.5
Once it is imported the texture will show up in the viewport on the right.

Vtf portal2 vtf.JPG

Save it (it will save as a VTF).
An ideal place to save it would be: /portal 2/portal2/materials/yourCustomFolder

Creating the VMT

Using VTFEdit just go to Tools -> Create VMT File.
The VMT file can then be opened and edited right there in VTFEdit if desired.
Here's a sample of what a texture with a bump map, and some detail looks like:

Vmt of portal2.JPG

The keywords part is useful to be able to easily filter custom materials in the Texture Browser.

VMT Tips:

There are many things you can add to the VMT to alter the texture's behaviour:

-> "%noportal" 1 can be added to make the texture deny portals.