$treeSway in TF2?

Random Vote: Where did TFTeam port this shader from?

  • CS:GO

  • L4D:2


Results are only viewable after voting.

ISPuddy

L2: Junior Member
Jul 31, 2015
94
146
Anyone knows that in Mercenary Park trees, some bushes, flowers are moving on it's own

I checked in-game with ent_dump !picker but the console said nothing
I checked in-hammer it said it's a prop_static, prop_static can't have animations right???

and then i check models .vmf
found these

$treeSway "1" // height at which the effect is on fully (in world units)
$treeSwayHeight "0"//"300" // radius at which the effect is on fully (in world units)
$treeSwayStartHeight ".5" // portion of height at which the effect starts to fade in (0-1)
$treeSwayRadius "200" // radius at which the effect is on fully (in world units)
$treeSwayStartRadius "0.2" // portion of radius at which the effect starts to fade in (0-1)
$treeSwaySpeed ".2" // how quickly the tree sways (as a multiplier of time)
$treeSwayStrength ".4" // how much the tree sways (as a multiplier of position)
$treeSwayScrumbleSpeed "2.2" // how quickly the leaves move (as a multiplier of time)
$treeSwayScrumbleStrength "4.4" // how much the leaves move( as a multiplier of position)
$treeSwayScrumbleFrequency "10" // spatial frequency of sine wave applied to leaves. Typically high-ish (10-25)
$treeSwayFalloffExp "3" // falloff parameter for wave motion on branches/trunk, higher means core of tree is more stable
$treeSwayScrumbleFalloffExp "2" // falloff parameter for scrumble motion on leaves, higher means the core of the tree is more stable
$treeSwaySpeedHighWindMultiplier "0" // multiplier of movement speed at higher wind
$treeSwaySpeedLerpStart "200.0" // wind speed at which high wind multiplier begins to have effect
$treeSwaySpeedLerpEnd "600.0" // wind speed at which high wind multiplier is fully on
$treeSwayStatic 1


i think valve just ported $treeSway from l4d2 or maybe csgo
 
Mar 23, 2013
1,013
347
They are prop_statics? o-O? static props with animations... now that's next gen!

EDIT I typed r_drawstaticprops 0 into console and they disappeared, so they definitely work as static prop. I wonder if they add edicts and how many. Animated props with bones usually add a couple edicts to the count. But if ent_dumb doesn't spit anythin out I guess they add none?
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,699
2,581
Do these trees have shadows? Because that would be the most useful feature of animated static props, the ability to still cast static shadows at compile time.
 

[Rx.] Christian Troy

L5: Dapper Member
Jan 23, 2017
223
64
Do these trees have shadows? Because that would be the most useful feature of animated static props, the ability to still cast static shadows at compile time.

Yes they do but the shadows don't move with them.
 

henke37

aa
Sep 23, 2011
2,075
515
Obviously precomputed shadows can't move.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,699
2,581
That rules. There needs to be an additional option for the prop_dynamic entity that's like, "Cast static shadows based on starting position". So stuff like the Powerline turbines can still have proper shadows. (Although that's a bad example because those should have been static props with material proxies in the first place.)
 

Crowbar

aa
Dec 19, 2015
1,455
1,298
That rules. There needs to be an additional option for the prop_dynamic entity that's like, "Cast static shadows based on starting position". So stuff like the Powerline turbines can still have proper shadows. (Although that's a bad example because those should have been static props with material proxies in the first place.)
Blocklight is an option.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,699
2,581
But it covers up the prop's own origin and turns the whole thing black, unless you have room to place a info_lighting nearby. Also good luck building one that's as detailed as the prop's collision mesh.
 
Mar 23, 2013
1,013
347
But it covers up the prop's own origin and turns the whole thing black

But with propper compile options you don't need to care about the origin anyway. Bould the block light brush, inside the prop so that it doesnt stick out of it, but covers most of its volume, more or less and you can have somewhat acurate static shadows.
But you are right, since it isn't convinient in many other situations, dynamic props should have the option to cast static shadows.
 

AsG_Alligator

qhull precision error
aa
Aug 5, 2016
620
1,223
I still have not managed to make the parameter work in test maps.

Also, intrestingly, there is no env_wind or trigger_wind in merc park despite VDC page saying it is required for treeSway to function.