[Mod] Snowfall, rainfall, settling snow [0.4.0] [snowdrift]

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

[Mod] Snowfall, rainfall, settling snow [0.4.0] [snowdrift]

by paramat » Wed Aug 07, 2013 23:46

Image


Download https://github.com/paramat/snowdrift/archive/master.zip rename mod folder to 'snowdrift'
Browse code https://github.com/paramat/snowdrift

For Minetest 0.4.12 and later
Depends default
Licenses: code WTFPL, textures CC BY-SA

Mapgen is auto-detected so the mod is compatible with mgv5, mgv6 and mgv7.
Overcast snow cloud appears (abruptly) during snowfall, it's darkness smoothly varies during the transitions between day and night.
Adjust the snowflake density with parameter 'FLAKES' according to the power of your computer.
By default snowfall is constant in snow biomes, vary parameters 'PRECTHR' and 'PRECSPR' to control the coming and going of snowfall with time.
Thr brightness of the overcast day and night skies can be set with parameters 'DASVAL' and 'NISVAL'.
Snowfall stops when the player is undercover, this is to avoid snowfall passing through buildings when the player is inside, necessary because for performance collision detection is disabled for particles.


Image
Last edited by paramat on Fri Sep 04, 2015 04:16, edited 10 times in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Aug 08, 2013 22:14

Do you also have a "light rain" equivalent?
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Fri Aug 09, 2013 01:17

That is possible, as is sandstorms in deserts, i released this early as only snow but may add more, i know how to detect current biome in MGV6 so can restrict each type of weather to a suitable biome.
Anyone else want rain and possibly sandstorms?
Last edited by paramat on Fri Aug 09, 2013 03:50, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Fri Aug 09, 2013 01:51

paramat wrote:I assume you would like this feature? That is possible, as is sandstorms in deserts, i released this early as only snow but may add more, i know how to detect current biome in MGV6 so can restrict each type of weather to a suitable biome.
Anyone else want rain and possibly sandstorms?
Me! :-)
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Fri Aug 09, 2013 19:21

Just can't get inspired to work on light rain (drizzle mod ... the excitement), the only rain i care for is heavy with thunder, and that will not look right under a fairly clear sky. This mod will remain snow only.
I am however in love with particles (ooer) and will continue to experiment in seperate mods, might still try sandstorms.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Mon Aug 12, 2013 06:52

Version 0.1.2 released.
Last edited by paramat on Mon Aug 12, 2013 06:52, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
fairiestoy
Member
 
Posts: 191
Joined: Sun Jun 09, 2013 19:25

by fairiestoy » Mon Aug 12, 2013 22:10

First of all, great work. I like your environment affecting mods especially the realms.
But i have a question. Does it make any difference in peformance if i replace the lines 39 to 78 with a while statement and using minetest.after() instead of globalsteps? Instead of performing a random number generation every step and maybe do nothing just perform a random number generation for the next calculation by pushing that value to minetest.after()?

Keep up that great work
Interesting about new things is, to figure out how it works ...
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Tue Aug 13, 2013 06:03

Thanks, i'll look into your suggestion, i'm really not much of a programmer and have never used while and minetest.after(), so nows the time to learn :)
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Tue Aug 13, 2013 17:44

Okay unless i have misunderstood, your suggestion does reduce calculations by perhaps 1 but the speed improvement will be unnnoticeable, barely worth the effort.
Last edited by paramat on Tue Aug 13, 2013 17:46, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

by philipbenr » Tue Aug 13, 2013 17:56

I tried Jeija's rain and snow mod, and it messed up my world, so that placing blocks was really really hard. I would place blocks, and then they would disappear. It would take me 4 or 5 tries to actually place a block down while it was raining or snowing... does your mod do this too?
"The Foot is down!"
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Tue Aug 13, 2013 22:03

That sounds like lag caused by the large amounts of processing in Jeija's mod, this is partly why i wrote this mod as a 'light' version. No offence meant to Jeija but his code is very processing-heavy.
My mod does not cause this much lag, if you do get lag you can reduce parameter MAXCHA, default is 0.5, if you want heavier snow try 1.0.
Try it and see! ;)
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

by philipbenr » Tue Aug 13, 2013 23:41

ok then. :) sounds good to me.
"The Foot is down!"
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Wed Aug 14, 2013 00:35

Let me know how you get on.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
fairiestoy
Member
 
Posts: 191
Joined: Sun Jun 09, 2013 19:25

by fairiestoy » Wed Aug 14, 2013 19:09

paramat wrote:Okay unless i have misunderstood, your suggestion does reduce calculations by perhaps 1 but the speed improvement will be unnnoticeable, barely worth the effort.


The while statement was more of a suggestion reduce the lines and saves you some typing ( yeah i know, copy&paste exists, however ). Sad that the minetest.after() didnt have more effect. Thanks for the feedback of that suggestion :)
Interesting about new things is, to figure out how it works ...
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Sun Jan 19, 2014 07:39

Version 0.2.0 with rain, new screenshot in first post.
Currently it snows or rains continuously within each defined perlin noise area, i am working on making precipitation intermittent.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Tue Jan 21, 2014 03:08

Version 0.2.3 with settling snow! excitement! Info, new screenshots in first post.
A good way to add snow to previously generated chunks of a world (perhaps i should add a height threshold too ...)
Intermittent snowfall and rainfall is coming soon.
Last edited by paramat on Tue Jan 21, 2014 03:15, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

