Ifu - cloud simulator and renderer back
Board:
Home
Board index
Raytracing
Visuals, Tools, Demos & Sources
(L) [2014/09/01] [ost
by snwy_] [Ifu - cloud simulator and renderer] Wayback!Wrote a program to simulate and render clouds; it has an easy-ish GUI and a fair bit of freedom to customize the simulation.
Website & download: [LINK http://personal.inet.fi/muoti/eimuoti/ifu/ Ifu - cloud simulator/renderer] (Linux/Windows 64-bit)
Changelog/release notes: [LINK http://personal.inet.fi/muoti/eimuoti/ifu/ifu-changelog.txt Changelog.txt]
Video tutorials: [LINK http://www.youtube.com/playlist?list=PLMVzQTDRXhK_awQI7JhbfJX3R_8C7BBBu Ifu Silent Basics - YouTube]
A sample cloud for quick test rendering is included in the download.
[IMG #1 Image]
The program is in beta, has been tested more thoroughly on Linux than on Windows, and may have a number of bugs etc. Always see the changelog, first. Rendering, clouds tend to be best viewed so that the sun is somewhat behind the camera.
The simulator runs a Navier-Stokes fluid solver and does a bunch of other stuff. Not 100% realistic, but decent. The renderer is a normal path tracer, the clouds being rendered with a rough approximation of Mie scattering (non-spectral). There's currently no in situ tonemapping; renderings can be exported into PFM.
Both the simulator and renderer are CPU-only, and heavy on the computations. They run fairly well on a Xeon E3-1230 v3, but not too quickly on an Athlon 64 X2 6000+. The simulator doesn't benefit much from multicore - memory access bottleneck. The renderer should scale up reasonably well with many cores, though odd things may happen if you have a few hundred.
[IMG #1]:Not scraped:
https://web.archive.org/web/20210509163933im_/http://personal.inet.fi/muoti/eimuoti/ifu/gallery/8.png
(L) [2014/09/02] [ost
by raider] [Ifu - cloud simulator and renderer] Wayback!Hm... looks really nice. Where are you going to use that code, any plans?
(L) [2014/09/02] [ost
by snwy_] [Ifu - cloud simulator and renderer] Wayback!Thanks - no other plans for the code. It's been coming together slowly for a few years for personal interest, and I assume it'll keep getting updated every now and then for the same reason. The option for higher-resolution fluid grids (more detailed clouds) is next on the list of updates, and ought to be done sometime this month.
(L) [2014/09/22] [ost
by snwy_] [Ifu - cloud simulator and renderer] Wayback!Ifu is now in beta (and had a fourth alpha release in the meantime).
Find the changelog here: [LINK http://personal.inet.fi/muoti/eimuoti/ifu/ifu-changelog.txt Changelog.txt]
I've updated the first post accordingly.
Descriptive bug and usability reports are encouraged.
(L) [2014/10/17] [ost
by citadel] [Ifu - cloud simulator and renderer] Wayback!Impressive cloudy look. I have something different though, using path tracing +
woodcock tracking (according to Steve Marschner's notes on volumetric path tracing
and also implementation from Mitsuba renderer).
I wonder the difference because mine doesn't look as sky-ish.
[IMG #1 Image]
[IMG #2 Image]
1)Is it the data
    I use a single albedo for each channel across the whole volume, and the sigma_t
    is linear to density. Albedo is close to one.
2)Is it the phase function
    Is it a huge boost to use Mie scattering?
    I tried Henyey-Greenstein with strong forward peak and used a higher sigma_t,
    but it's too transparent in the thin parts. So I settled for spherical PF with
    a reduced sigma_t.
3)Is it the lighting
    I know it's index-matched and ready for direct lighting or importance sampling,
    but I prefer to use a soft(but still HDR) environment map first. Ifu seems to
    use a strong light?
Could you add this feature to export the volume data to another format, say ascii.
Thank you for your impressive work.
[IMG #1]:Not scraped:
https://web.archive.org/web/20210509163933im_/http://www.opengpu.org/data/attachment/album/201410/17/145222rq49ks61x9d3bvbd.png
[IMG #2]:Not scraped:
https://web.archive.org/web/20210509163933im_/http://www.opengpu.org/data/attachment/album/201410/17/145223mr8hgfz7q3eo85em.png
(L) [2014/10/18] [ost
by snwy_] [Ifu - cloud simulator and renderer] Wayback!The clouds are saved in relatively straightforward binary, something like this:
[char - file version; here 'A']
[int - number of triangles in the 3d cloud mesh]
[float*12*number of triangles - the 3d triangle mesh; 3 vertices + normal]
[int*3 - resolution of the simulation grid, x/y/z; here z=y=x=simulator resolution]
[float*x*y*z - cloud-water content in each cell of the simulation grid]
The last two entries are what you want for the raw volume data. It's saved in the format of 'for (x){ for (y){ for (z){ data[INDEX(x, y, z)] } } }', where the data is indexed into as (x+(y*resolution)+(z*resolution*resolution)).
Most of the cloud rays in Ifu scatter forward, very roughly approximating Mie scattering. The chance for a ray to scatter when inside a cloud is determined by the amount of cloud-water in that cell, and some modifications to the phase function are made based on that chance (going along the simplified assumption that droplets are larger where there's more cloud-water, which isn't the case in real life).
Sunlight is a sort of simplified photon map, where at each scattering the direction of the sun ray is saved into the map. When tracing eye rays, the direction of the ray is matched at each scattering to the directions of the various incoming sun rays from the photon map to approximate how much sunlight is scattered in the direction of the eye ray.
(L) [2014/10/20] [ost
by citadel] [Ifu - cloud simulator and renderer] Wayback!Thanks for the explanations.
I trust that cloud is a very complicated medium and cannot be handled trivially.
I'm particularly interested in the look of a cumulus cloud,
where the bright parts have clear contrast with the self shadowed regions.
I've experimented a little and find that using Henyey-Greenstein phase function
favoring backward scattering (I use g=-0.7), allows a similar look.
I think a perfectly forward scattering (or close to) medium can't mimic the look of realistic
thick clouds because the reduced sigma_s is (1-g)*sigma_s (imagine a perfectly forward
scattering cloud with no absorption, sigma_s is reduced to zero thereby render the cloud
totally transparent), and in the case of cumulus clouds backward scattering weighs more.
test_00000dl_d_additional_linear_gamma_1_maximum_2.02983_minimum_0.png
(L) [2014/10/20] [tby citadel] [Ifu - cloud simulator and renderer] Wayback!Thanks for the explanations.
I trust that cloud is a very complicated medium and cannot be handled trivially.
I'm particularly interested in the look of a cumulus cloud,
where the bright parts have clear contrast with the self shadowed regions.
I've experimented a little and find that using Henyey-Greenstein phase function
favoring backward scattering (I use g=-0.7), allows a similar look.
I think a perfectly forward scattering (or close to) medium can't mimic the look of realistic
thick clouds because the reduced sigma_s is (1-g)*sigma_s (imagine a perfectly forward
scattering cloud with no absorption, sigma_s is reduced to zero thereby render the cloud
totally transparent), and in the case of cumulus clouds backward scattering weighs more.
[IMG #1 test_00000dl_d_additional_linear_gamma_1_maximum_2.02983_minimum_0.png]
[IMG #1]:Not scraped:
/web/20161005110457im_/http://ompf2.com/download/file.php?id=177&sid=8cbcb97405b9a559da8e591acb40340c
(L) [2014/10/20] [ost
by citadel] [Ifu - cloud simulator and renderer] Wayback!I have made a serious mistake that I did not use HG phase function but spherical one for direct lighting.
This is to some extent causing my confusion.
(L) [2014/10/20] [ost
by snwy_] [Ifu - cloud simulator and renderer] Wayback!Some dissertations on cloud simulation/rendering that may give ideas are Harris (2003), Bouthors (2008), and McLoughlin (2012). I think Bouthors was most concerned with rendering cumulus clouds. Might also look at Display of Clouds Taking into Account Multiple Anisotropic Scattering and Sky by Nishita etc. for potential ideas or sources.
back