Multiple Skins for a Single Model: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 11: Line 11:
}
}
</pre>
</pre>
If the above method does not work (usually if you need more than 2 skins), try this:
<pre>
$body studio "models/test/test.smd"
$texturegroup skinfamilies
{
    { "original.vtf" }
    { "replacement1.vtf" }
    { "replacement2.vtf" }
}
</pre>
'''''Note:''' Translucent models will only cast the shadows of the first skin''
'''''Note:''' Translucent models will only cast the shadows of the first skin''



Revision as of 18:03, 23 February 2006

Stub

This article or section is a stub. You can help by expanding it.

Creating multiple skins under one model requires a $texturegroup definition in the.qc file following the $body.

It must follow the $body definition or else the .qc will simply not compile.

$body studio "models/test/test.smd"
$texturegroup skinfamilies
{
    { "original1.vtf", "original2.vtf", ... }
    { "replace1.vtf",  "replace2.vtf", ...  }
}

If the above method does not work (usually if you need more than 2 skins), try this:

$body studio "models/test/test.smd"
$texturegroup skinfamilies
{
    { "original.vtf" }
    { "replacement1.vtf" }
    { "replacement2.vtf" }
}

Note: Translucent models will only cast the shadows of the first skin

The textures can be named anything as long as you've referenced them correctly in the .qc.

Each material that you apply to a model can have a separate property. So for a character, you'd have a material for their body and then a material for their head, or you could be really fancy and make several clusters, one for each aspect of their make up. So a material for their leather gloves, one for their cloth pants, one for their metal armor, and one for their flesh head. These would all be separate materials with their own separate .vmts and such. However, using multiple materials on the same model creates a significant performance hit, so this should be done sparingly.