Creating and Using Blended Textures

- By Raeven0
This tutorial was last updated on Jun 24, 2006.

Use of Blended Textures


A blended texture is a special class of VMT file which, instead of representing a single VTF image, serves to blend two VTF images together--such as a transition between rocky gravel and grass.

To use a blended texture properly, it must be applied to a displacement face. Then, the "Paint Alpha" button is used to "paint" on the face. It's essentially the same as "Paint Geometry," except that instead of changing the shape of the displacement, you're changing the way it looks. "Alpha" in this case refers to how much the second VTF is overpowering the first one; full alpha means that only the second is seen, half alpha means both are equally seen, etc. Each pixel has its own alpha value.

Due to problems with Source, displacement alpha (that is, blended textures) has two major drawbacks:
1) the lighting program, RAD, must be run for blended textures to be rendered properly; and
2) it may be necessary to use Hammer's Invert Alpha function, in the displacement editing dialogue, before compiling the map. This is because Source naturally inverts the alpha from what is found in Hammer.

For more information on displacements and the use of blended textures, see this tutorial.

Creation of Blended Textures


A blended texture is only a special VMT that combines two VTFs. You can use any VTFs you like; for information on making your own, see this beginner tutorial.

Navigate to your mod folder (for HL2DM, it's half-life 2 deathmatch\hl2mp; for CS:S, counter-strike source\cstrike; etc.), and create a new folder called materials if it doesn't already exist. Open the folder; you should now be in [game]\[mod]\materials.

(Optional step.) Create a new folder and name it whatever you like. This helps to organize the textures by folder (all the brick textures are inside a folder called brick, for example).

Now, create a new file (in the materials folder, or the folder you created inside materials) named mytexture.vmt. I used raeoverlay.vmt; you can use any name you like. Open the file and write the following into it:

"WorldVertexTransition"
{
     "$BaseTexture" "folder/texture1"
     "$BaseTexture2" "folder/texture2"
}


In the above example, you would need to change folder/texture1 and folder/texture2 to the filenames of the two VTFs you'd like to blend. The $BaseTexture will appear first, and the $BaseTexture2 will be superimposed onto it. Remember: NEVER use backslashes (\) in VMT files, and NEVER include the .vtf when writing texture names in a VMT.

How will this appear in the editor? Well, by default, the $BaseTexture will be used in the texture browser to represent this material. However, if you'd like to declare a different texture to use in the texture browser (this won't affect what you see in-game, of course), write the following before the last curly brace:

     "%ToolTexture" "folder/texture3"

This will force the texture browser to display texture3 instead of the $BaseTexture.

You're all set! That VMT you just made will do the following:

] Tell the editor that it's going to blend two textures together ("WorldVertexTransition" sets this)
] Blend the two given textures ($BaseTexture and $BaseTexture2) when used on a displacement

Still need help? Ask your questions in one of our HELP FORUMS
Post A Comment
Name:
Email: Links Not Allowed In Comments
Comment:
What is the capital of France? Need Help?
Comments
Shawn - Aug 14, 2007
Thanks for the tutorial! Just one quesiton to clairfy do you also need the vmts for texture 1 and 2 in the same folder as the 3rd vmt?
All original content ©2006 EditLife.net. All Rights reserved. All files property of their rightful owners.
Get Firefox! Get Thunderbird! Get Notepad++!