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

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

by jojoa1997 » Fri Oct 11, 2013 18:08

About the flowing water collecting using the RL liquid setting would solve the problem.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

by MirceaKitsune » Fri Oct 11, 2013 23:51

An addition to my previous post: I thought of an even better way to fix points #2 and #4. What if a single particle spawner could follow the player horizontally (X and Z axes) but stay at cloud level vertically (Y axis)? Rain would always start at the correct height, and the delay precipitation has before reaching the ground would also be simulated.

Particles would need to use collision detection in this case, and die the moment they hit a surface, to avoid weather indoor. Collisions already exist, but I'm not sure about the dying part. Also, particles would start from very high up, so a draw distance limit is needed to avoid butchering performance.
Last edited by MirceaKitsune on Fri Oct 11, 2013 23:53, edited 1 time in total.
 

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen

by BlockMen » Sat Oct 12, 2013 11:30

MirceaKitsune wrote:An addition to my previous post: I thought of an even better way to fix points #2 and #4. What if a single particle spawner could follow the player horizontally (X and Z axes) but stay at cloud level vertically (Y axis)? Rain would always start at the correct height, and the delay precipitation has before reaching the ground would also be simulated.

Particles would need to use collision detection in this case, and die the moment they hit a surface, to avoid weather indoor. Collisions already exist, but I'm not sure about the dying part. Also, particles would start from very high up, so a draw distance limit is needed to avoid butchering performance.


I tried that already and it kinda sucks, because of the "dying part". Sometimes the rain particles dont even reach the ground or they lie on the ground for seconds until they disapear. Furthermore it needs smaller particles (to look correct) than this mod uses and that drops the framerate or to be more precise: It makes the game unplayable for an average pc.
 

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

by MirceaKitsune » Sat Oct 12, 2013 12:09

BlockMen wrote:I tried that already and it kinda sucks, because of the "dying part". Sometimes the rain particles dont even reach the ground or they lie on the ground for seconds until they disapear. Furthermore it needs smaller particles (to look correct) than this mod uses and that drops the framerate or to be more precise: It makes the game unplayable for an average pc.


Yeah, the current collision system does that. Particles need precise code to die when they touch a surface. Smaller particles would make frame rate a lot worse, but I don't think they'd be needed for this.

I honestly wonder how MineCraft achieved its own weather system. It doesn't seem to use a particle spawner, but rather a scrolling texture at the position of each node (similar to our drawtype-plantlike). Lots more detail, realism, and no noticeable performance drop!

[spoiler]Image[/spoiler]
 

User avatar
webdesigner97
Member
 
Posts: 1325
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sat Oct 12, 2013 14:05

So you mean weather could be a none-walkable transparent node with animated texures? Interesting...
 

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen

by BlockMen » Sat Oct 12, 2013 14:20

webdesigner97 wrote:So you mean weather could be a none-walkable transparent node with animated texures? Interesting...


AFAIK thats the way how MC does weather...the main problem with that is that it takes time to replace the nodes and that you need a good "room"-detection to prevent raining in houses, caves, etc.

Maybe the speed problem can be solved by using VoxelManip?
 

User avatar
webdesigner97
Member
 
Posts: 1325
Joined: Mon Jul 30, 2012 19:16
Location: Bergisch Gladbach, Germany
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sat Oct 12, 2013 17:11

Maybe yes. But room detection would be harder...
 

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

by MirceaKitsune » Sat Oct 12, 2013 17:18

webdesigner97 wrote:So you mean weather could be a none-walkable transparent node with animated texures? Interesting...


Yep. This would have worked if it were possible to visually replace the appearance of air nodes located outside, preferably without changing their node type permanently. Certainly such would require code modifications in Minetest, but should be possible.
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Sat Oct 12, 2013 17:21

Didn't somebody already write a proof of concept mod that changed air to a "rain node" with an animated texture?
 

User avatar
VanessaE
Moderator
 
Posts: 4468
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sat Oct 12, 2013 21:26

Seems to me that if you start at the sky and replaced the air in 1x1m *columns* rather than large blocks, working your way downward and always stopping each individual column at the first non-air node, you'd get a correct and easy-on-the-CPU result.

That part would be almost trivial. The real trick would be making the precipitation track the movement of the clouds. :P

You would probably want to make exceptions to the stop rule, where clearly the precipitation should logically pass through.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
 

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

by MirceaKitsune » Sat Oct 12, 2013 22:09

