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

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Thu Apr 04, 2013 01:44

I have rain inside my builds... :-o
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Thu Apr 04, 2013 06:15

That shouldn't happen as long as you stand inside your buildings or in caves.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.

by Traxie21 » Thu Apr 04, 2013 07:38

There seems to be a significant hang after a few minutes of running this. Kinda like the lag piles up on itself.
 

User avatar
kaeza
Moderator
 
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Thu Apr 04, 2013 07:41

Traxie21 wrote:There seems to be a significant hang after a few minutes of running this. Kinda like the lag piles up on itself.

I can confirm that.
After letting it run for about 10 minutes, I get ~3 sec of lag.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.

by Traxie21 » Thu Apr 04, 2013 07:46

Oh no, its just how you feel. If you stare outside a window on a rainy day, you start to feel tired and laggy too. :P
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Thu Apr 04, 2013 11:52

No... I have rain inside my builds... Maybe need test nodes like glass, here I have a floor with glass and the rain is here. :D
I don't have lag with this mod, maybe is a punctual problem.
 

User avatar
Calinou
Moderator
 
Posts: 3157
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Thu Apr 04, 2013 13:03

That's how the mod works: it rains/snows everywhere when you're not under a walkable node, and it doesn't rain/snow when you're under a walkable node.
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Thu Apr 04, 2013 13:26

Sorry, but don't is working here... Maybe the rain is created inside my building, is in the second floor.

I am at (xyz) 13,9,17 in this screen.

Screen shots:
Image
Image
Image
Image
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Thu Apr 04, 2013 13:44

After some time I don't see any thing crossing stones or wood, only the glass.
 

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 » Thu Apr 04, 2013 13:45

Very nice mod, I shall totally follow this!

One question however: How are the particle effects implemented for rain and snow? Is it spawning fake nodes in the air (animated drawtype_plant), is each particle a Lua entity, or does it use the recent particles system in the engine (that torches make use of for smoke)? Also, how much performance do the particles decrease?
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Thu Apr 04, 2013 15:28

It uses my recently merged Particle System with ParticleSpawners. The performance depends mostly on the client that has to animate them (up to 20 fps drop for me from 60 fps); The server isn't really affected.

@deivan: Didn't know you were using a glass roof; This mod calculates wheter you're inside or outside using light; so in your case the light in the house makes the mod think you're outside
Redstone for minetest: Mesecons (mesecons.net)
 

deivan
Member
 
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Thu Apr 04, 2013 15:38

Case solved. :D
-*-
...but don't is better implement a weather in a area than make it using a player as reference?

Like, if particle found something he disappear. Like the snow mod. (Biome mode?)
Last edited by deivan on Thu Apr 04, 2013 15:41, edited 1 time in total.
 

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 » Thu Apr 04, 2013 17:43

Jeija wrote:It uses my recently merged Particle System with ParticleSpawners. The performance depends mostly on the client that has to animate them (up to 20 fps drop for me from 60 fps); The server isn't really affected.

@deivan: Didn't know you were using a glass roof; This mod calculates wheter you're inside or outside using light; so in your case the light in the house makes the mod think you're outside


Ok. That sounds like the right way, I was worried this might have been done with older and uglier possibilities at first. After all I would love to see this as part of MineTest soon :) Didn't know you implemented the new particle system also... nice work on that too! And that does sound like a bit of a FPS drop, but I guess it can't be helped and it's the best Irrlicht can do with so many sprites.

As for the glass problem, that sounds like a bit of an issue to fix. I don't know how the weather code is implemented in detail... but instead of using light to check where weather should show, isn't it possible to just check if there's a block between the sky and that area? If tracing every node horizontally isn't a problem of course.
Last edited by MirceaKitsune on Thu Apr 04, 2013 17:44, edited 1 time in total.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

by Jeija » Thu Apr 04, 2013 17:44

