$treesway: Difference between revisions
SirYodaJedi (talk | contribs) mNo edit summary |
m (I am the artist on de_prime, I did not pre-bake any wind simulations. I just used basic CSM.) |
||
Line 11: | Line 11: | ||
{{bug|In {{mapbase}}, using a shadow-casting [[env_projectedtexture|projected texture]] will cause shadows not reacting to <code>$treesway</code>, shadows don't move, expect in {{gmod}}.}} | {{bug|In {{mapbase}}, using a shadow-casting [[env_projectedtexture|projected texture]] will cause shadows not reacting to <code>$treesway</code>, shadows don't move, expect in {{gmod}}.}} | ||
: {{todo|What about <code>$singlepassflashlight</code> and <code>$flashlightnolambert</code>?}} | : {{todo|What about <code>$singlepassflashlight</code> and <code>$flashlightnolambert</code>?}} | ||
{{modernImportant|While $TreeSway can be used to animate a {{ent|prop_static}}, lightmap shadows casted by swaying static props will remain static.<br>''If [[CSM]] is unavailable'', consider using a {{ent|prop_dynamic}} instead. This can be combined with an animation containing more realistic pre-baked wind physics than can be achieved with $treesway | {{modernImportant|While $TreeSway can be used to animate a {{ent|prop_static}}, lightmap shadows casted by swaying static props will remain static.<br>''If [[CSM]] is unavailable'', consider using a {{ent|prop_dynamic}} instead. This can be combined with an animation containing more realistic pre-baked wind physics than can be achieved with $treesway.}} | ||
==Parameters== | ==Parameters== |
Revision as of 17:14, 26 December 2023
Template:Shaderparam It is also available in . In
, it can also be used for UnlitGeneric.
$treesway
morphs a material around using the parameters of an env_wind entity to give the appearance of tree leaves and foilage blowing in the wind. The subparameters of $treesway
determine how much the env_wind
entity should affect the morphing, and all of them (except $treeswaystatic
) must be specified in order for the effect to work properly. This shader parameter assumes any model using it is facing upwards.

$treesway
will not sway materials which use $bumpmap.





$treesway
, shadows don't move, expect in 
- Todo: What about
$singlepassflashlight
and$flashlightnolambert
?

If CSM is unavailable, consider using a prop_dynamic instead. This can be combined with an animation containing more realistic pre-baked wind physics than can be achieved with $treesway.
Parameters
$treesway
$treeswayheight
$treeswaystartheight
$treeswayradius
$treeswaystartradius
$treeswayspeed
$treeswaystrength
$treeswayscrumblespeed
$treeswayscrumblestrength
$treeswayscrumblefrequency
$treeswayfalloffexp
$treeswayscrumblefalloffexp
$treeswayspeedhighwindmultipler
$treeswayspeedlerpstart
$treeswayspeedlerpend
$treeswaystatic
$treeswaystaticvalues
External links
https://gamebanana.com/tuts/12924 - How to achieve a similar effect without $treeSway
, on all source engine games. Alternatively, use an animated prop_dynamic, for a more realistic (but more expensive) effect.