Some clouds back

Board: Home Board index Raytracing Visuals, Tools, Demos & Sources

(L) [2012/06/26] [snwy_] [Some clouds] Wayback!

Hey,
Been interested in trying to generate some clouds. The pic below is the state of that at the moment (may take a second for the pictures to start loading). Currently, only indirect sky light is considered.
[IMG #1 Image]
The clouds are the result of a couple of steps.
First, the CPU comes up with and maintains a simple Navier-Stokes fluid field (using Felix Woitzel's 2d code [LINK http://www.openprocessing.org/sketch/10412 from here], converted to 3d and seeded by whichever forces you want to apply) while the GPU calculates condensation from about 4 million air parcels moving within the field. The condensation is placed into a moisture grid (below flattened into 2d) and given a median filtering, and finally triangles meshes are created around these moisture blobs.
[IMG #2 Image]
In the second step, the triangle meshes are fed into a path tracer which, upon intersecting one of them, starts traversing into the moisture grid at that location. Based on the amount of liquid water in that grid position, a chance for the ray to collide with a droplet is calculated. If the ray 'hits' a droplet, Mie scattering is estimated via rough chance (99 % of rays scatter forward, 50 % of those scatter forward in a narrow beam; as lucidly put in [LINK http://evasion.imag.fr/~Antoine.Bouthors/research/phd/thesis/thesis.pdf this thesis]). A rough esimation of color shifts due to refraction is achieved by slightly adjusting the RGB values of each ray (can't afford spectral rendering). The benefit (or what I consider as such) of the moisture grid comes in here, as you can get some amount of soft edges without using fractals.
Some other 'cloud' shapes, though in these the way the condensation was accumulated was slightly buggy.
[IMG #3 Image]
[IMG #4 Image]
As I noted in the beginning, direct sunlight for clouds is not yet in effect. I'm looking into mapping some photons for that, but it's a bit buggy still. The resolution of the fluid grid needs punching up (currently 100 * 100 * 100). And there are various other things that need tweaking and changing.
Below is the first cloud mass fed from the cloud generator (first step) to the tracer.
[IMG #5 Image]
[IMG #1]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_1.png
[IMG #2]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/moisture_content.png
[IMG #3]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_2.png
[IMG #4]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_3.png
[IMG #5]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_4.png
(L) [2012/06/27] [zsolnai] [Some clouds] Wayback!

Great work, congratulations! To be entirely honest, I was thinking on doing the same thing in these days. [SMILEY :)]
An idea: I have been working on real time fluid control methods these months, and I was also thinking on giving a little aid for artists who may be using it so they could give input on roughly how they would like the clouds to look, and some fluid control forces could be applied to make it look so. Like this:
[LINK http://cg.iit.bme.hu/~zsolnai/gfx/fluidcontrol/control.avi]
It would also be good to adjust the weighting of the physical forces that you've modeled (and also in the thesis) and the control forces to be artist-friendly.
(L) [2012/06/27] [snwy_] [Some clouds] Wayback!

Thanks, zsolnai. If you've been thinking about doing it, just do! The video's pretty cool – since you already have a fast fluid simulator running on the GPU, you can just put in some air parcels (or particles if you will), calculate condensation from them (this should be very fast on the GPU) as they fly around and you should have a relatively easy-to-use cloud generator. Mine is quite slow and not interactive in the least.
I did a quick implementation of photon mapping to get direct sunlight into the clouds. Below are some clouds illuminated by the sun + sky, and the photon map below them. (If you adjust the gamma upwards on the photon map image, you can actually see some stray photons heading out of the cloud - bugged.)
[IMG #1 Image]
[IMG #2 Image]
Basically what I do is trace a ray from the sun towards the cloud, and once the ray enters it, I add the light value of a single photon to a 3d grid at that location. I keep tracing the ray through the cloud, and to each new grid element it passes I add the value of a photon (which gets attenuated only by the slight color shifts due to refraction that the ray has experienced). In the end, the total number of photons is the total number of grid elements traversed by all the rays in the photon mapping phase. Then, during path tracing, while the ray is traversing the cloud, I add to it the light value from the photon grid.
I haven't really checked this method for any flaws in its logic, and it's a bit buggy, too, but the basic idea seems to work.
[IMG #1]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_5.png
[IMG #2]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_5_photon.png
(L) [2012/06/29] [necro] [Some clouds] Wayback!

yeah, clouds! this is far more on the physical side than the stuff I do for clouds (I basically only create "artistic" procedural volume data that is evaluated on the fly in my volume path tracer). Thanks for sharing, it gave me a few interesting pointers to more material on the topic!! Clouds are a incredibly challenging field, simulation is complex to begin with and rendering them accurately is exactly easy either. That said I also kind of cheat on the rendering side, low maximum density, relatively low albedo, and a fake (isotropic) phase function. I also don't simulate spectral things in the clouds, although the renderer itself is spectral (since I simulate the scattering in the rest of the atmosphere and that wouldn't make much sense if it wouldn't be spectral).
[IMG #1 Image]
[IMG #1]:Not scraped: https://web.archive.org/web/20150330165847im_/http://25.media.tumblr.com/tumblr_m6efdjnfth1rylncmo1_1280.png
(L) [2012/06/30] [beason] [Some clouds] Wayback!

very nice looking!
(L) [2012/07/08] [snwy_] [Some clouds] Wayback!

Some tweaks to the cloud generator and the way the path tracer handles cloud masses. The cloud below is the condensation from about 0.7 billion air parcels moving through the fluid field, which is at a resolution of 200x200x200.
[IMG #1 Image]
The black spec at the upper right corner is a boundary error. There also seem to be some flaws of logic in my direct lighting code, but I need to look into that. A few apparently quite important phenomena (coalescence, entrainment) are ignored for now, but need to be accounted for somehow at some point. I'd especially want to model the droplet size distribution to some extent to generate virga. Atmospheric perspective is just a flat shade right now, which kinda makes it hard to tell depth.
What you do for clouds, necro, is far more efficient than mine. The problem for me is that, to have an interesting sky, one needs more than just one or two clouds floating around - yet even those few clouds take up a lot of processing and memory for all the 3d grids. Maybe a kinda hybrid would work: procedural cloud wisps for the high altitudes and fewer more detailed clouds for the lower ones.
[IMG #1]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_8.png
(L) [2012/07/09] [snwy_] [Some clouds] Wayback!

With the direct lighting code slightly adjusted, the cloud looks a bit more like it's supposed to (the sun is to the right, fairly low, and slightly 'behind' the cloud). I think there's still some problems with the lighting, but need to look into it.
[IMG #1 Image]
[IMG #1]:Not scraped: https://web.archive.org/web/20150330165847im_/http://personal.inet.fi/muoti/eimuoti/ray/cloud/cloud_9.png
(L) [2012/09/18] [skydave] [Some clouds] Wayback!

Hey Guys,
I just stumbled upon this very interesting topic. Did you make any progress? The results look really promising so far.
@necro: your result is very impressive. How do you handle the cloud volume and the atmosphere? Do you have one integrator which takes both into account at the same time?
Cheers,
David
(L) [2012/10/30] [snwy_] [Some clouds] Wayback!

No progress on my part unfortunately. Lost interest in it for now.
(L) [2012/11/01] [TESSELLATED TITS] [Some clouds] Wayback!

I made some raytraced clouds:
[IMG #1 Image]
it definitely is the best clouds I've ever seen in my entire life.
To achieve the transparent effect, I first select and highlight all the objects, then I hold down the rendering button and cut away the selected objects, then I take screenshot as the objects fade away! [SMILEY :lol:]
[IMG #1]:Not scraped: https://web.archive.org/web/20150330165847im_/http://i225.photobucket.com/albums/dd202/highwingx3/2cloud.png

back