Wrinkle maps

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

WrinkleMaps are texture maps that occupancy 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)


Using WrinkleMaps

Example VMT Syntax

The following example is taken from Left 4 Dead from the model material located in L4D root/materials/models/survivors/teenangst/teenangst_eyeball_l.vmt

EyeRefract
{
$Iris "models/survivors/green_iris2" 
$AmbientOcclTexture "models/survivors/survivor_eye_ao" 
$Envmap "Engine/eye-reflection-cubemap-" 
$CorneaTexture "Engine/eye-cornea" 
$EyeballRadius "0.6" 
$AmbientOcclColor "[.4 .4 .4]" Default 0.33, 0.33, 0.33
$Dilation ".5" 
$ParallaxStrength "0.25" 
$CorneaBumpStrength ".5" 
$halflambert 1
$nodecal 1
$ambientocclusion 1

$RaytraceSphere 1 
$SphereTexkillCombo 0 
}

VMT Parameters

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

$AmbientOcclusion "0/1" - Disable/Enable WrinkleMaps. (1 = enabled, 0 = disabled)
Confirm:Does $AmbientOcclusion actually toggle the effect?
$AmbientOcclColor "[.n .n .n]" - Replacing n with a number of the color (RGB format)
$AmbientOcclTexture "path/to/vtf" - Filename of the WrinkleMaps texture to use
Todo: How does $ambientocclusiontexture fit in with all of this?

Source Filmmaker

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

See also