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}}
[[File:de_lake_treesway.gif|thumb|Tree with treesway on de_lake in CS:GO (click on image for gif to play).]]
[[File:de_lake_treesway.gif|thumb|Дерево с $treesway на карте de_lake в CS:GO (нажмите на картинку для активации gif).]]
{{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}}.
{{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.
$treesway трансформирует материал, используя параметры сущности {{ent|env_wind}}, чтобы создать вид листьев деревьев и фольги, развевающихся на ветру. Подпараметры $treesway определяют, насколько сущность env_wind должна влиять на трансформацию, и все они (кроме {{MdCode|outline-oneclick|$treeswaystatic}}) должны быть указаны, чтобы эффект работал правильно. Этот параметр шейдера предполагает, что любая модель, использующая его, смотрит вверх.


{{warning|Due to the way bumped lighting is calculated, <code>$treesway</code> will not sway materials which use {{ent|$bumpmap}}.}}
{{ModernWarning:ru|Из-за того, как рассчитывается освещение карт нормалей, $treesway не будет влиять на материалы, использующие {{ent|$bumpmap}}.}}
{{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 {{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==
{{ModernNote:ru|Этот шейдер параметра по умолчанию отключён в {{as|4}} SDK, но может быть включён повторно с помощью модификаций.}}


{{MatParam|$treesway|int|What option to use for the tree swaying effect.
{{ModernBug:ru|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.}}
:*0: No 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.}}}}
{{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|$treeswayradius|float|The radius from the model's origin in Hammer units in where the effect should start being fully applied. Default 300.}}
{{MatParam|$treeswaystartradius|float|The radius from the model's origin in which the effect starts blending in. Default 0.1.}}
{{MatParam|$treeswayspeed|float|The speed multiplier of large movement such as the trunk. Default 1.}}
{{MatParam|$treeswaystrength|float|The distance multiplier of large movement such as the trunk. Default 10.}}
{{MatParam|$treeswayscrumblespeed|float|The falloff of the effect on large movement such as the trunk. Higher means a more stable center. Default 0.1.}}
{{MatParam|$treeswayscrumblestrength|float|The speed multiplier of the small movement such as the leaves. Default 0.1.}}
{{MatParam|$treeswayscrumblefrequency|float|The distance multiplier of the small movement such as the leaves. Default 0.1.}}
{{MatParam|$treeswayfalloffexp|float|The frequency of the rippling of a sine wave in small movement such as the leaves. Default 1.5.}}
{{MatParam|$treeswayscrumblefalloffexp|float|The falloff of the effect on small movement such as the leaves. Higher means a more stable center. Default 1.}}
{{MatParam|$treeswayspeedhighwindmultipler|float|Speed multiplier when <code>env_wind</code> triggers a gust. Default 2.}}
{{MatParam|$treeswayspeedlerpstart|float|Minimum wind speed in which a gust triggered by <code>env_wind</code> will start affecting the material. Default 3.}}
{{MatParam|$treeswayspeedlerpend|float|Minimum wind speed in which a gust triggered by <code>env_wind</code> will fully affect the material. Default 6.}}
{{MatParam|$treeswaystatic|float|Use a static wind value instead of the values from <code>env_wind</code>. If enabled, <code>env_wind</code> is not required.|only={{tf2}}{{csgo}}{{GMOD}}{{mapbase}}}}
{{MatParam|$treeswaystaticvalues|vector2|Sets the static wind values used by <code>$treeswaystatic</code>, syntax <code>[x y]</code>. Default <code>[0.5 0.5]</code>.|only={{mapbase}}}}


[[Category:List of Shader Parameters|T]]
{{ModernBug:ru|В {{mapbase|4}} использование [[env_projectedtexture|проецируемой текстуры]] с отбрасыванием теней приведёт к тому, что тени не будут реагировать на <code>$treesway</code>, тени не будут двигаться. Такой же эффект ожидается в {{gmod|4}}.}}
: {{ModernTodo:ru|Что насчёт {{MdCode|outline-oneclick|$singlepassflashlight}} и {{MdCode|outline-oneclick|$flashlightnolambert}}?}}
 
==Параметры==
 
{{MatParam|$treesway|int|Вариант эффекта покачивания дерева:
:*0: Не влиять
:*1: "Классическое" покачивание дерева.
:*2: Радиальный эффект раскачивания дерева, предназначенный для использования на прямоугольных листах пластика/брезента (англ. plastic/tarp), прикрепленных к четырём углам. Он инвертирует радиус шкалы колебания, чтобы он был равен 1 в (0,0,0) в пространстве модели и уменьшался радиально к краям модели. {{ModernNote:ru|Ожидается, что модели, использующие {{MdCode|outline-oneclick|$treesway 2}}, будут построены в плоскости X Y в пространстве модели с их центром в начале координат.}}}}
{{MatParam|$treeswayheight|float|Начальная высота в единицах Hammer, с которой эффект должен начать полностью применяться. По умолчанию {{MdCode|outline-oneclick|1000}}.}}
{{MatParam|$treeswaystartheight|float|Высота от исходной точки модели, на которой эффект начинает смешиваться. По умолчанию {{MdCode|outline-oneclick|0.2}}.}}
{{MatParam|$treeswayradius|float|Радиус от начала координат модели в единицах Hammer, в котором эффект должен полностью применяться. По умолчанию {{MdCode|outline-oneclick|300}}.}}
{{MatParam|$treeswaystartradius|float|Радиус от начала координат модели, в котором эффект начинает смешиваться. По умолчанию {{MdCode|outline-oneclick|0.1}}.}}
{{MatParam|$treeswayspeed|float|Множитель скорости больших движений, таких как движение ствола. По умолчанию {{MdCode|outline-oneclick|0.1}}.}}
{{MatParam|$treeswaystrength|float|Множитель расстояния большого движения, такого как движение ствола. По умолчанию {{MdCode|outline-oneclick|10}}.}}
{{MatParam|$treeswayscrumblespeed|float|Уменьшение влияния при больших движениях, таких как движение ствола. Большие значения означают более стабильный центр. По умолчанию {{MdCode|outline-oneclick|0.1}}.}}
{{MatParam|$treeswayscrumblestrength|float|Множитель скорости небольшого движения, такого как движение листвы. По умолчанию {{MdCode|outline-oneclick|0.1}}.}}
{{MatParam|$treeswayscrumblefrequency|float|Множитель расстояния небольшого движения, такого как движение листвы. По умолчанию {{MdCode|outline-oneclick|0.1}}.}}
{{MatParam|$treeswayfalloffexp|float|Частота ряби синусоидальной волны при небольшом движении, таком как движение листвы. По умолчанию {{MdCode|outline-oneclick|1.5}}.}}
{{MatParam|$treeswayscrumblefalloffexp|float|Уменьшение влияния при больших движениях, таких как движение листвы. По умолчанию {{MdCode|outline-oneclick|0.1}}.}}
{{MatParam|$treeswayspeedhighwindmultipler|float|Множитель скорости, когда env_wind вызывает порыв ветра. По умолчанию {{MdCode|outline-oneclick|2}}.}}
{{MatParam|$treeswayspeedlerpstart|float|Минимальная скорость ветра, при которой порыв ветра, вызванный <env_wind, начнет воздействовать на материал. По умолчанию {{MdCode|outline-oneclick|3}}.}}
{{MatParam|$treeswayspeedlerpend|float|Минимальная скорость ветра, при которой порыв ветра, вызванный env_wind, полностью повлияет на материал. По умолчанию {{MdCode|outline-oneclick|6}}.}}
{{MatParam|$treeswaystatic|float|Используйте статическое значное ветра вместо значений из env_wind. Если включено, env_wind не требуется.|only={{tf2}}{{csgo}}{{GMOD}}{{mapbase}}}}
{{MatParam|$treeswaystaticvalues|vector2|Задает статичные значения ветра, используемые параметром $treeswaystatic, с помощью синтаксиса {{MdCode|outline-oneclick|[x y]}}. По умолчанию {{MdCode|outline-oneclick|[0.5 0.5]}}.|only={{mapbase}}}}
 
[[Category:List of Shader Parameters:ru|T]]


== See Also ==
== See Also ==
https://gamebanana.com/tuts/12924 - How to achieve a similar effect without <code>$treeSway</code>, on all source engine games
https://gamebanana.com/tuts/12924 - Обучающий материал на тему того, как добиться аналогичного эффекта без $treesway во всех играх на {{source|4}}.

Revision as of 06:09, 12 November 2022

English (en)Русский (ru)Translate (Translate)
Дерево с $treesway на карте de_lake в CS:GO (нажмите на картинку для активации gif).

$treesway - это параметр шейдера материала , доступный во всех играх на Template:Game name, начиная с Template:Game name для VertexLitGeneric. Он также доступен в Team Fortress 2 Black Mesa Garry's Mod Mapbase. В Garry's Mod и Mapbase он может быть использован для UnlitGeneric.

$treesway трансформирует материал, используя параметры сущности env_wind, чтобы создать вид листьев деревьев и фольги, развевающихся на ветру. Подпараметры $treesway определяют, насколько сущность env_wind должна влиять на трансформацию, и все они (кроме $treeswaystatic) должны быть указаны, чтобы эффект работал правильно. Этот параметр шейдера предполагает, что любая модель, использующая его, смотрит вверх.

Template:ModernWarning:ru

Template:ModernNote:ru

Template:ModernBug:ru

Template:ModernBug:ru

Template:ModernTodo:ru

Параметры

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

See Also

https://gamebanana.com/tuts/12924 - Обучающий материал на тему того, как добиться аналогичного эффекта без $treesway во всех играх на Source Source.