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

Astrobe
Member
 
Posts: 304
Joined: Sun Apr 01, 2018 10:46

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

by Astrobe » Mon Sep 03, 2018 17:11

It stops at this height (actually this is configurable IIRC) in order to avoid the "rain under water" problem. AFAIK, this problem exists because particles do not collide with water.
 

User avatar
acidzebra
Member
 
Posts: 41
Joined: Sun Sep 10, 2017 09:11

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

by acidzebra » Mon Sep 03, 2018 19:57

kestral wrote:https://github.com/kestral246/snowdrift

[...]a list of nearest biome names.


I had a peek at your debug.lua as I'm very interested in biome management; neat! Is there no other way than a manual table to grab a list of active biomes at runtime? Asking because I'm trying to mix multiple mod biomes in a somewhat harmonious way and it would be sweet if I could do a get_registered_biomes call or something like it.
 

kestral
Member
 
Posts: 88
Joined: Mon Mar 27, 2017 21:56
GitHub: kestral246

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

by kestral » Tue Sep 04, 2018 22:22

5.0.0 has minetest.get_biome_data(pos) will give the single closest biome, but I don't know of any other way with 0.4.x.

I found that my scheme didn't correlate 100% with the actual terrain, so for debugging I found it more useful to list all the nearest biomes within a configurable threshhold. I've seen up to four biomes listed with my code, where four biomes meet at a point in the biome map.

I think it was a reference, somewhere in the 21 pages of the mapgen thread, that led me to this scheme. Maybe someone there knows of a better way to do this.

https://forum.minetest.net/viewtopic.php?f=47&t=15272
 

User avatar
grecaandreievich
Member
 
Posts: 11
Joined: Fri Aug 31, 2018 17:35

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

by grecaandreievich » Fri Dec 14, 2018 23:53

Hey, nice mod, the rain sound makes the game more relaxing. :D
Hola, papu.
 

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

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

by paramat » Sun Dec 16, 2018 06:10

Earlier i wrote:
> I could send particle spawners instead and spawn 2 raindrops per light-tested position,

I tried this, sending particle spawners instead of individual particles, but this seemed to cause problems, almost as if the rate of sending particle spawners is limited and i had passed that limit. So for now it remains as individual particles, it's the best i can do at the moment. It's a good idea to keep particle count as low as you can considering how this works.
 

rseguy
New member
 
Posts: 2
Joined: Wed Jan 16, 2019 19:24
In-game: Saphogames

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

by rseguy » Tue Jan 22, 2019 19:38

Is it just happening over a region or the whole map at once? Is the change of weather affecting the entire map or just a specefic region
 

rseguy
New member
 
Posts: 2
Joined: Wed Jan 16, 2019 19:24
In-game: Saphogames

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

by rseguy » Tue Jan 22, 2019 21:58

Also, isn't there a possible way to add a semi transparent image directly in the HUD (For snow and sandstorms) that would slightly reduce the view of the player while he is outside in a storm. Could help the performance by reducing the number of particules to generate and slowly make the image more "opaque" on the side
 

malah
New member
 
Posts: 2
Joined: Tue Jan 08, 2019 22:29

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

by malah » Thu Jan 24, 2019 20:50

is it possible to disable this mod above a certain height?

viewtopic.php?f=11&t=16015&p=340496#p340496
malah wrote:Is it possible to add a option to disable the skybox? I think I have some mod conflicting with it (snowdrift)
Shara wrote:A better approach would be if the mods were compatible. If the issue is weather, do you need weather to be active once you are in space?
paramat wrote:Yes that would be the responsibility of snowdrift to not set the skybox above a certain y.
 

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

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

by paramat » Sat Jan 26, 2019 22:34

> Is the change of weather affecting the entire map or just a specefic region

I hadn't considered that. Currenlty, when it rains/snows, all players see rain/snow as long as they are in areas that allow that rain/snow.
It would be better to use noise to define areas where preceipitation is happening.

