Ru/$treesway: Difference between revisions

From Valve Developer Community
< Ru
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{lang|$treeSway}}
{{lang|$treeSway}}
{{finishtranslation:ru}}
[[File:de_lake_treesway.gif|thumb|Tree with treesway on de_lake in CS:GO (click on image for gif to play).]]
 
{{Shaderparam|$treesway|since=Left 4 Dead|shader1=VertexLitGeneric}} It is also available in {{tf2}}{{Bms}}{{GMOD}}{{mapbase}}. In {{GMOD}}{{mapbase}}, it can also be used for {{ent|UnlitGeneric}}.
[[File:de_lake_treesway.gif|thumb|Дерево с treesway на de_lake в CS:GO (нажмите на изображение что бы воспроизвести gif).]]  
{{Shaderparam:ru|$treesway|since=Left 4 Dead|shader1=VertexLitGeneric}} Это так же доступно в {{tf2}}{{Bms}}{{GMOD}}{{mapbase}}. В {{GMOD}}{{mapbase}}, это можно использовать и для {{ent|UnlitGeneric}}.


<code>$treesway</code> morphs a material around using the parameters of an {{ent|env_wind}} entity to give the appearance of tree leaves and foilage blowing in the wind. The subparameters of <code>$treesway</code> determine how much the <code>env_wind</code> entity should affect the morphing, and all of them (except <code>$treeswaystatic</code>) must be specified in order for the effect to work properly. This shader parameter assumes any model using it is facing upwards.
<code>$treesway</code> morphs a material around using the parameters of an {{ent|env_wind}} entity to give the appearance of tree leaves and foilage blowing in the wind. The subparameters of <code>$treesway</code> determine how much the <code>env_wind</code> entity should affect the morphing, and all of them (except <code>$treeswaystatic</code>) must be specified in order for the effect to work properly. This shader parameter assumes any model using it is facing upwards.
Line 10: Line 8:
{{note|This shader parameter is disabled by default in the {{as}} SDK. It can re-enabled by modding.}}
{{note|This shader parameter is disabled by default in the {{as}} SDK. It can re-enabled by modding.}}
{{bug|In {{GMOD}}{{mapbase}}, using a shadow-casting [[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. {{ent|$halflambert}} may also partially fix the issue.}}
{{bug|In {{GMOD}}{{mapbase}}, using a shadow-casting [[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. {{ent|$halflambert}} may also partially fix the issue.}}
: {{todo:ru|Что насчёт <code>$singlepassflashlight</code> и <code>$flashlightnolambert</code>?}}
{{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>?}}


==Параметры==
==Parameters==


{{MatParam|$treesway|int|What option to use for the tree swaying effect.
{{MatParam|$treesway|int|What option to use for the tree swaying effect.
Line 18: Line 17:
:*1: "Classic" tree sway.
:*1: "Classic" tree sway.
:*2: Radial tree sway effect, intended for use on rectangular sheets of plastic/tarp attached at four corners. It inverts the sway scale radius to be 1 at (0,0,0) in model space and to fall off radially towards the edges of the model. {{note|Models using <code>$treesway 2</code> are expected to be built lying in the X Y plane in model space, with their center at the origin.}}}}
:*2: Radial tree sway effect, intended for use on rectangular sheets of plastic/tarp attached at four corners. It inverts the sway scale radius to be 1 at (0,0,0) in model space and to fall off radially towards the edges of the model. {{note|Models using <code>$treesway 2</code> are expected to be built lying in the X Y plane in model space, with their center at the origin.}}}}
{{MatParam|$treeswayheight|float|Начальная высота в юнитах <code>Hammer Editor'ра</code> с которой эффект начинает работать на полную. По умолчанию: 1000.}}  
{{MatParam|$treeswayheight|float|The starting height in Hammer units where the effect should start being fully applied. Default 1000.}}
{{MatParam|$treeswaystartheight|float|The height from the model's origin in which the effect starts blending in. Default 0.2.}}
{{MatParam|$treeswaystartheight|float|The height from the model's origin in which the effect starts blending in. Default 0.2.}}
{{MatParam|$treeswayradius|float|The radius from the model's origin in Hammer units in where the effect should start being fully applied. Default 300.}}
{{MatParam|$treeswayradius|float|The radius from the model's origin in Hammer units in where the effect should start being fully applied. Default 300.}}
Line 37: Line 36:
[[Category:List of Shader Parameters|T]]
[[Category:List of Shader Parameters|T]]


== Смотрите так же ==
== See Also ==
https://gamebanana.com/tuts/12924 - Как достигнуть похожий эффект без <code>$treeSway</code>, во всех source engine играх.
https://gamebanana.com/tuts/12924 - How to achieve a similar effect without <code>$treeSway</code>, on all source engine games

Revision as of 03:51, 12 November 2022

English (en)Русский (ru)Translate (Translate)
Tree with treesway on de_lake in CS:GO (click on image for gif to play).

Template:Shaderparam It is also available in Team Fortress 2Black MesaGarry's ModMapbase. In Garry's ModMapbase, 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.

Warning.pngПредупреждение:Due to the way bumped lighting is calculated, $treesway will not sway materials which use $bumpmap.
Note.pngПримечание:This shader parameter is disabled by default in the Alien Swarm SDK. It can re-enabled by modding.
Icon-Bug.pngБаг:In Garry's ModMapbase, using a shadow-casting projected texture on materials with this parameter will cause flickering. As a workaround, try to keep trees away from where player flashlights can reach. $halflambert may also partially fix the issue.  [нужно проверить в ?]
Icon-Bug.pngБаг:In Mapbase, using a shadow-casting projected texture will cause shadows not reacting to $treesway, shadows don't move, expect in Garry's Mod.  [нужно проверить в ?]
Нужно сделать: What about $singlepassflashlight and $flashlightnolambert?

Parameters

$treesway $treeswayheight $treeswaystartheight $treeswayradius $treeswaystartradius $treeswayspeed $treeswaystrength $treeswayscrumblespeed $treeswayscrumblestrength $treeswayscrumblefrequency $treeswayfalloffexp $treeswayscrumblefalloffexp $treeswayspeedhighwindmultipler $treeswayspeedlerpstart $treeswayspeedlerpend $treeswaystatic $treeswaystaticvalues

See Also

https://gamebanana.com/tuts/12924 - How to achieve a similar effect without $treeSway, on all source engine games