Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Brebion flavien, posted on January 20, 2001




Image Description, by Brebion flavien



This is a screenshot of the sky rendering part of an engine i'm working on (for a future MMORPG) on my free time.

In many games, i believe the sky is one of the most underestimated feature. It often takes a big part of the screen, so it ought to be nice-looking to maximize the player's enjoyment experience.

The engine supports almost any type of sky commonly used nowadays. For the background, static sky boxes (fixed images) are obviously proposed, but it is also possible to use a dynamic sky box (the colors of each pixel are then calculated from many parameters -time of the day, position of sun, haze, colors equations, etc.. -) or a dynamic sky dome. The deformation effects are taken into account when generating the textures, so you can look at 360 degres.

The clouds are based on layers of alpha-blended textured surfaces (planes or domes). It is possible to set the transparency, animation functions, speed, density of clouds, etc.. In addition, it is possible to define your own animations and effects (clouds morphing for example).

Technically, the textures are procedurally generated; many functions and filters are then applied to them to make them look like more realistic (sharpness, color, shadows and lighting on the clouds from the sun).

The two images shown above are based on a dynamic sky box and two clouds domes. The clouds are moving with the wind at different speed, and slowly disappear at the horizon. It is running extremely fast (60 fps -with vsync enabled- on a P200+Vaudoo2), since there are no more than 15 polygons, and it doesn't look too bad i think ( though it can always be improved ).

In the future, i hope to implement support for independant and true 3d volumetric clouds.

Have a nice day !

Brebion flavien


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Scrambled Monkey

January 20, 2001, 08:57 AM

Neato, they look nice and lumpy :)
Dan

 
Ogotay

January 20, 2001, 09:43 AM

Hey, I like the idea and the screenshots, they look really good. Is there a chance to see a demo of it? Only one thing, on the screenshots the clouds look a bit flat (like a spraypaint image on glass), are you planning to change it (like projecting the cloud textures on a skydome instead on a flat (set of) polygon(s))?

 
Ogotay

January 20, 2001, 09:45 AM

Oh, sorry, you already wrote about implementing it at the end of your image description :).

 
manilius

January 20, 2001, 11:24 AM

Hi,
great work...your clouds look better then the sky in a lot of games. Could you go a bit more into detail about the functions generating the noise (Perlin noise?). And how does your lighting and shadowing work. Is it e.g. possible to set the position of the sun and automatically light the clouds correctly?

ciao...
...jens

 
Kevin

January 20, 2001, 11:26 AM

Wow!, This is really amazing. I have been working for a long time on a realtime raytracing landscape engine, and your point about clouds is well taken. I am really impressed with the lighting and shading you achieved with your "Textured, lit and shadowed" image. When did you begin work on your implementation. I presume you have seen Hugo Elias' work on his website:

http://www.freespace.virgin.net/hugo.elias

It would be really neat if you had a demo of just the cloud parts for download. His demo is from a fixed vantage point, but you described the ability to map your procedurally generated texture to a skybox and then look around.

A couple more thoughts about your screen shot/MMORPG... do not forget to add a lens flare that brightens/dims with respect to the amount of cloud cover occluding the flare itself... and also, the bottom face of the skybox could be an ocean that EMBM the other 5 faces. Being able to move around that environment would be completely awesome. Heck, all it would need then would be a couple of seagulls :-)

Really great work!

Kevin

 
Spalter

January 20, 2001, 11:27 AM

Looks neat!

"In addition, it is possible to define your own animations and effects (clouds morphing for example)."

how do you implement this? does the engine read some kind of animation script file?

 
Brebion flavien

January 20, 2001, 01:54 PM

Thanks for your comments everybody :)

Ogotay: actually, in the screenshots, a clouds dome is already used, but i haven't make it very curved. To give you an idea, the curved surface ranges from -100 to +100 for the XZ axis, but only -5 to +10 for the Y (vertical) axis, 0 being the horizon. Fortunately, as everything can be set, you can change the values in a second.

Manilius: yes, it uses Perlin Noise :) I have more or less applied the algorithm found at http://freespace.virgin.net/hugo.elias/models/m_clouds.htm

to generate the "base texture" (cf. screenshot).
Yes, it is possible to set the position of the sun to change the lighting and shadows on the clouds. I'm projecting the sun onto the clouds surface, then i calculate a normal map from the clouds texture (tip: something like Dot-3 bumpmapping, see Nvidia demos) and find the angle with the sun, which gives me an illumination parameter for each pixel :)
Another problem was to generate the alpha map. I didn't want to use additive blending, since the clouds in reality are not "added" to the sky :) Hence i use alpha-blending. The contours of the clouds are transparent, while the center of the clouds are more opaque..

Kevin: i began work on the implementation something like a week ago; but i had done some research before. I have definately seen the work from Hugo Elias, but another paper was helpful:

http://developer.intel.com/software/idap/games/clouds/index.htm

Though i did not use this implementation, i found it quite interesting.
Unfortunately there is no demo. Not that i do not want, but the sky is part of the engine, which in itself isn't ready to run on any other machine than mine.. i still have many compatibilities issues to work. But for another IOTD (once the terrain engine is working), why not.. :)
About lens-flare: actually it is implemented, but i must "link" it to the sky..

Spalter: really, nothing special. I have not implemented a scripting language & stuff, because i do not intend to use the sky for anything except my MMORPG. Everything is done through callbacks. You can then modify the position of the vertices of the clouds surface, box surfaces, etc.. if you have seen the sky in "Sacrifice", it is typically the sort of things that i could implement in a couple of minutes..

Brebion flavien

 
Vorteks

January 20, 2001, 05:00 PM

Pretty. Looks better then the sky in EverQuest, I think.

 
Robert Hayes

January 20, 2001, 09:37 PM

Very nice. I would like to see how these skys look when they hit the horizon of some terrain. Any screenshots of that?

 
Brebion flavien

January 21, 2001, 08:05 AM

No, but i'll post another IOTD once the terrain engine is finished :)

Brebion flavien

 
Joakim Hårsman

January 21, 2001, 02:17 PM

This is definetly the best sky, I've seen so far, most people just settle for blended noise on a plane which doesn't look very good. Do you do the illumination of the clouds on the GFX-card or do you use the CPU in a pre-processing step? Also have you investigated Hugo's effect where the thin parts of the clouds get backlit when they're close to the sun? That adds lot of realism methinks.

 
Kim Pallister

January 21, 2001, 06:46 PM

The article on the Intel site DOES have a demo. I'll give you the link to a more up to date one that also has procedural terrain and stuff:

http://developer.intel.com/software/idap/media/zip/procworldsrc.htm

You'll need a GeForce, GeForce2, Radeon or a G400/450 (maybe G200?) to run it, since it uses a ton of render-to-texture

Kim Pallister (the author)

P.S. And yes, mine is also based of Hugo Elias' algo. I just used HW to do most of the work.


 
This thread contains 12 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.