PDA

View Full Version : Making decent clouds.... in Real-Time



jasonf
10-08-2007, 01:51 PM
I'm thinking about my next project and the idea requires realistic clouds to be rendered in real time as accurately as possible.. with sun sets, sun rises, fog... etc..

like this.

http://www.ofb.net/~eggplant/clouds/

anyone got any clues? pointers? tutorials? Libs?

I want to write a game, not reinvent the wheel.. so if there's an existing tech, if I can, I'll use it.

jasonf
10-08-2007, 02:17 PM
I've found this... a lib for $250 but in C++ using OpenGL.. if this could be converted to Pascal and integrated into an existing engine, it would be coool

http://www.sundog-soft.com/index.html

jdarling
10-08-2007, 02:35 PM
JasonF, are you wanting 3D or 2D clouds? Also, what depth of realism are you looking for? I've done a few 2D could renders, but they produce a very commic style cloud and not a realistic one. As for 3d ones, I couldn't find much that you probably haven't already found, but a page of links I found useful was http://www.vterrain.org/Atmosphere/Clouds/

If you want 2D a very easy way is to create about 10 different patterns in any paint program. Use them as Alpha Masks and combine them at random to build out a cloud, then texture/light it as you see fit. I found that using a perlin generator worked best as it created more symmetry then a standard random function. Random seemed to produce things that just didn't look like a cloud :).

Of course, generating the cloud is only 1/2 the battle, you still have to make it react properly to the environment. I never took it this far, and instead had my clouds simply float over everything on the screen.

Robert Kosek
10-08-2007, 02:37 PM
I would warn you that almost everything he's doing is simple, though time consuming. The volumetric clouds are large groups of particles in a sort of voxel system designed to imitate real clouds. The land is less impressive. However the stars and planets are interesting.

Inifinity uses a similar system (http://www.fl-tw.com/InfinityForums/viewtopic.php?t=1780) with strange attractors and coloring algorithms to make nebulae. Also, volumetric fog (http://www.fl-tw.com/InfinityForums/viewtopic.php?t=2408) is created in a very interesting way, using a shader casting a ray through a "fog sphere" to lend the volumetric effect. Try reading a few of his development journals for inspiration. ;)

Huehnerschaender
10-08-2007, 07:03 PM
Personally, I would try to use the things I know....

After reading your post, I remembered the particle engine I made fpr DanJetX and I also made an example for it, which featured a single raining cloud.

I just opened the project again to see what the cloud looked like. When I spawn some more clouds it looks like this:

http://upload2.postimage.org/212765/clouds.jpg (http://upload2.postimage.org/212765/photo_hosting.html)

Note that the clouds are fully 3 dimensional, you can rotate them, fly through them etc...