$treeSway in TF2?

Discussion in 'Mapping Questions & Discussion' started by ISPuddy, Oct 23, 2017.

?

Random Vote: Where did TFTeam port this shader from?

  1. CS:GO

  2. L4D:2

Results are only viewable after voting.
  1. ISPuddy

    ISPuddy L2: Junior Member

    Messages:
    71
    Positive Ratings:
    58
    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
     
    • Thanks Thanks x 2
    • Like Like x 1
  2. Lampenpam

    aa Lampenpam

    Messages:
    994
    Positive Ratings:
    329
    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?
     
  3. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    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.
     
  4. [Rx.] Christian Troy

    [Rx.] Christian Troy L4: Comfortable Member

    Messages:
    154
    Positive Ratings:
    42
    Yes they do but the shadows don't move with them.
     
  5. henke37

    aa henke37

    Messages:
    1,834
    Positive Ratings:
    420
    Obviously precomputed shadows can't move.
     
    • Respectfully Disagree Respectfully Disagree x 1
  6. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,597
    Positive Ratings:
    1,677
    vertex shader, no bones needed, no logic needed
     
    • Agree Agree x 2
  7. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    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.)
     
    • Agree Agree x 1
  8. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,419
    Positive Ratings:
    1,141
    Blocklight is an option.
     
  9. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    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.
     
  10. Lampenpam

    aa Lampenpam

    Messages:
    994
    Positive Ratings:
    329
    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.
     
  11. AsG_Alligator

    aa AsG_Alligator trigger_hiss

    Messages:
    358
    Positive Ratings:
    810
    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.