Hello everyone,
I completed my sky rendering and I am pleased with the results. However, it obviously lacks any sort of clouds which are greatly needed for the rainy scenes planned.
My goal for the clouds were to have them be computed procedurally on the GPU using a noise function that closely represented real-life clouds, and of course doing shading that is photorealistic.
The clouds need to be:
- Dynamic
- Accurately shaped
- Realistically shaded
- Cast shadows
- Contains info about occluding the sun (used later in AO shader)
Luckily, I have found someone else's solution who created essentially everything I was after. The link can be found below.
http://www.digitalrune.com/Support/Blog/tabid/719/EntryId/186/Cloud-Layer.aspx
I am stuck on how to create the cloud layer but I have a few ideas. To start with the clouds themselves, my initial idea is to have some sort of altitude parameter that controls the height in world space where the clouds are located. The these clouds are created on the fly using X amount of octaves of some noise function and are raymarched for gathering density, making the bottom part of the clouds darker.
Shading wise shouldn't be too hard. I can reuse my phase function for the sun lighting perhaps, but I'm mostly concerned with rendering the clouds themselves. This is the part I struggle the most with.
I'm lost at understanding how I project the clouds into the sky dynamically. For my sky I used world space frustum corners and created it as a post-process. I would like to do the same for the clouds somehow. I understand that this doesn't seem practical but it works really well for my application.
I also struggle with understanding how to raymarch the clouds to get a density value controlling how dark the clouds look and such.
I hope this made some sense, I struggle with coming up with good ways to explain it because this is my first time doing cloud rendering. If possible, showing code is the most helpful!
Thank you everyone, I hope to see your responses.