Cloudy Reflection

Introduction

The goal of this article is to determine and study which will be the objectives of our meteo engine. Which meteo effect should be render to give a realistic effect? What data sources use? How to render it? Which technics should be used? The best idea is to look for wonderful articles and “ever used” technics to choose what is the best issue for our engine.

References

Objectives

Simulate a meteo environment for the whole planet:

  • a meteo file format to save meteo data (pressure, temperature, wind, etc...)
  • render clouds in real time
  • manage textures for the ground and object in a zone (snow on the ground if the temperature is under zero degree celsius)

About the file format, we need our own format to keep the maximum informations we can find. And we also need a data importer to create our meteo file from data sources (true weather reports). About the clouds rendering, we will render them like a Level Of Details tree. The closer you are, the more precise is the cloud.

A last important thing, this file will be the weather state at a T time, and we will just render it. We will not calculate any “weather previsions” . By the way, we will let the possibility to make evoluate the weather with the time (But i think it will cost too much for a “standard” machine).

Existing file format for weather report

The good thing is that the NOAA provides weather reports for everywhere in the world for free. And the most interesting format for us seems to be the METAR format. METAR reports are made by meteo stations every 20 minutes, and contains a lot of data. Just what we need for our engine.

basic METAR file:
2006/04/04 09:30
LFMN 040930Z 10003KT 080V140 CAVOK 16/08 Q1017 NOSIG


decoded METAR file:
Nice, France (LFMN) 43-39N 007-12E 10M
Apr 04, 2006 - 05:30 AM EDT / 2006.04.04 0930 UTC
Wind: from the E (100 degrees) at 3 MPH (3 KT) (direction variable):0
Visibility: greater than 7 mile(s):0

Temperature: 60 F (16 C)
Dew Point: 46 F (8 C)
Relative Humidity: 58%
Pressure (altimeter): 30.03 in. Hg (1017 hPa)
ob: LFMN 040930Z 10003KT 080V140 CAVOK 16/08 Q1017 NOSIG
cycle: 9


After we’ll generate a file saying where there is a cloudy zone. A little link (in french) about meteo sciences: http://www.astrosurf.com/lombry/meteo-previsions-numeriques.htm

NB: Meteo France make users pay for weather reports like METAR files...

According to me, we could take the METAR files to use their data, but it means more work (how to understand a basic METAR file?) to do and we dont have a lot of time.

Softwares decoding METAR files:



Our own file format and parameters needed

I propose to keep the maximum type of data we could fine in the METAR file:

  • pressure
  • humidity
  • etc...

Even if we don’t use all of them at the begining, if could be easier to modify the meteo manager if data are already in the structure.
About the Meteo.xml format, we can create <METEO> node which will be the root node of the document. And in this node, add <ZONE> nodes. Every nodes would represent a kind of weather with some parameters at a position X and Y and with a radius. For location on the planet without influent zone, we could use a <DEFAULT> zone node (with the same parameters than the <ZONE> node but without location and influence radius). With that structure, we can easily create a Meteo.xml with a default zone, and just add few weather zones at precise locations of the planet.

The Meteo.xml:


I think that this format is enough for our planets. About the clouds themselves, they will be more or less big, more or less high in the sky, etc... So when a <ZONE> will be created i will randomly fill it with clouds. And these clouds will be LOD based objects, the more closer you are, the more precise they are.

Export tool

A little software (probably add to the MapExporter already working), to transform a list of METAR files in our Meteo.xml. Maybe you could use files exported by MetarWeather because the METAR files are already decoded, so it’ easier to use them.

Realistic graphic rendering

Ok, this is the very interesting part . First, what are the obectives to give a realistic rendering for the weather?

  • render clouds from space, from in a cloud, from the ground of the planet
  • realistic textures, forms and nebulosity
  • color of the cloud depending of the sunlight (sunshine...)
  • color of the cloud depending of the altitude
  • the bottom of the cloud should be darker than the top
  • transparency of the cloud
  • cloud generation (animation)
  • the cloud should create a shadow (option)


First, an interesting and very well commented video by Niniana Wang about clouds in Fligh Simulator:
http://www.ofb.net/%7Eeggplant/clouds/CloudsInGames_NinianeWang.mpg

some pictures from this video:


They explain their cloud creation technics (made with 3DS MAX), and on which details they worked to give a realistic rendering. Frankly, i like a lot! It works in realtime, the effect is very cool (i like the form of the cloud), and the comment is very good. I think i will try to have this rendering quality! The fact is that they create their clouds with 3DS, so for this part we will use a procedural way. In the video they explain that they use a set of textures to render all their clouds: i like this issue . They are a list of textured quads, and the transparency allows them to generate and delete clouds in a nice animation. Because the center of the cloud is create before the border, it looks like if it were growing (watch the end video to understand better).

This an other website qui wich speak about the clouds aspect with the sun: they used a lens flare for the sun, and then they modify the color of the clouds and the sky when you look at the sun. The link:http://freespace.virgin.net/hugo.elias/models/m_clouds.htm and the sample:

lensflare.jpg

By the way, i believe that they are clouds layers at very precised alitudes, but very light. So when you are far they become totally transparent (I think to this white layer you can see everywhere under the plane when you travel).

Conclusion

With such data, i think that’s possible to have a “true” weather not hard to manage (thanks to METAR files), a realistic rendering and not too expensive in CPU cost. The clouds should be generated in a procedural way (for the main form), and then rendered with textured quads. The color of the clouds should change because of the quad position, and the global environment light (close to orange/pink at sunshine?). Clouds would be LOD based object, so more closer you are, more quads you can see.

And now, let’s implement it! — Nicolas REMIA 2006/05/03 10:36

 
./data/pages/research/meteo.txt · Last modified: 2006/05/04 15:17 by canardlebarbare
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki