How to do a Weather System?

Hi guys!



I don't know if I'm right in this forum, but I didn't want to put it into the effects forum… so please forgive me.



I did a search for "weather system" here and wondered why there isn't a topic on this. Is there a way to implement some nice clouds or rain in JME? Or did anyone play with a moving sun? I'd really like to hear about your trys. And maybe about the pain if there isn't a way to implement such behavior. If you have a great link to a theoretic paper about weather system, I'd be happy to find it here too. I really want to read about implementations.



Oh, and I don't talk about a static skybox here. The weather system should really be a smooth renderered thing. Like a projected water pond with little rain stipples (even if those stipples are only simple textures…). Hm, I hope that was understandable. :?



Thanks all!

There is a thread about rain. A simple solution is to use a quad in ortho mode but if you have a mixture of indoor and outdoor scenes this is not realistic (either it rains in buildings as well or you cannot see the rain through windows).

Here is a nice post for day/night effects for your moving sun requirements:



http://www.jmonkeyengine.com/jmeforum/index.php?topic=3945.0



Clouds, you can place a secondary texture on the sky dome. If you want volumetric clouds that you can fly through, I don't think anyone has played with that yet in jme.



Weather (rain, snow, dust, etc) can be accomplished with particles + FogState. That is, place a particle emitter above the player that throws out the appropriate particle around the player. Then assign the fog state to fog out the distance with the appropriate color (rain - gray, snow - white, dust - yellowbrown).

How expensive is rain with particles and collision? It would be nice to have rain outdoors but not indoors. I have scenes where you can be under a roof but still see the terrain around or in a house and look out of a window. This sounds like triangle collisions so that the particles do not penetrate the roof.

You should be able to add a Particle influence to your rain system that basically does a simple bbox check and kills the rain particle if it is entering the house.

I experience strange effects with point particles. The points are only visible if there is nothing behind or certain meshes. On the terrain they disappear. Could that be a z-buffer problem or another missing of those lovely updateXXX functions ?



http://www.world-of-mystery.de/client/index.php?p=gallery&pic=screen00061



Currently I run the default controller.

The problem was indeed a misplaced updateGeometricState() function (I really hate those).



Now it works and with the proposed bounding collision check it looks not so bad.