Jump to content
  • Advertisement
Sign in to follow this  
mictian

2005 cloud techniques - Yann please help me out

This topic is 4973 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

Hello all, I have made a nice terrain, acceptable water with per-pixel fresnel effect, and a reasonable though unfinished colored skydome. However my clouds are totally letting the whole environment down. So far I have tried this: - the technique suggested by Yann in the 2002 posts regarding perlin noise clouds, i.e. clamped, exponentiated noise octaves computed in the pixel shader as a summation of textures each containing a few octaves each. This created good enough cloud shapes, but they are totally white which looks very unrealistic. So I tried to implement his next idea, to ray trace through the lowest frequency octaves in a preprocess, and compute the scattering integral (and ths color) at each pixel of the texture map. However, this lowest frequency map is so stretched on my cloud plane that there is no detail in the shading, just blurry grey smudges in the clouds. Perhaps if I used a very high detail map for the luminance part of the clouds then I could fix this? - then I tried "growing" clouds as particle systems using Dobashi et. al paper on procedurally generating clouds from cellular automatation. This produces some nice puffy clouds, but not only are they expensive (unless I invest time in an imposter technique), but also they are insufficient to cover a large sky, such as the one I am using. Please could somebody let me know either how to fix up one of these techniques I mentioned, or point me in hte direction of a better solution. Thanks, Rob

Share this post


Link to post
Share on other sites
Advertisement
Try my GLCloud demo at http://home.comcast.net/~s-p-oneil/downloads.htm. Make sure you read the readme.txt and play with all the options. It's pretty neat to watch the cloud block and the light source moving at the same time. If the keypad keys don't work for turning the camera, toggle numlock and try again. If the impostors don't seem to work right on your video card, or if they look terrible, press 'i' to turn them off.

If you like it, send me an email and I'll forward the source code to you along with a description of how it works. Even if it's not a good fit with your current modeling/rendering method, it may give you some ideas.

Sean

EDIT: You can get my email address from my user profile.

Share this post


Link to post
Share on other sites
Quote:
Original post by mictian
However, this lowest frequency map is so stretched on my cloud plane that there is no detail in the shading, just blurry grey smudges in the clouds.

That's what I found too. What I did was include higher octaves (and higher resolution) in my ray calculations directly above and use progressively less resolution further away towards the horizon. What I ended up with was a few overlapping patches (the lower resolution patches just extended further towards the horizon) which I blended between (each patch is a texture uploaded to gpu and blended on gpu) to remove visible discontinuities in the shading. So directly above you see the highest resolution and as you look to the horizon it blends to the next lower resolution, etc. This looked quite good and doesn't waste ray-tracing cpu on clouds where the shading detail is not needed (ie, doesn't create high shading detail near horizon where you can't see the detail).

Share this post


Link to post
Share on other sites
Thanks for the ideas.

s_p_oneil, I like the appearance of your clouds, and I get about 200 FPS on my laptop (radeon mobility 9700) which isn't bad. I could probably make somethign very similar to this, but the thing is it has to cover from horizon to horizon, and this would be considerably more fill rate / blending intensive.

Perhaps what I should do is just get a nice looking skybox and be happy with a static environment, although I really wanted a 100% procedural world. the clouds in farcry, and other modern games just look so good, I dont think algorithms can competet with photography + artists yet.

If anyone knows where to get a free sky cube map lmease let me know.

Rob

Share this post


Link to post
Share on other sites
The trick is to impostor them efficiently to minimize the fill-rate impact. I'm trying to get clouds working globally in my planet renderer, and it's really difficult. The most difficult part is actually rendering them with good detail from space using some form of dynamic LOD. The amount of detail required to make it look less than terrible is ridiculous.

Share this post


Link to post
Share on other sites
Yeah I bet.

I think I am going to try Soiled's technique since it sounds relatively straightforward. If this fails I will just use a static cube map for the environment.

Either way I will put up some screenies and let you guys know.

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!