Evanleo
New member
 
Posts: 2
Joined: Tue Jan 21, 2014 14:44

by Evanleo » Tue Jan 21, 2014 14:47

it seems like a good mod...but i do not know how to up load a mod the the game
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Jan 21, 2014 15:25

Be sure you first turn dirt-with-grass into dirt-with-snow as a first step, before causing a snow node to form on top -- that way it can form snow "under" say wild grass and other small plants that grow on dirt with grass.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Tue Jan 21, 2014 21:13

Evanleo wrote:it seems like a good mod...but i do not know how to up load a mod the the game


Click the download link. Go to downloads. Select the mod (snowdrift-master.zip). Unzip it in a minetest folder called mods. Rename it to snowdrift. Start minetest. Create/select a world in the minetest menu. Click Configure. Select snowdrift. Check (click) the box before enabled. Press save. Start the world.

This should work for most mods.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Wed Jan 22, 2014 05:57

Version 0.2.4.
Snow/rainfall is triggered by the OS clock and perlin noise, it is no longer continuous. Parameters control shower length and rarity.
Plants have the dirt_with_grass beneath them changed to dirt_with_snow.
New raindrop texture, not yet shown in screenshots.
Bugfixes and code improvements.
Last edited by paramat on Wed Jan 22, 2014 05:59, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Jan 23, 2014 00:14

Ok, let's give this another run then :-) Installed on three servers, with the following settings changes:

SCALP = 1
RAIN = true
PRET = -0.5

(because I want the rain/snow to be fairly prodigious if I can make it so without driving up CPU usage :-) )

Not actually seeing much so far, but a little here and there. I do *not* have the snow biomes mod installed.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Thu Jan 23, 2014 01:13

Rainfall is too light by default, try DROPS = 16 or even 32.
You can also increase PPPCHA a bit for heavier snow, try 0.2 or 0.3.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Jan 23, 2014 01:33

ok, I've set those for 32 and 0.3, respectively. I'll put those into effect in a little while, the servers are a bit busy with players at the moment.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Thu Jan 23, 2014 01:57

Hm i must remember particles are client side ... best to keep DROPS = 16, PPPCHA = 0.1 otherwise your players' FPS might really suffer.
Also the default humidity threshold HUT is too high, it only rains in small aeas of map, best to lower that.
It will rain in deserts, i'm working on that, if i add noise offset parameters it will be possible to use MGV6 desert noise params as the humidity noise params.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Jan 23, 2014 02:00

Ok, DROPS is 16, PPPCHA reverted to the default of 0.1, HUT is turned down to 0.2. I'd recommend the noise/humidity params you suggested - I use this same method in plants_lib for the mgv6 humidity map, and for the same reason. :-)
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
alps21
New member
 
Posts: 1
Joined: Thu Jan 23, 2014 01:50

by alps21 » Thu Jan 23, 2014 02:11

hey at some would you think of possibly creating tornados or tsnuami efects
oh and sory if this was already suggested i havent taken time to read comments
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Thu Jan 23, 2014 02:18

The settling of snow is server side so you could increase SETCHA if you want, perhaps double it? It looks unbalanced with the snowfall though if increased too much. Rain is WIP next version i'll stop the rain in deserts.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Jan 23, 2014 12:02

The current settings (not including your suggested change to SETCHA) seem to be working pretty well, at least server-side. I'm standing in the middle of a snowfall with dozens of particles around me, and I see no appreciable effect on CPU usage (it's floating at close to 15%, which is around what I should see at this moment).

The length of time that the snow falls, and the size of the area in which it falls, and the snow accumulating on the ground, are perfect! The only question now is ramping up just how many particles are falling at their peak.

As for snow on deserts, it's okay to allow rain and snow to fall and accumulate on deserts, as this does happen on occasion in real life, just don't let it fall/accumulate in the middle of a huge desert is all.

Oh, one other thing: don't change any of the current variable names or their default settings - I don't wanna have to rewrite my buildbot scripts ;-)
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

gsmanners
Member
 
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Thu Jan 23, 2014 22:22

Maybe it's just my computer, but this mod with snow falling, it sends my frame rate down about 30% lower than what I'm used to. I need settings for something like a low end machine (weather = false, I guess).
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Fri Jan 24, 2014 01:05

Uh ... the raindrops seem big and too slow, they're not meant to be realistic but cute, i'll try a 4x4 pixel drop and see how it looks. These fall at 8m/s which is normal for a large raindrop, perhaps it looks slow for a ball-sized object.

VanessaE,
> don't change any of the current variable names or their default settings
:D funny
I wont change the existing variable names, default settings will certainly change best be prepared for that.

gsmanners, try reducing parameter PPPCHA slightly, this controls snowfall heaviness, number of particles.
To compensate that you can create the illusion of more snow by reducing the area they spawn over ...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.add_particle(
                {x=pposx-32+math.random(0,63), y=pposy+16, z=pposz-16+math.random(0,63)}, -- posi

Edit the first line of each add particle statement to that, i might even make this default. The disadvantage is that when walking at 4m/s you might out-walk the snowfall before it gets down to your level.
Last edited by paramat on Fri Jan 24, 2014 01:10, edited 1 time in total.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 19 guests

cron