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

John_Constructor
Member
Posts: 76
Joined: Thu Jun 01, 2017 20:06
GitHub: John-Constructor
In-game: Nooberton
Location: On Minetest 24/7

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

by John_Constructor » Post

Tried it out, I must say it works quite nicely, 10/10! May I suggest that rain/snow stopping when inside has a setting to be enabled/disabled?
Constructing mechs and wingless aircraft since 2016.

User avatar
Otter
Member
Posts: 152
Joined: Fri May 12, 2017 21:17
GitHub: InfiniteOtter
In-game: Otter

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

by Otter » Post

John_Constructor wrote:Tried it out, I must say it works quite nicely, 10/10! May I suggest that rain/snow stopping when inside has a setting to be enabled/disabled?
A high roof will still allow for rainfall and rain just shuts off when you go under a tree. This mod is far from perfect, but I like it enough to almost always have it installed.

User avatar
paramat
Developer
Posts: 3700
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

New screenshots in first post.

User avatar
Scarecrowman
Member
Posts: 40
Joined: Sun Nov 19, 2017 14:48
In-game: Scarecrowman
Location: The Ranch, S4, on a secure government computer...

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

by Scarecrowman » Post

I couldn't even get the other weather mod installed.

Like this one so far, but is there a way to call the snow or rain via a command?
"Those who dream by day are cognizant of many things that escape those who only dream at night..."
-EDGAR ALLAN POE

User avatar
paramat
Developer
Posts: 3700
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

No, but if necessary you can cause constant precipitation by altering parameters in the init.lua file.
By default it will not precipitate in deserts.

User avatar
Scarecrowman
Member
Posts: 40
Joined: Sun Nov 19, 2017 14:48
In-game: Scarecrowman
Location: The Ranch, S4, on a secure government computer...

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

by Scarecrowman » Post

paramat wrote:No, but if necessary you can cause constant precipitation by altering parameters in the init.lua file.
By default it will not precipitate in deserts.
Ah yes! I was able to adjust these to get a more constant snowfall. And no rain!

Well done, Paramat!! This version really should be next to the weather mod on the main site's mod list.
"Those who dream by day are cognizant of many things that escape those who only dream at night..."
-EDGAR ALLAN POE

User avatar
paramat
Developer
Posts: 3700
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

Also, the number of drops or flakes is set very low, i find these can be quadrupled without issues on a mid-power machine.

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

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

by burli » Post

I really wonder how Minecraft is doing this. Even in Beta 1.8.1 they have better rain without much performance issues.

https://youtu.be/WlMyxp-BKyg?list=PLC96 ... 7D634&t=27

If he walks up the stairs you can see the rain at the end of the staircase. Not instantaneously, but far in the distance

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

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

by burli » Post

A few suggestions to make this mod a bit more realistic (if your PC can handle it).

Set the YLIMIT to -10 or less
Set the number of drops to 256 or even 512 and collide = true
Disable the outside check in line 108 simply by set it to true (remove get_node_light)
Increase the height in line 177 to 10 or even more, depending on your highes room
And IMHO most important: set the y velocity in line 182 to -15.0 or even -20 because the raindrops look unrealistic slow. The default value is set to the gravity, but raindrops have more than 10m to accelerate.

I also add some random to the particle spaw position because the always hit the center of a node. My add_particle function looks now like this

Code: Select all

							pos = {
								x = pposx - 12 + math.random() * 24,
								y = pposy + 15 + math.random() * 10,
								z = pposz - 12 + math.random() * 24
							},
							vel = {
								x = 0.0,
								y = -20.0,
								z = 0.0
							},
Parameters are

Code: Select all

-- Parameters

local YLIMIT = -10 -- Set to world's water level or level of lowest open area,
				-- calculations are disabled below this y.
local PRECSPR = 6 -- Time scale for precipitation variation in minutes
local PRECOFF = -0.4 -- Precipitation offset, higher = rains more often
local GSCYCLE = 0.5 -- Globalstep cycle (seconds)
local FLAKES = 16 -- Snowflakes per cycle
local DROPS = 512 -- Raindrops per cycle
local RAINGAIN = 0.2 -- Rain sound volume
local COLLIDE = true -- Whether particles collide with nodes
local NISVAL = 39 -- Clouds RGB value at night
local DASVAL = 175 -- Clouds RGB value in daytime
And works pretty well

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

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

by burli » Post

Also a suggestion for the snow particle spawner. I set the number of flakes to 64

Code: Select all

							pos = {
								x = pposx - 32 + math.random(0, 64),
								y = pposy + 15 + math.random(0, 5),
								z = pposz - 32 + math.random(0, 64)
							},
							vel = {
								x = (math.random() - 0.5) * 3,
								y = -4.0 + (math.random() - 0.5) * 3,
								z = (math.random() - 0.5) * 3
							},

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

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

by burli » Post

Made some more modifications ;-)

https://youtu.be/vbXcG6DDc_8

User avatar
Scarecrowman
Member
Posts: 40
Joined: Sun Nov 19, 2017 14:48
In-game: Scarecrowman
Location: The Ranch, S4, on a secure government computer...

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

by Scarecrowman » Post

burli wrote:Made some more modifications ;-)

https://youtu.be/vbXcG6DDc_8
Looks great, Burli!
"Those who dream by day are cognizant of many things that escape those who only dream at night..."
-EDGAR ALLAN POE

Elderking1986
New member
Posts: 2
Joined: Thu Nov 30, 2017 21:44

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

by Elderking1986 » Post

Hi I'm new here.

