Jump to content
  • Advertisement
Sign in to follow this  
xycos

Algorithmic cloud generation...?

This topic is 4644 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, recently I've been playing a spot of Myst IV (a completley 2D game, I know) and watching all tghe cool cloud motion (which goes together with the screen darkening slightly as the cloud gets overhead). However, if you watch the clouds for a couple minutes, you'll notice that they're simply looping. Would there be a way to alogrithmicaly generate cloud patterns in real-time (possibly to apply them to a texture for use in a 3D game)? All the best, xy (Sorry if this has been posed before.)

Share this post


Link to post
Share on other sites
Advertisement
I've noticed wonderful patterns seem to emerge from perlin noise:

Say you have a perlin noise texture which you're going to apply an exponential function to...
Now use another perlin noise function as a distortion map for the first perlin noise texture. *Now* use the exponential function on the resulting texture.
(Apply lighting etc. as desired)

As for the making it loop part, how about making sure the distortion map (perlin noise) tiles. For the animation, just offset the coords for the displacement. This *should* give the effect of wind patterns (derivatives) moving through different areas of the cloud shape.

If you *don't* want looping, just do some sort of random "walk" (brownian walk?) in offsetting the tex-coords for the distortion map.

(I've been thinking about this lately...)

Btw, all this *should* be able to be done in a pixel shader (albiet slowly)
hmm... I think I'll try it out once I get some time.

-Michael g.

Share this post


Link to post
Share on other sites
I found perlin noise worked for me.



Generate two noise thingies, interpolate between them a little further each frame to get your cloud texture, when you reach the second set that the first and make a new second. Adjust the parameters to taste.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!