matt Posted August 12, 2012 Share Posted August 12, 2012 I did some work today converting simulated Mie phase function data [1] into a form usable for integration into a vop net shader - an exr file. This can be useful for rendering clouds, faithfully reproducing atmospheric optic effects like fogbows and glories. I've made a detailed writeup on my blog, and there's a demo on vimeo too: http://mattebb.com/weblog/rendering-clouds-with-the-mie-phase-function/ cheers [1] http://evasion.imag.fr/~Antoine.Bouthors/research/phd/thesis/tables/fitted_data_usage.html 1 Quote Link to comment Share on other sites More sharing options...
edward Posted August 12, 2012 Share Posted August 12, 2012 Interesting. Were you at SIGGRAPH? The DreamWorks cloud presentation mentioned that it would nice if we could render the Mie function. I wonder how this compares in speed with henyey-greenstein. Quote Link to comment Share on other sites More sharing options...
matt Posted August 12, 2012 Author Share Posted August 12, 2012 no, I would have loved to have been there! henyey-greenstein is reasonably simple[1], perhaps a bit cheaper than to the cost (using this method) of a texture lookup? Probably not by much... To properly calculate the Mie function from scratch is very heavy though - it goes right back to first principles (distribution of droplet sizes) and runs the physics through that. AFAIK it can take something like mieplot on the order of hours to calculate the full 180 degrees.. [1] (1 - g*g) / pow(1 + g*g - 2*g*costheta, 1.5f); Quote Link to comment Share on other sites More sharing options...
Macha Posted August 12, 2012 Share Posted August 12, 2012 (edited) But you wouldn't have to recalculate it, right? Once you have the data you can just look it up, like you did there, and if you don't care too much about energy conservation you could tweak it (or make it up!) for different materials. Edited August 12, 2012 by Macha Quote Link to comment Share on other sites More sharing options...
matt Posted August 13, 2012 Author Share Posted August 13, 2012 Well if you'er talking about calculating the Mie function at render time, you may as well just precalculate some versions in an offline process (in mieplot or something) for a few different droplet sizes. I don't know the maths involved but I bet it's pretty complex - not the sort of thing I'd really want to code from scratch in a shadeop or something. Quote Link to comment Share on other sites More sharing options...
edward Posted August 13, 2012 Share Posted August 13, 2012 BTW, I tried a simple example and couldn't find any problems with an array with 2000 entries in VEX. It would really help if you could log an issue with your version of the shader that uses arrays. Quote Link to comment Share on other sites More sharing options...
matt Posted August 13, 2012 Author Share Posted August 13, 2012 oh thanks! I should give it a more thorough look to see what the deal is there. Quote Link to comment Share on other sites More sharing options...
jonp Posted August 17, 2012 Share Posted August 17, 2012 Hey thanks for posting this, great info. How would you fold this into PBR in a way that could take advantage of MIS (multiple importance sampling)? I was just about to post a related concern about the included physically based phase function, which is that at extreme forward scattering angles it appears to clamp to a fixed value. Quote Link to comment Share on other sites More sharing options...
rob Posted August 20, 2012 Share Posted August 20, 2012 Hey Matt, Very interesting stuff. Were you on Dan B's cloud team at Dr D. I was always very interested in the set up you guys were using. Rob Quote Link to comment Share on other sites More sharing options...
tjeeds Posted October 24, 2012 Share Posted October 24, 2012 Lovin' it Matt. You're a killer! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.