> isn't there a possible way to add a semi transparent image directly in the HUD (For snow and sandstorms) that would slightly reduce the view of the player while he is outside in a storm

There is and this has been experimented with 'elsewhere', but it turns out using ground-level cloud (inside which fog is seen) is far more effective at doing this. A semi-transparent screen overlay looks quite bad.

> is it possible to disable this mod above a certain height?

I intend to do that, it was sloppy of me to leave that out.
 

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

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

by paramat » Thu Jan 31, 2019 01:46

Updated. Found and fixed several issues.
Commit message is:

Add y limits for skybox effects, set to deep ocean and cloud level, independent of the set water level where particles and sounds stop.
Add 'skybox' table to track player sky status to attempt to avoid turning off skyboxes set by other mods, therefore remove randomised and lazy setting of skybox, now happens within 0.5s.
For now, remove predicted player position due to issues, to be re-added later acting horizontally only.
 

User avatar
SpaghettiToastBook
Member
 
Posts: 52
Joined: Sun Feb 22, 2015 21:11
Location: The Milky Way
In-game: STB

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

by SpaghettiToastBook » Thu Jan 31, 2019 07:09

Could you make it so that lightning only strikes while it's raining if sofar's lightning mod is present?
Last edited by SpaghettiToastBook on Fri Feb 01, 2019 00:35, edited 1 time in total.
 

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

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

by paramat » Thu Jan 31, 2019 23:31

It's impractical to create that sort of deep compatibility with other weather mods as there are so many and there's no way to choose which to be compatible with. It may also be impossible to be compatible with that mod.
Instead it would be better if i added lightning to this mod.
 

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

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

by voxelproof » Fri Feb 01, 2019 11:11

paramat wrote:It's impractical to create that sort of deep compatibility with other weather mods as there are so many and there's no way to choose which to be compatible with. It may also be impossible to be compatible with that mod.
Instead it would be better if i added lightning to this mod.


Apart from this, lightning actually needs storm clouds and not necessarily rain to strike.
Game is the essence of life; therefore every good game makes life better.
 

Astrobe
Member
 
Posts: 304
Joined: Sun Apr 01, 2018 10:46

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

by Astrobe » Fri Feb 01, 2019 17:15

Paramat, Sofar's lightning mod has an issue in this context: it picks a player at random for the lightning strike, without regard to the local weather conditions. You'll have to modify it so that the strike() function takes a position parameter (around where to strike).
 

User avatar
SpaghettiToastBook
Member
 
Posts: 52
Joined: Sun Feb 22, 2015 21:11
Location: The Milky Way
In-game: STB

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

by SpaghettiToastBook » Fri Feb 01, 2019 18:56

Astrobe wrote:Paramat, Sofar's lightning mod has an issue in this context: it picks a player at random for the lightning strike, without regard to the local weather conditions. You'll have to modify it so that the strike() function takes a position parameter (around where to strike).

The strike function does take a position argument.
 

Astrobe
Member
 
Posts: 304
Joined: Sun Apr 01, 2018 10:46

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

by Astrobe » Fri Feb 01, 2019 20:37

Ah! Oh! I worked from half-erased memory.

strike() does indeed take an argument, but:
- if you don't give one, it will pick around a random player but (usually) won't strike them directly,
- if you do give one, it will strike exactly at that position, no randomization (so static players are guarantied to get fried)

What I did is: move the three lines at the end of the if pos then after the end, so that the position is randomized in both cases.

Another thing to note is that the node doesn't perform protection checks.
 

grey
Member
 
Posts: 22
Joined: Fri Jan 03, 2014 18:51

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

by grey » Wed Jun 26, 2019 02:00

I just tried this and I really like it! It sounds pretty and the rain itself looks likes. I installed it and it works. But:

* It just seems to rain 24/7 without ever changing.
* The instant I go under another object it stops raining. When I go out again the rain starts back up.
 

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

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

