[Mod] Weather (Snow, Rain) [weather]

proller
Member
Posts: 222
Joined: Sat Jan 26, 2013 15:22

by proller » Post

Now its uses heat and humidity from core and deside rain-or-snow in lua
melting-freezing now have no hardcoded nodes, anything via groups

User avatar
MirceaKitsune
Member
Posts: 924
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

proller wrote:Now its uses heat and humidity from core and deside rain-or-snow in lua
melting-freezing now have no hardcoded nodes, anything via groups
Sounds good! Are there any screenshots with functional weather yet?

proller
Member
Posts: 222
Joined: Sat Jan 26, 2013 15:22

by proller » Post

i cant make screenshots. but it same as in top of this post.

And better can showed on video, snow-rain area is moving (slowly), water can freeze, ice-snow can melt, ...

try it

User avatar
AndrOn
Member
Posts: 50
Joined: Fri May 31, 2013 22:32
Location: Orléans, France

by AndrOn » Post

Maybe you could enable collision to avoid the problem of the rain inside glass buildings? I wonder also if there is a way to avoid the particles facing the player, it's weird when you look up at the rain. A workaround could be to make rain more like small round drops, this way it wouldn't look bad when you look up.
k8NzxjXgxpd3KOKx8pz2z12pStfpe5tR

User avatar
hassage
Member
Posts: 187
Joined: Sun Apr 14, 2013 17:53
IRC: hassage
In-game: hassage
Location: France

by hassage » Post

Good Idea AndrOn!

playzooki
Member
Posts: 232
Joined: Wed Oct 24, 2012 18:58

by playzooki » Post

make floods
bad signature is bad

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

playzooki wrote:make floods
Place a single water block, that otta do it :p

User avatar
AndrOn
Member
Posts: 50
Joined: Fri May 31, 2013 22:32
Location: Orléans, France

by AndrOn » Post

mauvebic:
playzooki wrote:

make floods
Place a single water block, that otta do it :p
really good idea! Maybe not water sources to avoid the map to be permanently flooded but if it's possible half-filled water flowing blocks that would flow, spread and vanish.
k8NzxjXgxpd3KOKx8pz2z12pStfpe5tR

User avatar
Linxx
Member
Posts: 406
Joined: Wed May 16, 2012 00:37

by Linxx » Post

AndrOn wrote:
mauvebic:
playzooki wrote:

make floods
Place a single water block, that otta do it :p
really good idea! Maybe not water sources to avoid the map to be permanently flooded but if it's possible half-filled water flowing blocks that would flow, spread and vanish.
then enable finite liquids i think that might do it but idk haven't used it.

proller
Member
Posts: 222
Joined: Sat Jan 26, 2013 15:22

by proller » Post

floods when rain and when snow melt already done in my branches.

proller
Member
Posts: 222
Joined: Sat Jan 26, 2013 15:22

by proller » Post

Core support for heat, humidity, leveled nodes merged into master.
now with latests git can try https://github.com/proller/minetest-mod ... ee/weather

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

proller wrote:Core support for heat, humidity, leveled nodes merged into master.
now with latests git can try https://github.com/proller/minetest-mod ... ee/weather
This sounds like something Bas080, Hybrid Dog, and VanessaE can really put to good use.

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

by paramat » Post

I'm working on a lightweight fork of this mod where individual snowflake particles are spawned.
EDIT snowflakes drift southward as clouds do, just a little slower.
Last edited by paramat on Wed Aug 07, 2013 23:22, edited 1 time in total.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

This can be improved. What if weather is locational and not only random.

A big improvement would be that when you walk the particles are spawned a bit in front of the player. That way the particles that are spawned are more visible and are used more effectively. I'm sure you'll figure out how to achieve this.

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

by paramat » Post

Bas080, in my version snow will be dependant on biome.
Last edited by paramat on Fri Aug 09, 2013 01:12, edited 1 time in total.

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

by paramat » Post

Jeija, see useful info on terminal velocity in this thread viewtopic.php?id=2290&p=5

User avatar
Chinchow
Member
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

paramat wrote:I'm working on a lightweight fork of this mod where individual snowflake particles are spawned.
EDIT snowflakes drift southward as clouds do, just a little slower.


http://i.imgur.com/G2wHG2c.png
This is cool but is it possible to make the sky a little less bright to those in a snowy area so that it mimics a snowy day?
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests

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

by paramat » Post

Hmm not sure ... however my snowfall is very light so makes sense in a world with only a few clouds.
Forum member proller is working on more complex weather.

User avatar
Splizard
Member
Posts: 227
Joined: Wed Jan 25, 2012 07:20
GitHub: Splizard
IRC: Splizard
In-game: Splizard
Location: New Zealand
Contact:

by Splizard » Post

Bas080 wrote:This can be improved. What if weather is locational and not only random.

A big improvement would be that when you walk the particles are spawned a bit in front of the player. That way the particles that are spawned are more visible and are used more effectively. I'm sure you'll figure out how to achieve this.
Snow fall in the current version of snow mod, is only spawned in snow biomes.
Games: Builda City, The Hungry Games Mods: Lifters, Snow Biomes and Gates. Also checkout my texture pack Gridtoon!

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

by BrunoMine » Post

I want the snow to accumulate. how to do it?
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