VanessaE wrote:Seems to me that if you start at the sky and replaced the air in 1x1m *columns* rather than large blocks, working your way downward and always stopping each individual column at the first non-air node, you'd get a correct and easy-on-the-CPU result.

That part would be almost trivial. The real trick would be making the precipitation track the movement of the clouds. :P

You would probably want to make exceptions to the stop rule, where clearly the precipitation should logically pass through.


I assumed that replacing air blocks in a vertical line for each node would gore the CPU... even with the voxel manipulator. The replacement would need to be done in landscapes hundreds of nodes wide, from a cloud height of 120 nodes. So tens of thousands of blocks would need to be changed in a second, while also scanning for solid nodes each time to know when to stop. Even if the CPU can handle it, delays caused by lag could temporarily cause bits of rain to be left floating around in mid air. There would also be so many surfaces to draw :o

Personally, I suggest a special kind of drawable being coded into the client for this. It would create an X shaped mesh consisting of two surfaces (like drawtype-plantlike) per node horizontally. Vertically however, it would stretch from the cloud height down to the first solid node. A server Lua function should be used to trigger the effect, in a form such as: minetest.set_weather(start_corner, end_corner, height, texture). There might be even better possibilities than this idea however.
 

User avatar
VanessaE
Moderator
 
Posts: 4468
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sat Oct 12, 2013 22:14

You can do this now by making a single node with inordinately tall nodebox coordinates. The texture will tile along the height. Alternatively, you may be able to use the plantlike draw type with a visual_scale setting of something insanely tall also.

I'm not sure what the height limit is, but it may be worth a try.

Then you'd just need nodes at the surface instead of whole columns.

Besides, I was thinking that columns (or single nodes) would be "turned on/off" gradually, one at a time.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
 

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

by MirceaKitsune » Sat Oct 12, 2013 22:25

VanessaE wrote:You can do this now by making a single node with inordinately tall nodebox coordinates. The texture will tile along the height. Alternatively, you may be able to use the plantlike draw type with a visual_scale setting of something insanely tall also.

I'm not sure what the height limit is, but it may be worth a try.

Then you'd just need nodes at the surface instead of whole columns.

Besides, I was thinking that columns (or single nodes) would be "turned on/off" gradually, one at a time.


That's a good idea, I thought about it actually. We could only change the nodes at cloud level, and have them use drawtype_plantlike with a huge length stretching downward. But there are several reasons why I think this is sadly impossible:

First of all, I remember the size of drawtype_plantlike is specified in the node definition itself. So you couldn't make multiple instances of a node called "rain" or "snow" have different lengths. One would have to define hundreds of nodes, one for each scale. Not sure if node levels work.

Even if that was doable, cloud level is pretty high up. It's possible that the area has not been loaded. You probably can't spawn nodes in an inactive chunk, and even if so the node might get hidden by draw distance (considering its center is up there).
 

User avatar
VanessaE
Moderator
 
Posts: 4468
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sun Oct 13, 2013 15:21

I was thinking of the nodes being placed at the surface where the rain/snow is landing, rather than at cloud level. Of course like you said, that doesnt handle the issue of stopping the precip at cloud height.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
 

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

by MirceaKitsune » Sun Oct 13, 2013 15:47

VanessaE wrote:I was thinking of the nodes being placed at the surface where the rain/snow is landing, rather than at cloud level. Of course like you said, that doesnt handle the issue of stopping the precip at cloud height.


Yeah, that would have issues too. For example, what if you're flying right below cloud height and the nodes at ground level aren't loaded?
 

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

by paramat » Sat Nov 02, 2013 07:11

MirceaKitsune wrote: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.

Until then this can be solved by drawing rain droplets as spheres instead of elongated lines, this will also increase visibility in rain = make it less annoying.
Perhaps i will release a 'light rain / raindrift' mod that will have 1 particle per rain droplet, with rain triggered by high humidity and temperature ... might combine it with snowdrift mod ...
Last edited by paramat on Sat Nov 02, 2013 07:12, edited 1 time in total.
 

User avatar
Silent-Hunter
Member
 
Posts: 30
Joined: Wed Nov 06, 2013 20:06

by Silent-Hunter » Wed Nov 06, 2013 23:35

Any idea why this might happen?:

