Breeze into Wind! [Fully Released]

While I agree that customising based on regions would be super useful I can see that this would be much more difficult to implement - at least with a single value, I can finally make grass fit the size of custom avatars.

What would be useful (and is probably more doable) would also be able to control (with single values) the density of the grass and its base width. This would allow for thick/thin, tall/short, and dense/sparse grass across a map. Right now I find the grass looks far too cartoony for a realistic game and having these additional but single-value options would give us a lot more versatility.

But here is what I was able to achieve just with wind:

2 Likes

That sounds really nice, I might play around with it for a bit!

Since the reddit is restricted for some reason, ima post some simple code for a smooth, realistic wind direction changing script.

--MADE BY: Playanad/LumberdFox/Destroyanad (I go by all of those names)
--Put This In Server Script Service

--Services
local TS = game:GetService("TweenService")

--Wind Variables
local wind = workspace.GlobalWind
local windXRange = 20 --Turn this, and the Z range up to generate higher speeds.
local windYRange = 10 --I recommend not turning this up too high
local windZRange = 20 --Turn this, and the X range up to generate higher speeds.
local stormMultiFactor = 5 --How much to multiply wind speeds during storms.
local stormChance = 10 -- 1-100 range. 10 would be a 10% chance.

while true do
	local smoothTime = math.random(30,120)
	local stormNum = math.random(1,100)
	
	local nonStormMulti = 1
	local windMultiplier = stormNum > stormChance and nonStormMulti or stormMultiFactor 
	
	print(windMultiplier)
	
	local randomWindX = math.random(-windXRange, windXRange)
	local randomWindY = math.random(-windYRange, windYRange)
	local randomWindZ = math.random(-windZRange, windZRange)
	
	if randomWindX < (windXRange / 2) then
		randomWindX = math.random(-windXRange, windXRange)
	end
	if randomWindY < (windYRange / 2) then
		randomWindY = math.random(-windYRange, windYRange)
	end
	if randomWindZ < (windZRange / 2) then
		randomWindZ = math.random(-windZRange, windZRange)
	end
	
	local randomWindVector3 = Vector3.new(randomWindX * windMultiplier, randomWindY * (windMultiplier / 3), randomWindZ * windMultiplier)
	
	local windTween = TS:Create(workspace, TweenInfo.new(smoothTime), {GlobalWind = randomWindVector3})
	windTween:Play()
	
	task.wait(smoothTime)
end

Feel free to use it for whatever without credit

4 Likes

Water part when. please roblox I need this now.

3 Likes

Use task.wait() instead of wait(), it’s more accurate and faster.

Grass should also be able to be used in any terrain you wish. And more

1 Like

Thank you for the help, i will update my code, and post

1 Like

Also the reddit is probably privated because of the Reddit blackout.
They restricted API access by making it ridiculously expensive, so a bunch of subreddits went private in protest.

2 Likes

I feel like that wouldnt do much, but alright

and @h_vcn
Use wait() instead of task.wait(). Although not as accurate, it throttles (so if your game is lagging it will slow down to reduce server load).

Keep in mind that this script does not work in live games due to it being in beta.

2 Likes

WOW! THIS. IS. AMAZING. I’VE GOT NO OTHER WORDS TO DESCRIBE THIS FEATURE! Definitely will be using it :smiley:

2 Likes

I just got told by some other dude to use task.wait ._.

2 Likes

It is ultimately your choice.

  • wait will reduce server load, improving the FPS of the server when doing resource-intensive tasks.

  • task.wait will wait a more accurate time, but it will not throttle (so if the server is under heavy load, task.wait might cause it to lag more).

2 Likes

This is so cool! this is something that I really need!

3 Likes

GRASS

While it is useful to have the whole grass height change all together. It would prevent players from achieving the depth that is important in the grass. What if you want tall grass in one area and short grass somewhere else, right now and for the past 5 years that has been hard to create.

Either you make grass meshes and they just stand out because they don’t move with the wind.

Or you do the complicated way, which is making a grass mesh and code it in to make it move with the wind, additionally coding it to interact with player movement.

Another problem that I’ve been trying to combat for the last 4 years is, making it look like the grass has more coverage over the terrain, or have some sort of hue running across the top, or being able to have different grass colour in whatever area I choose.

This as an example is something I eventually want to be able to achieve, but so far, for the past 5+ years I haven’t been able to do any of it. It would be quite disappointing, especially for me to have Roblox touch on grass now, yet do nothing significant to actually make a valuable change.

Would love to have some sort of feedback or reassurance that we will be able to create something similar sometime soon.

8 Likes

Very cool feature that has been needed for years! There is just one thing missing that would be great to add; the ability to have workspace.Terrain.WaterWaveSpeed be effected by the wind! That’s just my personal opinion though, but I hope it gets added sometime.

2 Likes

brilliant update. could be more brilliant if we had custom grass textures like in unity. in present; even if we make the most realistic forest possible, grass will still be stretched triangles which completely destroys the realistic vibe.

1 Like

Could you make this affect fabric in order to make a simulation of flag waving?

2 Likes

if they continue the wind stuff we will probably have cloth physics

1 Like

How would I grab the speed of the wind in a script? I’m wanting to create dynamic wind audio that increases in volume based on the speed of the global wind.

2 Likes