$treesway: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(tf2 shortcut)
($treeSwayStatic)
Line 25: Line 25:
==Additional parameters==
==Additional parameters==


; <code>$treeSway <bool></code>
; {{KV|$treeSway|float|Turns the effect on or off.}}
: Turns the effect on or off.


; <code>$treeSwayHeight [[Float]]</code>
; {{KV|$treeSwayHeight|float|The height in which the effect is applied.}}
: The height in which the effect is applied.


; <code>$treeSwayStartHeight [[Float]]</code>
; {{KV|$treeSwayStartHeight|float|The height from the origin in which the effect starts blending in.}}
: The height from the origin in which the effect starts blending in.


; <code>$treeSwayRadius [[Float]]</code>
; {{KV|$treeSwayRadius|float|The radius from the origin in which the effect is applied.}}
: The radius from the origin in which the effect is applied.


; <code>$treeSwayStartRadius [[Float]]</code>
; {{KV|$treeSwayStartRadius|float|The radius from the origin in which the effect starts blending in.}}
: The radius from the origin in which the effect starts blending in.


; <code>$treeSwaySpeed [[Float]]</code>
; {{KV|$treeSwaySpeed|float|The speed multiplier of large movement such as the trunk.}}
: The speed multiplier of large movement such as the trunk.


; <code>$treeSwayStrength [[Float]]</code>
; {{KV|$treeSwayStrength|float|The distance multiplier of large movement such as the trunk.}}
: The distance multiplier of large movement such as the trunk.


; <code>$treeSwayFalloffExp [[Float]]</code>
; {{KV|$treeSwayFalloffExp|float|The falloff of the effect on small movement such as the trunk. Higher means a more stable center.}}
: The falloff of the effect on small movement such as the trunk. Higher means a more stable center.


; <code>$treeSwayScrumbleSpeed [[Float]]</code>
; {{KV|$treeSwayScrumbleSpeed|float|The speed multiplier of the small movement such as the leaves.}}
: The speed multiplier of the small movement such as the leaves.


; <code>$treeSwayScrumbleStrength [[Float]]</code>
; {{KV|$treeSwayScrumbleStrength|float|The distance multiplier of the small movement such as the leaves.}}
: The distance multiplier of the small movement such as the leaves.


; <code>$treeSwayScrumbleFrequency [[Float]]</code>
; {{KV|$treeSwayScrumbleFrequency|float|The frequency of the rippling of a sine wave in small movement such as the leaves.}}
: The frequency of the rippling of a sine wave in small movement such as the leaves.


; <code>$treeSwayScrumbleFalloffExp [[Float]]</code>
; {{KV|$treeSwayScrumbleFalloffExp|float|The falloff of the effect on small movement such as the leaves. Higher means a more stable center.}}
: The falloff of the effect on small movement such as the leaves. Higher means a more stable center.


; <code>$treeSwaySpeedHighWindMultiplier [[Float]]</code>
; {{KV|$treeSwaySpeedHighWindMultiplier|float|Speed multiplier when [[env_wind]] triggers a gust.}}
: Speed multiplier when [[env_wind]] triggers a gust.


; <code>$treeSwaySpeedLerpStart [[Float]]</code>
; {{KV|$treeSwaySpeedLerpStart|float|Minimum wind speed in which a gust triggered by [[env_wind]] will start affecting the material.}}
: Minimum wind speed in which a gust triggered by [[env_wind]] will start affecting the material.


; <code>$treeSwaySpeedLerpEnd [[Float]]</code>
; {{KV|$treeSwaySpeedLerpEnd|float|Minimum wind speed in which a gust triggered by [[env_wind]] will fully affect the material.}}
: Minimum wind speed in which a gust triggered by [[env_wind]] will fully affect the material.


; {{KV|$treeSwayStatic|since=TF2|float|Does this require [[env_wind]]?}}


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

Revision as of 22:20, 16 December 2017

When this parameter 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 you see in Counter-Strike: Global OffensiveCounter-Strike: Global Offensive and various foliage seen in InsurgencyInsurgency 2014. The effect assumes that the model is facing upwards, and the commands specify how much it should be affected by the env_wind entity. This shader has possibly been in Valve games since Left 4 Dead, but was never enabled and used by Valve until Left 4 Dead 2, mods using the Alien Swarm codebase can enable this shader to take advantage of it.

Note.pngNote:These parameters only work in recent engine branches like Left 4 Dead 2, Counter-Strike: Global Offensive and other games based on it like Insurgency, along with mods that have it enabled like Lambda Wars.

It was recently added to Team Fortress 2 with the Jungle Inferno Update and it dosen't need env_wind either.

Requires VertexLitGeneric.

Syntax

   $treeSway                         "1"
   $treeSwayHeight                   "8"
   $treeSwayStartHeight              ".5"
   $treeSwayRadius                   "1"
   $treeSwayStartRadius              "0.0"
   $treeSwaySpeed                    "2"
   $treeSwayStrength                 ".1"
   $treeSwayScrumbleSpeed            "3"
   $treeSwayScrumbleStrength         ".2"
   $treeSwayScrumbleFrequency        "20"
   $treeSwayFalloffExp               "2"
   $treeSwayScrumbleFalloffExp       "3"
   $treeSwaySpeedHighWindMultiplier  ".2"
   $treeSwaySpeedLerpStart           "1000.0"
   $treeSwaySpeedLerpEnd             "2500.0"

Additional parameters

$treeSway ([todo internal name (i)]) <float>
Turns the effect on or off.
$treeSwayHeight ([todo internal name (i)]) <float>
The height in which the effect is applied.
$treeSwayStartHeight ([todo internal name (i)]) <float>
The height from the origin in which the effect starts blending in.
$treeSwayRadius ([todo internal name (i)]) <float>
The radius from the origin in which the effect is applied.
$treeSwayStartRadius ([todo internal name (i)]) <float>
The radius from the origin in which the effect starts blending in.
$treeSwaySpeed ([todo internal name (i)]) <float>
The speed multiplier of large movement such as the trunk.
$treeSwayStrength ([todo internal name (i)]) <float>
The distance multiplier of large movement such as the trunk.
$treeSwayFalloffExp ([todo internal name (i)]) <float>
The falloff of the effect on small movement such as the trunk. Higher means a more stable center.
$treeSwayScrumbleSpeed ([todo internal name (i)]) <float>
The speed multiplier of the small movement such as the leaves.
$treeSwayScrumbleStrength ([todo internal name (i)]) <float>
The distance multiplier of the small movement such as the leaves.
$treeSwayScrumbleFrequency ([todo internal name (i)]) <float>
The frequency of the rippling of a sine wave in small movement such as the leaves.
$treeSwayScrumbleFalloffExp ([todo internal name (i)]) <float>
The falloff of the effect on small movement such as the leaves. Higher means a more stable center.
$treeSwaySpeedHighWindMultiplier ([todo internal name (i)]) <float>
Speed multiplier when env_wind triggers a gust.
$treeSwaySpeedLerpStart ([todo internal name (i)]) <float>
Minimum wind speed in which a gust triggered by env_wind will start affecting the material.
$treeSwaySpeedLerpEnd ([todo internal name (i)]) <float>
Minimum wind speed in which a gust triggered by env_wind will fully affect the material.
$treeSwayStatic ([todo internal name (i)]) <float> (in all games since Team Fortress 2)
Does this require env_wind?