Wrinkle maps: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 36: Line 36:
=== VMT Parameters ===
=== VMT Parameters ===
The following is a list of VMT parameters that are needed to enable the WrinkleMaps:
The following is a list of VMT parameters that are needed to enable the WrinkleMaps:
:<code>$AmbientOcclusion "0/1"</code> - Disable/Enable WrinkleMaps. (1 = enabled, 0 = disabled)
:<code>$compress "path/to/vtf"</code> -Compression wrinklemap diffuse
{{confirm|Does <code>$AmbientOcclusion</code> actually toggle the effect?}}
:<code>$stretch "path/to/vtf"</code> -Expansion wrinklemap diffuse
:<code>$AmbientOcclColor "[.n .n .n]"</code> - Replacing n with a number of the color (RGB format)
:<code>$bumpcompress "path/to/vtf"</code> -Compression wrinklemap normal
:<code>$AmbientOcclTexture "path/to/vtf"</code> - Filename of the WrinkleMaps texture to use
:<code>$bumpstretch "path/to/vtf"</code> -Expansion wrinklemap normal
{{TODO|How does <code>$ambientocclusiontexture</code> fit in with all of this?}}


=== Source Filmmaker ===
=== Source Filmmaker ===

Revision as of 21:30, 14 June 2013

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:DMXEDIT.exe will need to be used to author them (found in the SFM SDK)


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

Source Filmmaker

$AmbientOcclusion "0" can be used to toggle SSAO off on a specific model; for example, a prop in a skybox.

References