Wind Shake: High performance wind effect for leaves and foliage

Would this be a viable option for something like tornadoes?
I’m wondering if possibly I could make trees in a certain area wrap around the funnel with high strength whilst trees from farther away be barely effected as it tracks through land without any snapping issues or other.

WindShake V2 is released!

Features

  • Skinned mesh support
  • workspace.GlobalWind support (Docs)
  • New animation math (better directional swaying)
  • Performance improvements and bug fixes



23 Likes

Hello!

I’m excited for the new module. I am trying it right now but I think my Initiating script is wrong as it’s not working. Could someone tell me what I’m doing wrong? Thanks!

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Windshake = require(ReplicatedStorage:WaitForChild("WindShake"))

local WindDirection = Vector3.new(0.5, 0, 0.5)
local WindSpeed = 20
local WindPower = 0.5

Windshake:SetDefaultSettings(WindDirection, WindSpeed, WindPower)

Windshake:Init()

Is there any fix for this @boatbomber

You are calling set default settings incorrectly, check the API. It takes one dictionary, not multiple arguments.

1 Like

No, that’s expected behavior. WindShake doesn’t currently support shaking objects that move around the map, it’s designed for stationary map foliage.

1 Like

Does this work with your WindShakeEditor Plugin?

1 Like

Youll need to update, but yes I have added support.

Is there a way to allow it to support moving objects, either a jank hacky solution, or a feature coming soon

this is insane, is it well optimized too? will it be able to run in a huge forest map?

edit: my bad :man_facepalming: you already said that its well optimized

It was working well on my test place with no issues


but when I switched it to my WIP game thats very crowded with plants, the shadows on my plants and other objects that arent tagged with windshake, including walls, turn off

With windshake off:

With windshake on:

And I know the issue is windshake since I turned it off and the problem went away, turned it on and it came back
I really dont understand why this happens since you dont edit CastShadow in your code and the shadow emitting objects are in view… the wall on the left has shadows on but windshake turns it off

Edit: i checked and it doesnt turn off the “castshadow” property but the shadows do disappear

6 Likes

shadows usually disable due to high physics overload, not sure if it has something to do with physics but just bringing it up

1 Like

How do I set it up on a skinned mesh? Testing it right now, when the GlobalWind’s value isn’t 0, it just vanishes, although it works on parts. Sometimes, it does work, but instead of using the bones it just moves around like a normal part would.
I figured it out. I think it should’ve been clarified that the bones are what need to be tagged.

the biggest problem, for me personally, is that because the tree is moving, the shadow itself is moving along with it, because of this there is a heavy load, especially in the lighting of the future
here, I will show a video of how the shadows are updated along with wind shaking, and a video without it

Windshake ON

WindShake OFF

I tried turning off all windshake on the bones, didnt help, I tried turning off windshake on all non boned objects which left around only 40 bones affected by windshake and nothing else and that still didnt help. I turned off every script except windshake and still… I tested it on my test place with a lot of boned trees and it works fine there so I really dont get it

idk why but after updating windshake with my plugin, things with the tag “WindShake” disappears when I get close to it

oh nvm, boatbomber fixed it, also must have made an issue in the github repo

Can you send me a place file in DMs that has this issue? I am unable to reproduce it.

This issue is fixed in the latest release, please update!

1 Like

I’m having a problem when trying to add wind shake to two separate models, they act individually. How would I make them act together like they attached?

EDIT: I think if I edit the pivot points that should work?

image

4 Likes

Is it possible to change the anchor point of an object that shakes, ex. a tall kelp plant should have the bottom rooted in place

1 Like