$subd: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
($SubD is a QC command for Source FilmMaker allowing tessellation/subdivision.)
 
m (Image thumbnail sizes.)
Line 1: Line 1:
[[File:SubD_Sphere_Low.jpg|thumb|An example of a low-poly sphere.]]
[[File:SubD_Sphere_Low.jpg|thumb|right|200px|An example of a low-poly sphere.]]


[[File:SubD_Sphere_High.jpg|thumb|Same model, utilizing '''<code>$subd</code>''' and <code>mat_tessellationlevel 16</code>. Click the image to expand it.]]
[[File:SubD_Sphere_High.jpg|thumb|right|200px|Same model, utilizing '''<code>$subd</code>''' and <code>mat_tessellationlevel 16</code>.<br>Click the image to expand it.]]


The [[QC command]] '''<code>$subd</code>''' is used to mark a model to be tessellated in run-time. This can be used to make models appear smoother than they actually are.
The [[QC command]] '''<code>$subd</code>''' is used to mark a model to be tessellated in run-time. This can be used to make models appear smoother than they actually are.

Revision as of 05:21, 25 October 2015

An example of a low-poly sphere.
Same model, utilizing $subd and mat_tessellationlevel 16.
Click the image to expand it.

The QC command $subd is used to mark a model to be tessellated in run-time. This can be used to make models appear smoother than they actually are.

Tip.pngTip:The smoothness can be adjusted using the console variable mat_tessellationlevel <1-16>.
Confirm:Only works with Source Filmmaker?
Warning.pngWarning:Studiomdl will crash if any triangles are present in the model. $subd only works with quads and n-gons with more than 3 edges. This effectively makes the SMD format unusable, meaning you have to use the DMX format, as SMD only supports triangles. The SMD format can still be used for animations, though.

Syntax

$subd

Example

$modelname		"example/subdivison.mdl"
$cdmaterials		"example/subdivision"
$subd
$body		test	"subdivison.dmx"
$sequence	idle	"subdivision_idle.smd"