I'm having an issue enabling this mod. I'm using Minetest 0.4.15 from the Debian repositories. I get this error while trying to enable this mod for my world:
Failed to enable mod "snowdrift-master" as it contains disallowed characters. Only characters [a-z0-9_] are allowed.
Is there a way to fix this? I've searched through the mod but couldn't find anything obvious.

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

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

by GreenXenith » Post

Elderking1986 wrote:Hi I'm new here.

I'm having an issue enabling this mod. I'm using Minetest 0.4.15 from the Debian repositories. I get this error while trying to enable this mod for my world:
Failed to enable mod "snowdrift-master" as it contains disallowed characters. Only characters [a-z0-9_] are allowed.
Is there a way to fix this? I've searched through the mod but couldn't find anything obvious.
Welcome, then :)

Many new users are tripped up by this problem, all you need to do is remove the `-master` from the file name (this applies to any mod downloaded from GitHub, it adds a `-master` to the file). Notice the `[a-z0-9_]` in the error message which means "a thru z, 0 thru 9 and _", not including the `-`. So any modname with a `-` shouldn't work :)
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
paramat
Developer
Posts: 3700
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

burli the video is beautiful. This mod has a lot of room for improvement, i've just been busy.

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

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

by burli » Post

paramat wrote:burli the video is beautiful. This mod has a lot of room for improvement, i've just been busy.
It is more like a proof of concept and I squeezed the last performance out of my PC. I hope the performance issues with particles will be fixed soon, than we can make better weather mods.

This is a compromise of effect and performance. With the current settings it is possible that it is raining or snowing in tall buildings or caves. The particle spawner need to be much higher and the area should be bigger.

I moved the center of the spawning plane ahead of the player. The effect is better in view direction. Especially the snow is a problem because it takes a while until he fills the area, but I don't want to make him faster. I think, the current speed is good. In fact, the speed and direction varies from flake to flake.

I will push it to github soon, but maybe I will add some more effects and try to optimize it as good as possible


User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

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

by voxelproof » Post

burli wrote:Made a fork
https://github.com/MarkuBu/snowdrift
Great... Thanks. I thought nothing may surprise me in Minetest any more, but I was obviously wrong. This tuning is indeed extraordinarily impressive.
To miss the joy is to miss all. Robert Louis Stevenson

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

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

by burli » Post

voxelproof wrote:This tuning is indeed extraordinarily impressive.
Thanks

I forgot to mention that the FLAKES parameter has no effect. I pushed an update that fixes that. But now FLAKES is a decimal number 0..1. Default is 0.2, but if it is too much for your PC you need to reduce to maybe 0.1 or less

It is the percentage of total DROPS

EDIT: and you should set PRECSPR to 6 and PRECOFF to maybe 0.2. I set these values to continuous rain ;-)

Elderking1986
New member
Posts: 2
Joined: Thu Nov 30, 2017 21:44

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

by Elderking1986 » Post

GreenDimond wrote:
Elderking1986 wrote:Hi I'm new here.

I'm having an issue enabling this mod. I'm using Minetest 0.4.15 from the Debian repositories. I get this error while trying to enable this mod for my world:
Failed to enable mod "snowdrift-master" as it contains disallowed characters. Only characters [a-z0-9_] are allowed.
Is there a way to fix this? I've searched through the mod but couldn't find anything obvious.
Welcome, then :)

Many new users are tripped up by this problem, all you need to do is remove the `-master` from the file name (this applies to any mod downloaded from GitHub, it adds a `-master` to the file). Notice the `[a-z0-9_]` in the error message which means "a thru z, 0 thru 9 and _", not including the `-`. So any modname with a `-` shouldn't work :)
Sorry for the late reply. I didn't get an email and I don't check these forums too often. Thanks for the help. I'll try that. I'm kinda surprised I didn't catch that.

User avatar
paramat
Developer
Posts: 3700
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

> I moved the center of the spawning plane ahead of the player

Good idea.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

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

by Fixer » Post

You can always backport good stuff back into main repo ;)

User avatar
paramat
Developer
Posts: 3700
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

I plan to.

Version 0.5.2
Update deprecated 'acc','vel'. 12 new 5x5 snowflake textures. Time particles to disappear at water level. Randomise snowflake XZ velocities.
More particles.
New screenshot of snow in first post.

User avatar
Otter
Member
Posts: 152
Joined: Fri May 12, 2017 21:17
GitHub: InfiniteOtter
In-game: Otter

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

by Otter » Post

This mod seriously makes the game feeling a more rich experience. Personally, I would love it if the weather was added to Minetest Game and dropped back to about a tenth as likely so it is a surprise but not a regular constant. Having two or three rainy or over cast days in a row should still happen but more seasonally than regularly.

I usually disable fog when I am not going for the visual effects, but fog shrouded mountains, fog over streams and lakes and foggy mornings are delightful in real life.

But I suppose you would have to take this up with the person in charge of Minetest Game. Switching hats can be stressful and I know the motives and goals can be different. While you are wearing the other hat, Paramat, Pine usually grows in deep sandy soil. Deep sand makes for tall pines.

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

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

by paramat » Post

Version 0.6.0 released.

Inspired by the ideas of others who have worked on this, i have removed the weird behaviour of precipitation stopping when the player is undercover.
I have made each particle check being under open sky (light == 15) to spawn, and collision detection is on. Now particles don't pass through objects and precipitation continues outside when the player is undercover.
It's a big improvement, more intensive but worth it.

Also included is more parameters and player position prediction from a pull request by lhofhansl.
Last edited by paramat on Tue Jul 24, 2018 18:37, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests