Page 4 of 6

PostPosted: Fri Oct 11, 2013 18:08
by jojoa1997
About the flowing water collecting using the RL liquid setting would solve the problem.

PostPosted: Fri Oct 11, 2013 23:51
by MirceaKitsune
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.

PostPosted: Sat Oct 12, 2013 11:30
by BlockMen
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.

PostPosted: Sat Oct 12, 2013 12:09
by MirceaKitsune
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]

PostPosted: Sat Oct 12, 2013 14:05
by webdesigner97
So you mean weather could be a none-walkable transparent node with animated texures? Interesting...

PostPosted: Sat Oct 12, 2013 14:20
by BlockMen
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?

PostPosted: Sat Oct 12, 2013 17:11
by webdesigner97
Maybe yes. But room detection would be harder...

PostPosted: Sat Oct 12, 2013 17:18
by MirceaKitsune
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.

PostPosted: Sat Oct 12, 2013 17:21
by BrandonReese
Didn't somebody already write a proof of concept mod that changed air to a "rain node" with an animated texture?

PostPosted: Sat Oct 12, 2013 21:26
by VanessaE
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.

PostPosted: Sat Oct 12, 2013 22:09
by MirceaKitsune
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.

PostPosted: Sat Oct 12, 2013 22:14
by VanessaE
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.

PostPosted: Sat Oct 12, 2013 22:25
by MirceaKitsune
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).

PostPosted: Sun Oct 13, 2013 15:21
by VanessaE
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.

PostPosted: Sun Oct 13, 2013 15:47
by MirceaKitsune
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?

PostPosted: Sat Nov 02, 2013 07:11
by paramat
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 ...

PostPosted: Wed Nov 06, 2013 23:35
by Silent-Hunter
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.

PostPosted: Thu Nov 07, 2013 06:03
by kwalters-price
can i get this mod?

PostPosted: Thu Nov 07, 2013 17:47
by LionsDen
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.

PostPosted: Fri Nov 08, 2013 06:47
by Silent-Hunter
I doublechecked, I have particles enabled. And yet I still get the error I posted above.

PostPosted: Mon Dec 09, 2013 02:14
by zyy571137
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())


PostPosted: Mon Dec 09, 2013 02:15
by zyy571137
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.

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

PostPosted: Mon Apr 21, 2014 07:57
by davidforsure!!!
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!!!!!

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

PostPosted: Mon Sep 08, 2014 21:29
by SAMIAMNOT
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?

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

PostPosted: Tue Sep 09, 2014 10:07
by Minetestforfun
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 ?