by paramat » Mon Jul 01, 2019 23:39

Code: Select all
local PRECTHR = 0.2 -- Precipitation noise threshold, -1 to 1:
               -- -1 = precipitation all the time
               -- 0 = precipitation half the time
               -- 1 = no precipitation
local FLAKLPOS = 32 -- Snowflake light-tested positions per 0.5s cycle

The default settings in init.lua are for precipitation less than half the time, you can alter this to your taste.
You can also alter the time scale for the weather changes.

> The instant I go under another object it stops raining. When I go out again the rain starts back up.

Yes it's silly but it's quite hard to improve the behaviour. See the discussion and the forks for alternative behaviours.
 

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

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

by SAMIAMNOT » Wed Jul 17, 2019 20:44

Also if you're under a cloud that's not moving it won't stop raining ;)
I test mines.
 

User avatar
FreeGamers
Member
 
Posts: 504
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

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

by FreeGamers » Thu Jul 18, 2019 11:39

Is it not recommended to run this on a server with multiple players?

I noticed there are many more packets sent with this mod active and the snow/rain seemed to apply to all players at one time regardless of where they were.

Is this the current typical behavior or did I goof somewhere?

Are there any recommended weather mods for dedicated servers?
 

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

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

by paramat » Sun Jul 28, 2019 22:39

The network traffic is a problem yes because this mod has to spawn every particle individually using the 'add particle' API, instead of using the 'add particle spawner' API which runs the particale spawner clientside.
How this works really isn't ideal but this is due to current engine limitations.
It's highly recommended to only use this for light rainfall, minimising the number of particles is a very good idea.
 

User avatar
FreeGamers
Member
 
Posts: 504
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

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

by FreeGamers » Mon Jul 29, 2019 00:49

paramat, its OK,thanks for responding. I took some more time to play around with the settings yesterday and I was able to get the network and CPU/GPU usage to be fairly efficient. I'm using a version of the mod edited by Piezo_ that works with their rain-barrel mod but its mostly the same.

Setting "spawner_density" equal to 3 really helped reduce network usage. I found it was the lowest I could set the amount of particle spawners down to that had the rain spawning areas to be accurate enough for immersion without too many breaks in the rain coverage.

CPU/GPU usage was heavily affected by DROPLPOS, or the number of raindrops spawned. I set this to 128 for users with low end hardware, I tested this on a few laptops with integrated graphics. One was from 2013 with Intel HD4000 and one from 2017 with UHD620, they performed well at this amount of particles. I would have liked it to be around 256 or 512, as I like heavy rain. I even tried 1028 and at one point, and stressed once with 4096, lol.

I set the radius to 24 blocks, 16 felt a bit too limited. 32 was neat but made the rain drops too thin over a larger area.

This was a happy medium between network, cpu/gpu, and the effect itself.

+ Spoiler
 

kestral
Member
 
Posts: 88
Joined: Mon Mar 27, 2017 21:56
GitHub: kestral246

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

by kestral » Wed Dec 18, 2019 18:01

I updated my snowdrift mod.
I've now been able to make six of this mod's abrupt transitions smoother.

Question
Is it possible to disable your new weather mod from within my mod? In 5.2dev, my clouds were glitching until I manually set enable_weather to false.

I guess it's not good to have multiple mods setting conflicting cloud densities.
 

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

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

by paramat » Wed Dec 18, 2019 19:53

https://github.com/minetest/minetest_game/blob/f176ba4873ee2b0e6040842b51a92b88132d5648/settingtypes.txt#L77
Hmm i forgot to add this to the 'minetest.conf.example' file.
I am fairly sure there is a way to set a minetest.conf parameter in mod code.
 

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

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

by ErrorNull » Sun Feb 02, 2020 19:44

kestral wrote:I updated my snowdrift mod.
I guess it's not good to have multiple mods setting conflicting cloud densities.


yes. i asked this same question in the modding discussion page and got some good answers here.
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 43 guests