$treesway: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
($treeSwayStatic)
(Consistency)
Line 10: Line 10:
<pre>
<pre>
$treeSway                        "0" "1" or "2"
$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 in Portal 2, CS:GO, and Alien Swarm engines.
//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.  
//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.
//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 xy plane in model space, with its center at the origin.
//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.
$treeSwayHeight                  "float"   //The height in which the effect is applied.
$treeSwayStartHeight              "float"//The height from the origin in which the effect starts blending in.
$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.
$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.
$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.
$treeSwaySpeed                    "float"   //The speed multiplier of large movement such as the trunk.
$treeSwayStrength                "float"//The distance 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.
$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.
$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.
$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.
$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.
$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.
$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.
$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                  "1" //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 only.
</pre>
</pre>


[[Category:List of Shader Parameters|T]]
[[Category:List of Shader Parameters|T]]

Revision as of 10:54, 17 October 2018

$treeSway is a shader effect available in Counter-Strike: Global Offensive, Insurgency, Left 4 Dead 2, Left 4 Dead, Alien Swarm, Team Fortress 2 (As of Jungle Inferno update), Garry's Mod (as of October 2018).

Description

When this shader effect is added, it will make the material morph around to an env_wind entity to give it the effect that it's blowing in the wind, this effect is used for the trees in Counter-Strike: Global Offensive and various foliage seen in Insurgency. The effect assumes that the model is facing upwards, and the commands specify how much it should be affected by the env_wind entity. By default this shader is disabled in the Alien Swarm SDK, however it can be re-enabled in a mod.

Only compatible with VertexLitGeneric.

Note.pngNote:Team Fortress 2 Does not require env_wind if $treeSwayStatic is set to 1.

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 only.