$texturegroup: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(cleanup and more info)
Line 1: Line 1:
The [[$texturegroup]] [[QC command]] is used to add alternative skin options to a model.
Creates a set of replacement materials used on a model. It is used to add alternative "skin" options for the model.
* If no $texturegroup is specified, the model's VMT must be the name of the texture which was [[UV map]]ped into the reference.SMD.


* Add the following command directly following the [[$body]] line:
* If no <code>$texturegroup</code> is specified, the model's VMT must be the name of the texture which was [[UV map]]ped onto the reference .SMD.


==QC syntax example==
* The <code>$texturegroup</code> command should follow after the [[$body]] in the .qc.
 
== Basic syntax ==


  [[$texturegroup]] skinfamilies
  [[$texturegroup]] skinfamilies
Line 15: Line 16:
* '''<skin_0>''' is the name of the default [[Material System|Material]] ([[VMT]]) file.
* '''<skin_0>''' is the name of the default [[Material System|Material]] ([[VMT]]) file.
* '''<skin_1>''' is the name of the alternative [[Material System|Material]] ([[VMT]]) file.
* '''<skin_1>''' is the name of the alternative [[Material System|Material]] ([[VMT]]) file.
* add as many skins as you like.
* add as many skins as you like (performance considerations allowing).


{{tip|If all you want to do is have a different texture on each skin, simply clone the ''skin_0.vmt'', rename it ''skin_1.vmt'' and change the [[$basetexture]] reference to the ''new_colormap.vtf''. Make sure the ''skin_1.vmt'' and ''new_colormap.vtf'' files are placed in the appropriate subfolder of the <code>game_dir/materials/models/</code> directory.}}


{{tip|If all you want to do is have a different colormap on each skin, simply clone the ''skin_0.vmt'', rename it ''skin_1.vmt'' and change the [[$basetexture]] reference to the ''new_colormap.vtf''. Make sure the ''skin_1.vmt'' and ''new_colormap.vtf'' files are placed in the appropriate subfolder of the <code>game_dir/materials/models/</code> directory.}}
== Example ==
$texturegroup "rockcliff_cluster01"
{
{ "rockcliff02a" }
{ "rockcliff02b" }
{ "rockcliff02c" }
}


{{tip|Skin options can also be used to provide $bumpmap, $surfaceprop, etc. options for the model. For optimisation, see also [[$lod]] and [[LOD Models]].}}
== Advanced syntax ==
For models with multiple materials, <code>$texturegroup</code> can also be used to specify their replacements by specifying multiple materials per line.


{{tip|Make sure that multiple / alternative VTF textures all follow the same [[UV map]] layout.}}
$texturegroup "YourTextureGroupNameHere"
{
{ "<skin_0_material1" "<skin_0_material2>" }
{ "<skin_1_material1" "<skin_1_material2>" }
}


== Further information ==
* Skin options can also be used to provide <code>$bumpmap</code>, <code>$surfaceprop</code>, 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.


[[Category:QC Commands]]
[[Category:QC Commands|texturegroup]]__NOTOC__

Revision as of 16:21, 28 April 2008

Creates a set of replacement materials used on a model. It is used to add alternative "skin" options for the model.

  • If no $texturegroup is specified, the model's VMT must be the name of the texture which was UV mapped onto the reference .SMD.
  • The $texturegroup command should follow after the $body in the .qc.

Basic syntax

$texturegroup skinfamilies
{
    { "<skin_0>" }
    { "<skin_1>" }
}

Where

  • <skin_0> is the name of the default Material (VMT) file.
  • <skin_1> is the name of the alternative Material (VMT) file.
  • add as many skins as you like (performance considerations allowing).
Tip.pngTip:If all you want to do is have a different texture on each skin, simply clone the skin_0.vmt, rename it skin_1.vmt and change the $basetexture reference to the new_colormap.vtf. Make sure the skin_1.vmt and new_colormap.vtf files are placed in the appropriate subfolder of the game_dir/materials/models/ directory.

Example

$texturegroup "rockcliff_cluster01"
{
	{ "rockcliff02a" }
	{ "rockcliff02b" }
	{ "rockcliff02c" }
}

Advanced syntax

For models with multiple materials, $texturegroup can also be used to specify their replacements by specifying multiple materials per line.

$texturegroup "YourTextureGroupNameHere"
{
	{ "<skin_0_material1" "<skin_0_material2>" }
	{ "<skin_1_material1" "<skin_1_material2>" }
}

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.