Wrinkle maps

From Valve Developer Community
Revision as of 21:34, 14 June 2013 by Cra0kalo (talk | contribs)
Jump to navigation Jump to search
Coach's wrinklemap from Left4Dead2.

WrinkleMaps are texture maps that accompany wrinkles in low polygon models for games. Since there is a limit to the amount of polygons a model can be for game engines artists bake out these so called wrinklemaps from the high polygon meshes and utilize them in the engine to produce the same render as if it was a high polygon model. This same concept is also done with normalmaps and is very useful in game engines. Source has no documentation of wrinklemaps so I have decided to write this article to help other people understand the concept and learn how to go about producing them for Source.

Note.pngNote:WrinkleMaps can only work with models that get compiled from .dmx files.
Note.pngNote:Need to wait for the Character Creation toolkit for Maya


The WrinkleMap diference

Here is a picture showing the difference of utilizing this feature.

Wrinklemaps src small.png

As you can see in the left picture the creases on his left cheek and forehead as apposed to the one without wrinkles.

Textures

Wrinklemaps in Source work with two different textures you can examples inside the Left 4 Dead files located at L4D root/materials/models/survivors/coach/

Diffuse on.png
Normal on.png


Using WrinkleMaps

Example VMT Syntax

The following example is taken from one of the characters that will be shown in AlleyProject

"vertexlitgeneric"
{
	"$compress" "models/cra0kalo/kovic/Kovic_compress"
	"$stretch" "models/cra0kalo/kovic/Kovic_stretch"
	"$bumpcompress" "models/cra0kalo/kovic/Kovic_normal_compress"
	"$bumpstretch" "models/cra0kalo/kovic/Kovic_normal_stretch"
}

VMT Parameters

The following is a list of VMT parameters that are needed to enable the WrinkleMaps:

$compress "path/to/vtf" -Compression wrinklemap diffuse
$stretch "path/to/vtf" -Expansion wrinklemap diffuse
$bumpcompress "path/to/vtf" -Compression wrinklemap normal
$bumpstretch "path/to/vtf" -Expansion wrinklemap normal

Other VMT Params

	// ------------------------------------
	// Displacement Maps
	// ------------------------------------	
// Displacement map
	"$displacementmap" "models/cra0kalo/basetexture"		
	
// Displacement map contains wrinkle displacements
	"$displacementwrinkle"	"0"	//boolean


References