$treesway: Difference between revisions
Jump to navigation
Jump to search
Note:In
,
, does not require env_wind if
Bug:In
, using a projected texture on materials with this parameter will cause flickering. As a workaround, try to keep trees away from where player flashlights can reach.
IS NEW Puddy (talk | contribs) (a little edit) |
Deprecated (talk | contribs) (Rewritten, added GMOD information from April 2019 update) |
||
Line 1: | Line 1: | ||
[[$treeSway]] is a | <code>[[$treeSway]]</code> is a [[VMT]] command for <code>[[VertexLitGeneric]]</code> available in {{l4ds}}, {{as}}, {{portal2}}, {{csgo}}, {{insurgency}}, {{tf2}} (As of Jungle Inferno), {{bms}} (as of December 2017), {{GMOD}} (as of October 2018) that morphs a material around using the parameters of an <code>[[env_wind]]</code> entity. This is used in {{csgo}} and {{insurgency}} to give the appearance of tree leaves and foilage blowing in the wind. The paramaters of this command determine how much the <code>env_wind</code> entity should affect the morphing. This command assumes any model using it is facing upwards. | ||
{{note|In {{tf2}}, {{GMOD}}, does not require {{ent|env_wind}} if <code>$treeSwayStatic</code> is set to 1.}} | |||
{{ | {{note|This shader is disabled by default in the {{as}} SDK. It can re-enabled by modding.}} | ||
{{bug|In {{GMOD}}, using a [[env_projectedtexture|projected texture]] on materials with this parameter will cause flickering. As a workaround, try to keep trees away from where player flashlights can reach. <code>[[$halflambert]]</code> may also partially fix the issue.}} | |||
{{note|In {{tf2}}, does not require {{ent|env_wind}} if <code>$treeSwayStatic</code> is set to 1.}} | |||
{{bug|In {{GMOD}}, [[env_projectedtexture|projected | |||
==Parameters== | ==Parameters== | ||
Line 34: | Line 28: | ||
$treeSwaySpeedLerpStart "float" //Minimum wind speed in which a gust triggered by env_wind will start affecting the material. | $treeSwaySpeedLerpStart "float" //Minimum wind speed in which a gust triggered by env_wind will start affecting the material. | ||
$treeSwaySpeedLerpEnd "float" //Minimum wind speed in which a gust triggered by env_wind will fully affect the material. | $treeSwaySpeedLerpEnd "float" //Minimum wind speed in which a gust triggered by env_wind will fully affect the material. | ||
$treeSwayStatic "boolean" //Whether or not to instead use a static wind value instead of the values from env_wind. TF2 only. | $treeSwayStatic "boolean" //Whether or not to instead use a static wind value instead of the values from env_wind. TF2 and GMOD (as of April 2019) only. | ||
</pre> | </pre> | ||
[[Category:List of Shader Parameters|T]] | [[Category:List of Shader Parameters|T]] |
Revision as of 16:33, 28 April 2019
$treeSway
is a VMT command for VertexLitGeneric
available in ,
,
,
,
,
(As of Jungle Inferno),
(as of December 2017),
(as of October 2018) that morphs a material around using the parameters of an
env_wind
entity. This is used in and
to give the appearance of tree leaves and foilage blowing in the wind. The paramaters of this command determine how much the
env_wind
entity should affect the morphing. This command assumes any model using it is facing upwards.



$treeSwayStatic
is set to 1.

$halflambert
may also partially fix the issue. [todo tested in ?]Parameters
$treeSway "0" "1" or "2" //Changes the treesway effect. 0 is no sway, 1 is classic tree sway, 2 is an alternate, radial tree sway effect. //Tree sway mode 2: Hacks to use tree sway code on rectangular sheets of plastic/tarp attached at the four corners. //Inverts the sway scale radius to be 1 at (0,0,0) in model space and fall off radially towards the edges of the model. //The model is expected to be built lying in the X Y plane in model space, with its center at the origin. $treeSwayHeight "float" //The height in which the effect is applied. $treeSwayStartHeight "float" //The height from the origin in which the effect starts blending in. $treeSwayRadius "float" //The radius from the origin in which the effect is applied. $treeSwayStartRadius "float" //The radius from the origin in which the effect starts blending in. $treeSwaySpeed "float" //The speed multiplier of large movement such as the trunk. $treeSwayStrength "float" //The distance multiplier of large movement such as the trunk. $treeSwayScrumbleSpeed "float" //The falloff of the effect on small movement such as the trunk. Higher means a more stable center. $treeSwayScrumbleStrength "float" //The speed multiplier of the small movement such as the leaves. $treeSwayScrumbleFrequency "float" //The distance multiplier of the small movement such as the leaves. $treeSwayFalloffExp "float" //The frequency of the rippling of a sine wave in small movement such as the leaves. $treeSwayScrumbleFalloffExp "float" //The falloff of the effect on small movement such as the leaves. Higher means a more stable center. $treeSwaySpeedHighWindMultiplier "float" //Speed multiplier when env_wind triggers a gust. $treeSwaySpeedLerpStart "float" //Minimum wind speed in which a gust triggered by env_wind will start affecting the material. $treeSwaySpeedLerpEnd "float" //Minimum wind speed in which a gust triggered by env_wind will fully affect the material. $treeSwayStatic "boolean" //Whether or not to instead use a static wind value instead of the values from env_wind. TF2 and GMOD (as of April 2019) only.