$seamless scale: Difference between revisions
(Fixed some lines) |
TomEdwards (talk | contribs) (good effort...cleaned!) |
||
Line 1: | Line 1: | ||
<code>$seamless_scale</code> is a | <code>$seamless_scale</code> is a [[material]] command supported by [[LightmappedGeneric]] and [[WorldVertexTransition]] in the [[Orange Box]]. It was created to sidestep texture stretching issues on [[displacement]] surfaces. | ||
== Basic syntax == | == Basic syntax == | ||
$seamless_scale <float> | |||
LightMappedGeneric | |||
{ | { | ||
[[$basetexture]] Example\Example01 | |||
[[$surfaceprop]] concrete | |||
'''$seamless_scale 0.005''' | |||
} | } | ||
== | == Caveats == | ||
* You can no longer scale the material with the [[Hammer Face Edit Dialog]]. The parameter's value must instead changed in the material itself. | |||
* Hammer's 3D view doesn't handle the material correctly. | |||
* [[$bumpmap|Standard normal mapping]] isn't supported, [[$ssbump|only its self-shadowing cousin]]. | |||
* <code>[[$detail]]</code> textures are unsupported. | |||
== History == | == History == | ||
According to | According to [[Episode Two]]'s developer commentary, this feature was added in response to difficulties experienced with the creation of the [[antlion]] caves section. The complicated topography of the areas exaggerated a previously bearable material-stretching effect. | ||
This effect is a result of how Source usually handles [[displacements]]: a [[UV map]] is locked to the vertices of a displacement surface, and when a vertex on it is translated the polygons linking it to its neighbours stretch or contract accordingly, carrying the texture with them. This can lead to polygons with squashed textures sitting beside others with stretched and blurred ones; an unpleasant effect. | |||
<code>$seamless_scale</code> separates the material's coordinate system from the vertices of the displacement, allowing it to maintain a regular scale across an entire surface without any designer effort. | |||
[[Category:List of Shader Parameters| | [[Category:List of Shader Parameters|S]] | ||
[[Category:VMT Texture Reference]] | [[Category:VMT Texture Reference]] |
Revision as of 07:43, 17 September 2008
$seamless_scale
is a material command supported by LightmappedGeneric and WorldVertexTransition in the Orange Box. It was created to sidestep texture stretching issues on displacement surfaces.
Basic syntax
$seamless_scale <float>
LightMappedGeneric { $basetexture Example\Example01 $surfaceprop concrete $seamless_scale 0.005 }
Caveats
- You can no longer scale the material with the Hammer Face Edit Dialog. The parameter's value must instead changed in the material itself.
- Hammer's 3D view doesn't handle the material correctly.
- Standard normal mapping isn't supported, only its self-shadowing cousin.
$detail
textures are unsupported.
History
According to Episode Two's developer commentary, this feature was added in response to difficulties experienced with the creation of the antlion caves section. The complicated topography of the areas exaggerated a previously bearable material-stretching effect.
This effect is a result of how Source usually handles displacements: a UV map is locked to the vertices of a displacement surface, and when a vertex on it is translated the polygons linking it to its neighbours stretch or contract accordingly, carrying the texture with them. This can lead to polygons with squashed textures sitting beside others with stretched and blurred ones; an unpleasant effect.
$seamless_scale
separates the material's coordinate system from the vertices of the displacement, allowing it to maintain a regular scale across an entire surface without any designer effort.