I would also prefer using Biomes as references and use collision detection to make rain not enter houses, but I guess you don't run a supercomputer with 4 GPUs and two octacores to calculate all that...
The problem is that particles would lag the client too much, so I had to reduce the number of particles by just spawning them near the player :(
Redstone for minetest: Mesecons (mesecons.net)
 

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 Apr 05, 2013 13:21

Tried the mod last night. It's very good and works almost great... almost. I noticed several issues and although some might be known I thought to report everything here:

- Worst problem anyone will notice is that when sitting under a node, weather particles instantly disappear. This is a common problem when weather is done as a sphere of particles that follow the camera, to keep rain from showing indoors (Grant Theft Auto <= San Andreas games had the same issue).

* Not sure if this is possible, but my suggested fix would be to only cut particles inside the part of the "sphere" that's indoors. So for example if the player is two nodes under a ceiling, the ceiling "cuts" the virtual sphere and only the part that's >= 3 nodes toward the exit still works. This would allow weather to show outside correctly when you're indoor until you're inside so much the draw limit is reached.

- Weather is very laggy and slow to update at times. Especially if you're using fast movement to run, particles can barely follow you. I assume that although the particle spawner is client-side, the server must update its origin to follow the player (which is also very bandwidth costly).

* Only fix I can think of is allowing particle spawners to be attached to objects client-side, which would be useful in a lot of circumstances. Should be as easy as giving the particle system an entity to follow, and simply use the object's origin + (optional) offset to spawn particles. That way the server would only send a packet to clients once to start or stop weather.

- Last problem I noticed is that when looking up, rain is stretched incorrectly. When looking forward rain falls properly, but if looking upward you see blue lines coming toward you.

* Particles are set to fully face the camera. Perhaps weather particles should only face the camera horizontally, not vertically too. This is possible with sprite entities though I don't know about the current particle system.

On the brighter side, I noticed no FPS decrease at all when weather was enabled. At least none I could sense, so on this side it's all good. Love the idea and I hope something can be done about the remaining problems... this needs to be part of MineTest IMO :)
Last edited by MirceaKitsune on Fri Apr 05, 2013 13:24, edited 1 time in total.
 

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

by Splizard » Fri Apr 05, 2013 21:21

MirceaKitsune wrote:
- Weather is very laggy and slow to update at times. Especially if you're using fast movement to run, particles can barely follow you. I assume that although the particle spawner is client-side, the server must update its origin to follow the player (which is also very bandwidth costly).

* Only fix I can think of is allowing particle spawners to be attached to objects client-side, which would be useful in a lot of circumstances. Should be as easy as giving the particle system an entity to follow, and simply use the object's origin + (optional) offset to spawn particles. That way the server would only send a packet to clients once to start or stop weather.


Just for reference, there is an issue on that:
https://github.com/minetest/minetest/issues/567
Games: The Hungry Games Mods: Lifters (Simple Lifts), Snow Biomes and Gates. Also checkout my texture pack Gridtoon!
 

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 Apr 05, 2013 23:29

Splizard wrote:Just for reference, there is an issue on that:
https://github.com/minetest/minetest/issues/567


Oh, thanks for mentioning that. I totally support it and it would prolly fix the weather lag issue too.
 

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

by fairiestoy » Mon Jun 17, 2013 14:01

Hey guys,
first of all, thanks to the one who made this mod. It really gives minetest more feeling inside the world. Nice work. I just changed the rain.lua to this:
Code: Select all
-- Rain
minetest.register_globalstep(function(dtime)
    if weather ~= "rain" then return end
    for _, player in ipairs(minetest.get_connected_players()) do
        local ppos = player:getpos()

        -- Make sure player is not in a cave/house...
        --[[ if minetest.env:get_node_light(ppos, 0.5) ~= 15 then return end ]]

        local minp = addvectors(ppos, {x=-9, y=7, z=-9})
        local maxp = addvectors(ppos, {x= 9, y=7, z= 9})

        local vel = {x=0, y=   -4, z=0}
        local acc = {x=0, y=-9.81, z=0}

        minetest.add_particlespawner(25, 0.5,
            minp, maxp,
            vel, vel,
            acc, acc,
            0.3, 1.2,
            25, 25,
            true, "weather_rain.png", player:get_player_name())
    end
end)

And wanted to ask, if this could cause major problems since i have no proof if the engine could stop spawning rain (for example if i am on a deep mining mission. Would be senseless there). How could I solve this the best way? I was thinking of checking the depth of the player (means how many blocks are above and / or in a specific range of the player). Im not familiar with coding in Lua, so this is like writing an exam in medical sience to me.

Greetings...

fairiestoy
Interesting about new things is, to figure out how it works ...
 

User avatar
cornellius
Member
 
Posts: 82
Joined: Sat Dec 01, 2012 05:08
Location: South East Asian

by cornellius » Mon Jun 17, 2013 14:48

can you change the rain weather texture?? yeah when you look up the rain texture looks bad


,Thanks
All Humans Need Is Forgiveness, God Is The First One Who Forgive All Humans So Humans Must Forgive Other Humans
 

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 » Mon Jun 17, 2013 17:18

cornellius wrote:can you change the rain weather texture?? yeah when you look up the rain texture looks bad


,Thanks


Not the texture's fault. Weather particles always face the camera, and due to this rain looks completely messed when looking up. I think the solution is to face particles to the camera only horizontally.
 

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

by Inocudom » Mon Jun 17, 2013 17:23

I like what this mod does and wish it the best of luck.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/
 

ndjdjksisksk
Member
 
Posts: 130
Joined: Mon May 06, 2013 04:11

by ndjdjksisksk » Wed Jun 19, 2013 23:09

i have a segeston: you should make weather change randomly so you don't have to have a privlage


epic mod i love weather in minetest
nvm about me leaving minetest but i probably will for a while because i have nothing to do in this comunity becaise i can't make a server. my username is going to change i will make a new acount called stormchaser3000
 

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

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

by Inocudom » Sun Jul 14, 2013 23:04

proller wrote:making dynamic weather
using heat-humidity dynamic map
with melting and freezing

https://github.com/proller/minetest/tree/weather
https://github.com/proller/minetest_game/tree/weather
https://github.com/proller/minetest-mod-weather/tree/weather

todo:evaporation


That is wonderful news, proller. I hope that it all works out in the end.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/
 

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 Jul 14, 2013 23:06

proller wrote:making dynamic weather
using heat-humidity dynamic map
with melting and freezing

https://github.com/proller/minetest/tree/weather
https://github.com/proller/minetest_game/tree/weather
https://github.com/proller/minetest-mod-weather/tree/weather

todo:evaporation


Saw this on IRC today. Very nice idea, really eager to see it done!

But like I said, I'm not going to even try it yet as long as it contains hard-coded nodes. I believe no node OR type of weather should be added to C++... just the mechanics to define them from Lua. The way I'd like to see weather made possible in a better way is by having a 'sky particles' system (same as current particles but coming from the sky and culled by ceilings) and separately, a system to set fog colors to clients (which would also be part of my idea to make the sky configurable, I hope that won't conflict with this implementation).
Last edited by MirceaKitsune on Sun Jul 14, 2013 23:06, edited 1 time in total.
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 10 guests