Cloud Rendering

Started by
6 comments, last by nfactorial 10 years, 3 months ago

Hiya,

When I feel like it, I work on a research engine at home so I can learn about various things. I recently added support for clouds in the sky, based on a few octaves of noise. Whilst I haven't finished it yet, there's still some lighting to add, it doesn't satisfy what I was looking into achieving. It is animated and has various settings I can play around with. But it just isn't feeling as volumetric as I'd like, I kind of expected that but had to implement it to see.

A picture to show how the clouds in my engine currently look:

R1O2JRG.jpg?1

So, I was wondering if anyone had any links or information on implementing clouds that look more volumetric than this. I am going to try multiple layers of clouds next which wont take long, but I'd mostly like to investigate something that looks similar to the clouds shown in the video on the 'reset' website (http://reset-game.net/?p=284) which look very nice.

Thanks,

n!

Advertisement

I actually suspect the reset video is using perlin based clouds, which would make it more a case of finding out what lighting I'm missing. However, looking closely at the video the sky certainly looks more volumetric than the simple 2D perlin I'm using.

n!

Yeah, it just looks like you're mainly missing proper lighting (which would involve some way to create or fake geometry/normals for the clouds).

Hey,

My clouds are dynamically lit and also have in-scattering, I have normals for the clouds which are computed in the pixel shader during rendering.

My lighting calculations aren't finished though (it's only a few hours work) so there maybe some lighting requirements I'm missing?

Cheers,

n!

Here's a nice little page for slightly old but decent methods for cloud rendering and lighting, should be plenty of fast for current hardware. (there's descriptions for single and multis cattering methods, imposters, volume etc.)
http://vterrain.org/Atmosphere/Clouds/

The method which was used in Microsoft Flight Simulator 2004: A Century of Flight.

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

Hey,

My clouds are dynamically lit and also have in-scattering, I have normals for the clouds which are computed in the pixel shader during rendering.

My lighting calculations aren't finished though (it's only a few hours work) so there maybe some lighting requirements I'm missing?

Could it be lack of self-shadowing and maybe not using exponent on the noise, which is creating very wispy looking clouds in your screenshot? Though obviously sometimes wispy clouds are desirable, they often don't look very volumetric.

My go to resource for cloud rendering is a rather old thread here on gameDev by Yann-L, sadly the pictures are all missing now, but they looked impressive at the time and i'm pretty sure the techniques are still in use today. Though the site redesigns have made the posts harder to follower (quote blocks seem to have been lost and so a reply and quote all flows together), there is still plenty of good information to be found in Yann's posts, probably worth a read.

Hey,

My clouds are dynamically lit and also have in-scattering, I have normals for the clouds which are computed in the pixel shader during rendering.

My lighting calculations aren't finished though (it's only a few hours work) so there maybe some lighting requirements I'm missing?

Could it be lack of self-shadowing and maybe not using exponent on the noise, which is creating very wispy looking clouds in your screenshot? Though obviously sometimes wispy clouds are desirable, they often don't look very volumetric.

My go to resource for cloud rendering is a rather old thread here on gameDev by Yann-L, sadly the pictures are all missing now, but they looked impressive at the time and i'm pretty sure the techniques are still in use today. Though the site redesigns have made the posts harder to follower (quote blocks seem to have been lost and so a reply and quote all flows together), there is still plenty of good information to be found in Yann's posts, probably worth a read.

Yann's work was pretty amazing. These days this is probably the best paper I've seen on sky rendering: http://www.hpi.uni-potsdam.de/fileadmin/hpi/FG_Doellner/publications/2012/MED12/paper_1056_cr.pdf

Here's the video:

The clouds are based on a Game Programming Gems article that traces rays through a heightfield. The results are pretty convincing.

Hey, thanks those are some useful resources.

I have seen the microsoft flight simulator pdf, but that's more for flying through the clouds, so I'm looking for a more 2D approach that renders a cloud layer. After a bit of investigating, I feel like I need to do more atmospheric scattering in the lighting, which should lead to an improvement in the look. I'm also familiar with the vterrain page.

Mostly looking for information on the lighting of the cloud layer, my previous shot was after an afternoons worth of work so there's much to improve!

My sky does have dynamic time of day (based on http://www.cs.utah.edu/~shirley/papers/sunsky/sunsky.pdf), using a procedural cube-map I generate each frame based on the sun position. And, although I think my sky looks nice enough, I think it's probably a little too much atm (performance is fine) it just feels like I could get a similar look with a 2D texture but I consider that part unimportant at the moment (I'm happy with the way it looks, but I think a simpler implementation may be better).

These days this is probably the best paper I've seen on sky rendering: http://www.hpi.uni-potsdam.de/fileadmin/hpi/FG_Doellner/publications/2012/MED12/paper_1056_cr.pdf

That's a nice pdf I haven't seen before thanks, my night cycle is poor atm so it will be nice to read through that.

I've been busy with the holiday season so haven't done too much on the clouds since, though I will be back on that soon. Currently writing a simple ray-trace so I can look at the cloud math without worrying on perforrmance too much, then see what I can translate back into shader code once I grasp it fully.

I'll put some screenshots here (again, the engine is mostly for research than any particular goal at the moment), just for fun smile.png there is a lot for me left to do.

Thanks again for the links I will look through them.

n!

xIWVIuR.jpg

raLXIvo.jpg

q0ognG4.jpg

This topic is closed to new replies.

Advertisement