Code: Select all
GUIConfigureWorld: Not allowing focus change.
18:30:51: ERROR[main]: mod "digilines_inventory" has unsatisfied dependencies:  "require"
[moreores] loaded.
[Mod] Memorandum [0.0.9] [memorandum] Loaded...
[Mod] Inventory Tweak _loaded
[Plantlife Library] Loaded
[Moretrees] Loaded (2013-02-11)
[Mod] Ferns [0.1.2] [ferns] Loaded...
[Poison Ivy] Loaded.
[Junglegrass] Loaded.
[Flowers] Loaded.
[Bushes] Loaded.
[OK] Mesecons
Pipeworks loaded!
18:30:51: ACTION[main]:         .__               __                   __   
18:30:51: ACTION[main]:   _____ |__| ____   _____/  |_  ____   _______/  |_
18:30:51: ACTION[main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
18:30:51: ACTION[main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  | 
18:30:51: ACTION[main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__| 
18:30:51: ACTION[main]:       \/        \/     \/          \/     \/       
18:30:51: ACTION[main]: World at [/home/silent/.minetest/worlds/Original_Home]
18:30:51: ACTION[main]: Server for gameid="minetest" listening on port 30000.
creative inventory size: 489
18:30:51: ACTION[ServerThread]: Silent-Hunter joins game. List of players: Silent-Hunter
Font size: 8 16
18:31:16: ACTION[ServerThread]: Silent-Hunter leaves game. List of players:
18:31:16: ERROR[main]: ServerError: LuaError: error: /home/silent/.minetest/mods/weather/weather/rain.lua:16: bad argument #1 to 'add_particlespawner' (number expected, got table)
18:31:16: ERROR[main]: stack traceback:


I probably have too old a version. I have the 0.4.7 that came in the Gentoo repos.
 

kwalters-price
New member
 
Posts: 3
Joined: Thu Nov 07, 2013 05:58
 

User avatar
LionsDen
Member
 
Posts: 530
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Thu Nov 07, 2013 17:47

kwalters-price wrote:can i get this mod?


Just go to the first post and click the download link. If you aren't sure how to install a mod, there are numerous answers to people with the same questions all over the forum. There is also a FAQ somewhere. Just use your favorite search engine to find the answers you are looking for.
 

User avatar
Silent-Hunter
Member
 
Posts: 30
Joined: Wed Nov 06, 2013 20:06

by Silent-Hunter » Fri Nov 08, 2013 06:47

I doublechecked, I have particles enabled. And yet I still get the error I posted above.
 

zyy571137
Member
 
Posts: 12
Joined: Mon Oct 07, 2013 06:45
Location: Hainan

by zyy571137 » Mon Dec 09, 2013 02:14

open the rain.lua, replace the add_particlespawner as follow :)
Code: Select all

        minetest.add_particlespawner(25, 0.5,
            minp, maxp,
            vel, vel,
            acc, acc,
            0.8, 0.8,
            25, 25,
            false,  "weather_rain.png", player:get_player_name())

 

zyy571137
Member
 
Posts: 12
Joined: Mon Oct 07, 2013 06:45
Location: Hainan

by zyy571137 » Mon Dec 09, 2013 02:15

open the rain.lua, replace the add_particlespawner as follow :)
Code: Select all
 minetest.add_particlespawner(25, 0.5,
            minp, maxp,
            vel, vel,
            acc, acc,
            0.8, 0.8,
            25, 25,
            false,  "weather_rain.png", player:get_player_name())


Silent-Hunter wrote:I doublechecked, I have particles enabled. And yet I still get the error I posted above.
 

davidforsure!!!
Member
 
Posts: 72
Joined: Fri Oct 25, 2013 09:02

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

by davidforsure!!! » Mon Apr 21, 2014 07:57

can i say something..... your mod is awesome but the rain and the snow is so buggy pls fixed it in the next update...i mean the rain/snow is glitching in some node so it feels wet even if you are in your own house.....but anyway +10 i will make it +infinite if you fixed it!!!!!
 

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

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

by SAMIAMNOT » Mon Sep 08, 2014 21:29

This mod is nice but it doesn't always work. Like I can be playing on my Windows 8.1 laptop and not get any weather after an hour and a half and yet on my Windows XP desktop with 256 MB I can get weather after 20 mins. Is there some sorta menu where I can choose how often there's weather?
I test mines.
 

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

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

by Minetestforfun » Tue Sep 09, 2014 10:07

Someone can tell me what is the better "weather mod" for minetest 0.4.10 (compatibility, stability, less performence use) ?

[weather] or [snowdrift] or an other ?
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 3 guests