[Mod] Snow, rain, clouds (with sound) [snowdrift]

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] Snowfall, rainfall, settling snow [0.3.0] [snowdri

by SAMIAMNOT » Post

True. Mabe an optional option that enables "flash floods?"
Wouldnt it be a nice surprise when melting snow from a nearby mountain plummets your village? :D
I test mines.

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snowfall, rainfall, settling snow [0.3.0] [snowdri

by paramat » Post

Nope i'm going to keep it simple, snow settles and will deepen to snowblocks.

User avatar
Minetestforfun
Member
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun
Location: On earth
Contact:

Re: [Mod] Snowfall, rainfall, settling snow [0.3.0] [snowdri

by Minetestforfun » Post

Hi paramat,

First, thank you for your mod, and your work ! :)

I have some problems with your mod on my server, when a client stay too longer in a "falling snow" chunk, the client loose packets and freeze... Also, the server freeze sometimes for the same reason when several clients are is "falling snow" chunks...

So, i tried to tweak the "parameters" section in the "init.lua", you can see my tweaked parameters here : https://github.com/Ombridride/minetest- ... t/init.lua
(my world in generated with a mapgenv6)

But the problem still here...
Can you help me please ?
Can you give me the optimal/better parameters for avoid the packets loos client and server side ?

Thank you in advance

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snowfall, rainfall, settling snow [0.3.0] [snowdri

by paramat » Post

You could try 'local SETTLE = false', the snow settling code is a little slow i need to rewrite it to use the non-mapgen object voxelmanip.

User avatar
Minetestforfun
Member
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun
Location: On earth
Contact:

Re: [Mod] Snowfall, rainfall, settling snow [0.3.0] [snowdri

by Minetestforfun » Post

Thank you, i will try it and give you a return :)

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] Snowfall, rainfall, settling snow [0.3.0] [snowdri

by SAMIAMNOT » Post

Does the snow and rain come from clouds?
I test mines.

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snowfall, rainfall, settling snow [0.4.0] [snowdri

by paramat » Post

Version 0.4.0
Mod has been rewritten, see first post.
Rain is removed, it was only experimental and having one particle per drop limited it to very light showers.
Snow settling is removed for now and needs rewriting to only occasionally add snow to player-built structures using a luavoxelmanip.

User avatar
Milan*
Member
Posts: 251
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant
Location: Germany
Contact:

Re: [Mod] Snowfall, rainfall, settling snow [0.4.0] [snowdri

by Milan* » Post

Would be nice if this mod detects the date and adds snow in the whole map during christmas for example :)

Edit: this mod checks for snowbiome - this confuses me since as far as i know, the biomedate is lost if mapgen is done.
Illuna Minetestservers | Mastodon | [ matrix ] | I may host you a Minetestserver, just contact me.

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snowfall, rainfall, settling snow [0.4.0] [snowdri

by paramat » Post

The mod uses the known noise parameters for temperature, however the threshold may need changing slightly for the new set of biomes.
By altering the temperature and precipitation thresholds you can make it snow everywhere at Christmas if you want.

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by paramat » Post

Version 0.5.1
Big rewrite to add rainfall with sound, many other improvements, and is closely matched to our current biomes.
First post rewritten, with new screenshots.
///////////////////////
For use in all mapgens except mgv6.

Precipitation stops and starts with time but is also is affected by biomes humidity and temperature.
More precipitation in more humid areas, which becomes snow in frozen biomes.
Soothing rainfall sound.
4 snowflake designs.
Snow drifts southwards in Minetest's gentle wind.
Sky becomes overcast during precipitation, the cloud cover brightness changes smoothly during day/night transitions and becomes dark at night.

User avatar
TumeniNodes
Member
Posts: 2853
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by TumeniNodes » Post

Looks really nice.
Seems like a lot of really nice and exciting changes are coming with the next release : )
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am

User avatar
ErrorNull
Member
Posts: 222
Joined: Thu Mar 03, 2016 00:43

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by ErrorNull » Post

i keep an eye on the different weather mods... and I like this update. thanks paramat.
My Villagers Mod: [villagers]

bell07
Member
Posts: 587
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by bell07 » Post

I really like this mod! Finally no snow fall on pyramids in the desert!

One behaviour I do not like if you go bellow something the rain/snow stops rapidelly. Therefore I did a change: check the particle positions for inside (light-level) instead of player position. For a small performance effort (I did not realized them) I get a more "natural" behaviour, the precipitation is outside, independent if player is outside or not.

An addition is the sound stops depending on outside_quota. But it happens rapidly. Is there a way to control the volume depending on the outside_quota?

Pls. look also on https://github.com/bell07/minetest-snow ... 1e40fde5e5

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by paramat » Post

Interesting. Currently the sound is played as a long looped sample, so you would need to restart it each tiime the quota changes.
Having every separate particle check light is intensive code, nice idea though.

bell07
Member
Posts: 587
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by bell07 » Post

I did some experiments and benchmarks.
Benchmark was done by

Code: Select all

local x = os.clock()
---globalstep-code
print(string.format("elapsed time: %.5f\n", os.clock() - x))
For reference your upstream version get values in range 0.00200 - 0.00500. Not very accurate measurement, I know.

1. Benchmark for the change with particle position check for outside (bell07/master branch) as described before was at 0.00400 - 0.00700. But maybe I just walked to other place ...

2. In addition I tried the dynamic sound scope (bell07/scope_sound) https://github.com/bell07/minetest-snow ... 7041168912. The idea is to set the sound position and gain depending on rain drops position and count.
But it is horrible to restart the sound each globalstep for position and gain adjustment because there is no way to adjust running sound stream. I think this should be a point for the core development.
For testing I splitted the sound file to 3x1 second files and start them each globalstep at new position without ending the old sound. Somewhat better bit still weird. Maybe anyone with sound editing skills can get a acceptable effect using this method? Benchmark was slightly more the change 1 (note, the change 1 is required for this change 2)

3. Just for fun: I seen some problems in inside check with glass blocks using minetest.get_node_light(). But it seems not happens anymore. Anyway I tried the check using

Code: Select all

minetest.line_of_sight(pos, {x=pos.x,y=pos.y+OUTHIGH,z=pos.z}) == true 
(bell07/line_of_sight) https://github.com/bell07/minetest-snow ... c9aa4b7225 It does work too with same benchmark as above with OUTHIGH=15. Useful test or waste time? I found out the minetest.line_of_sight() works fine if COLLIDE is on.

I activated the COLLIDE in my master because the roof should block the rain ;)
Image(for screenshot I set the DROPS to 256)
Attachments
screenshot_20170420_215953.png
(501.34 KiB) Not downloaded yet

User avatar
xeranas
Member
Posts: 161
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by xeranas » Post

paramat wrote: For use in all mapgens except mgv6.
What so special about mgv6? If there are some serious mgv6 limitations maybe engine should remove ability to select it from UI for new world creations in favor of better mapgens? (existing old worlds remains supported).

User avatar
burli
Member
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by burli » Post

xeranas wrote:
paramat wrote: For use in all mapgens except mgv6.
What so special about mgv6? If there are some serious mgv6 limitations maybe engine should remove ability to select it from UI for new world creations in favor of better mapgens? (existing old worlds remains supported).
I assume that heat and humidity noises are used to determine the weather (snow in cold biomes, nothing in hot biomes..). v6 doesn't has this noises

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by paramat » Post

Mgv6 does not use the Biome API so uses a differerent set of noises for heat and humidity.
I could add mgv6 support but choose not to because i find it boring so i cannot be bothered.

User avatar
xeranas
Member
Posts: 161
Joined: Fri Feb 05, 2016 11:06

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by xeranas » Post

What does comment: 'must match biome heat and humidity noise parameters for a world' means in simple worlds (I do not know how mapgen things works on minetest). Does every non-mg6 will match automaticly these parametrers? Are those parameters are hardcoded in mt engine and safe to relay for other mods as well regardless of mapgen (as long as its not mg6?).

Code: Select all

-- These 2 must match biome heat and humidity noise parameters for a world

local np_temp = {
	offset = 50,
	scale = 50,
	spread = {x = 1000, y = 1000, z = 1000},
	seed = 5349,
	octaves = 3,
	persist = 0.5,
	lacunarity = 2.0,
	--flags = ""
}

local np_humid = {
	offset = 50,
	scale = 50,
	spread = {x = 1000, y = 1000, z = 1000},
	seed = 842,
	octaves = 3,
	persist = 0.5,
	lacunarity = 2.0,
	--flags = ""
}
Seeing that one of core developer uses this technique leaves some concern for me about progress/future of #3685 ticket. Don't get me wrong this is OSS project no push whatsoever but It just feel that even this mod would benefit from meta data retrieved from engine instead of hardcoded noise parameters.

User avatar
Andrey01
Member
Posts: 2386
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by Andrey01 » Post

The mod is nice! Why did developers not add this mod on default?

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by paramat » Post

> Does every non-mg6 will match automaticly these parametrers?

Yes, if you have not altered the MT engine's biome heat and/or humidiy noises.
The comment is there in case you alter the MT engine's biome heat and/or humidity noises using .conf or advanced settings.
By default, MT engine biome heat and humidity noises for all non-mgv6 mapgens are identical to the noises hardcoded into the mod, so it will work correctly.
I should really fetch the noises automatically from the MT engine.

Heat, humidity and biome at point is high on my priority list, should be added during next dev cycle.

> Are those parameters hardcoded in mt engine and safe to relay for other mods as well regardless of mapgen (as long as its not mg6?).

Yes. Unless you actually change them in .conf or advanced settings.

User avatar
Hamlet
Member
Posts: 756
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by Hamlet » Post

Using this since a few days (mgv7), I like it but it seems to permanently rain, or snow, etc.

eg. plains = always raining; snow zones = always snowing; beaches = always sunny.
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

User avatar
paramat
Developer
Posts: 3658
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by paramat » Post

It doesn't permanently precipitate, but you can tune it using the parameter in the init.lua file:

Code: Select all

local PRECOFF = -0.4 -- Precipitation offset, higher = rains more often

User avatar
Hamlet
Member
Posts: 756
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by Hamlet » Post

paramat wrote:It doesn't permanently precipitate, but you can tune it using the parameter in the init.lua file:

Code: Select all

local PRECOFF = -0.4 -- Precipitation offset, higher = rains more often
I've set it to -0.2, that's perfect for me.

Thanks for the tip!
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

User avatar
Otter
Member
Posts: 146
Joined: Fri May 12, 2017 21:17

Re: [Mod] Snow, rain, clouds (with sound) [0.5.1] [snowdrift

by Otter » Post

I am really enjoying the ambiance of this mod. Well done, paramat!

Post Reply

Who is online

Users browsing this forum: Skamiz Kazzarch and 7 guests