samreenkhud
New member
Posts: 1
Joined: Wed Sep 11, 2013 07:49

by samreenkhud » Post

I will attempt to disseminate all that I have discussed and learned over the last 36 hours.

weather in pakistan
Last edited by samreenkhud on Thu Sep 12, 2013 07:12, edited 1 time in total.

TheFlannelOne
New member
Posts: 3
Joined: Mon Sep 16, 2013 02:02

by TheFlannelOne » Post

I'm getting this error:

21:51:15: ERROR[main]: ServerError: LuaError: error: ...bin\..\mods\minetest-mod-weather-master\weather/rain.lua:16: bad argument #1 to 'add_particlespawner' (number expected, got table)

I'm on windows 7 using minetest-0.4.7-72b9b0f-fixes-win32

The snow works fine. This error only happens when it rains.

sfan5
Moderator
Posts: 4094
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

TheFlannelOne wrote:I'm getting this error:

21:51:15: ERROR[main]: ServerError: LuaError: error: ...bin\..\mods\minetest-mod-weather-master\weather/rain.lua:16: bad argument #1 to 'add_particlespawner' (number expected, got table)

I'm on windows 7 using minetest-0.4.7-72b9b0f-fixes-win32

The snow works fine. This error only happens when it rains.
Update your Minetest version.
Also please note this:
PilzAdam wrote:There are a lot of other people doing win builds now, so I will make my builds on request now. Ask me here or in IRC, I can also make builds of different branches or Minetest forks.
You have too use my or Fess to get new minetest builds
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

sfan5 wrote:
TheFlannelOne wrote:I'm getting this error:

21:51:15: ERROR[main]: ServerError: LuaError: error: ...bin\..\mods\minetest-mod-weather-master\weather/rain.lua:16: bad argument #1 to 'add_particlespawner' (number expected, got table)

I'm on windows 7 using minetest-0.4.7-72b9b0f-fixes-win32

The snow works fine. This error only happens when it rains.
Update your Minetest version.
Also please note this:
PilzAdam wrote:There are a lot of other people doing win builds now, so I will make my builds on request now. Ask me here or in IRC, I can also make builds of different branches or Minetest forks.
You have too use my or Fess to get new minetest builds
Fess's builds are good when ou are using big texture packs and the such because they are 64-bit. IF your computer can handle it.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
MirceaKitsune
Member
Posts: 924
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

by MirceaKitsune » Post

I tested Proller's version of the weather system in the Next branch, and wanted to share my thoughts, the issues I found, and solutions for some of those issues. I already discussed most points with Proller on IRC, but things tend to get lost in chats so I'll also mention them here.

First of all, I absolutely love how precipitation respects the mapgen humidity map, how rain / snow create flowing water or snow blocks, and how water freezes or evaporates based on the temperature map. I watched those in practice today and also looked at the Lua files, and there's little to object to. Only problem I can think of is that flowing water shouldn't appear on flat surfaces and litter them randomly, but only build up in holes or flow over hills. In some aspects I find this a little odd:

Image

My only real problem is the laggy and incorrect particle system, which IMO needs a lot of fixing. Here's my take on each of the issues:

1 - Particle spawners follow the player on the server rather than the client. This not only causes clients with a slow connection to see particle clouds be left behind as they walk, but also wastes a lot of bandwidth. In my opinion, weather cannot be ready until particles are attached to the player client-side, and only updated by the server when needed. Thankfully there's already code for that, but the branch is still waiting in this pull request. Once that change is added to Minetest, this problem should be easy to fix.

2 - Current indoor / outdoor detection system is very fake and obvious. If the player is standing under the clear sky, he sees weather taking place indoor... while if he's in a cave or house, he no longer sees precipitation outside. Me and Proller thought of a solution for this: Having one or more circles of spawners above the player, each spawner detecting if its positioned indoor or outdoor. I asked the Lua team for a formula which can generate a circle of X points in Y radius, and someone wrote one which would provide a perfect fix. Feel free to try it out over here:

Code: Select all

local points = 4
local dist = 10
for i = 1, points do
    print(("( %.2f, %.2f )"):format(math.sin( (math.pi * 2 / points) * i) * dist, math.cos( (math.pi * 2 / points) * i ) * dist))
end
3 - Rain particles should only face the camera horizontally, not vertically (snow is good as it is). If you look forward as it rains, you see the rain fall correctly. But if you look up, you see panels of blue lines coming toward you. Proller said a vertical parameter for particles already exists, so this should be fixed soon.

4 - The player can see particles appearing. Look upward when it rains / snows, and you see how particles spawn right above your head. Their starting point should be much higher... probably at least 25 nodes above the player.

5 - Particles decrease frame rate considerably. In my case, rain or snow seem to bring FPS down to half. Sadly there might be nothing we can do here. Decreasing the amount of particles is not an option, since the current quantity looks correct and any less would be ugly. Only suggestion is making sure there are no performance improvements left undone in particle rendering code, and if so this is something we'll have to live with.

Last suggestion I have on the weather system is adding sounds when it snows or rains. Simply looping the sound files is very easy, although having realistic sound effects (like rain hitting different surfaces) might be trickier. And of course, darkening the sky and thickening fog while it's snowing or raining... but that will require heavier code changes so it's best left for later.

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests