$texturegroup
Template:Otherlang2
The $texturegroup
QC command allows a model to have multiple skins consisting of one or more materials.
Alternate skins are typically included in props to give the level designer more variety, but may serve a gameplay purpose depending on the specific use.
Syntax
$texturegroup <name> { { "<default material>" } //Skin 0 (default) { "<new material>" } //Skin 1 [...] }
- name
- The name of the texturegroup.
- default material
- The name of a Material (VMT) on a reference mesh.
- new material
- The name of a Material (VMT) that will replace the material above it.
For models with multiple materials, $texturegroup
accepts multiple materials per line. When used like this, the first skin should be treated as a set of column headings in a table. Only materials present in the first skin can change in any subsequent skins.
$texturegroup <name> { { "<default material 1>" "<default material 2>" [...] } //Skin 0 (default) { "<new material 1>" "<new material 2>" [...] } //Skin 1 [...] }
StudioMDL allows up to 32 unique materials to exist on a model. This limit is hard-coded, but can be raised with a hacked studiomdl.


skin_0.vmt
), give it a unique name (e.g. skin_1.vmt
), and change its $basetexture
to the path of the new texture.
{}
and the material name. {skin_0}
will not work, but { skin_0 }
will. [todo tested in ?]Examples
$texturegroup rockcliff_cluster01 { { rockcliff02a } { rockcliff02b } { rockcliff02c } }
$cdmaterials models\bots\sniper models\effects $texturegroup skinfamilies { { sniper_bot_red sniper_bot_head_red } { sniper_bot_blue sniper_bot_head_blue } { invulnfx_red invulnfx_red } { invulnfx_blue invulnfx_blue } }
$cdmaterials models\player\hvyweapon $texturegroup skinfamilies { { heavy_head_red eyeball_r eyeball_l hvyweapon_red hvyweapon_red_sheen } { heavy_head_blue eyeball_r eyeball_l hvyweapon_blue hvyweapon_blue_sheen } { heavy_head_red_invun eyeball_invun eyeball_invun hvyweapon_red_invun hvyweapon_red_invun } { heavy_head_blue_invun eyeball_invun eyeball_invun hvyweapon_blue_invun hvyweapon_blue_invun } { heavy_head_zombie eyeball_zombie eyeball_zombie heavy_red_zombie_alphatest heavy_red_zombie_alphatest_sheen } { heavy_head_zombie eyeball_zombie eyeball_zombie heavy_blue_zombie_alphatest heavy_blue_zombie_alphatest_sheen } { heavy_head_red_invun eyeball_invun eyeball_invun hvyweapon_red_zombie_invun hvyweapon_red_zombie_invun } { heavy_head_blue_invun eyeball_invun eyeball_invun hvyweapon_blue_zombie_invun hvyweapon_blue_zombie_invun } }
Multiple texture groups
Using more than one $texturegroup
is allowed, but not recommended. The behavior of multiple texture groups is unintuitive at best.


As a result of the above problems, despite what the syntax would imply, using multiple $texturegroup
commands will not actually allow multiple states of a model's skins to be switched between, unlike $bodygroup
.
If a model needs to have multiple texture states, they will have to be done by setting up skins in a fashion similar to this:
$texturegroup skinfamilies { { <state 1> <substate 1> } { <state 1> <substate 2> } { <state 2> <substate 1> } { <state 2> <substate 2> } [...] }
Further information
- Skin options can also be used to provide
$bumpmap
,$surfaceprop
, etc. options for the model in each VMT. For optimization, see also$lod
and LOD Models. - All alternative VTF textures should follow the same UV map layout.
- Even though studiomdl has a hardcoded limit of 32 unique materials, it technically supports up to 1024 total skins, so long as each skin is an arrangement of those 32 materials.
Almost every team-colored model in the game has at least two skins. Typically, the default skin is RED, and the second skin is BLU.