[yt-users] About Implementation of a full radiative transfer equation in yt volume renderer

Moon-Ryul Jung moon at sogang.ac.kr
Thu Nov 15 17:56:53 PST 2012


Hi, everybody and Matthew:



I happened to encounter the blog of Matthew in the internet, and left some notes in the blog. I was led to this 

mailing list with the following request:



I like Python so much that I would like to do my experimentation with radiative transfer with Python environment.

     So, yt is a perfect environment. But it does not support a full radiative transfer equation yet. 



By a full radiative transfer equation I mean:



(1) dot (w, del L (x, w) ) = LeV_0 (x,w) + sigma_s (x) [  int_{ Sp} f_p( w, x, w' ) dw' ]  -  simga_t(x) L(x, w)



                                                                                                                                     for all x in a given volume V

                                                    where V_0 is the "free " part of the volume  V  in which objects are not occupied.

 

Here del is the spatial gradient operator, L(x,w) is the radiance at point x in the direction of w. LeV_0 (x,w) is the 

emitting radiance at point x in the direction of w. sigma_s(x) is the scattering coefficient at x. Sp  is the set of all solid angles. f_p(w, x, w') is the phase function at x, from direction w' to direction w. sigma_t (x) is the extinction or attenuation

coefficient, and sigma_t = sigma_s + sigma_a, where sigma_a is the absorption coefficient. 





(2) boundary conditions: for all x on surfaces of objects within the volume V:



   L(x,w) = LeS (x, w) + int_{Sp} f_s (w, x, w') L(x, w') dot ( N(x), w' ) dw'



 Here LeS(x,w) is the emitting radiace at x on a surface to direction w. f_s(w, x, w') is the reflection function  at x from

direction w' to direction w. 



By combining (1) and (2), we get a single integral equation:



(3) L(x, w) = rau( x_S, w) L (x_S, w) + int_{x_S, x} tau(x', x)  [ LeV_0 (x', w) + sigma_s(x') int_{Sp } f_p( w, x', w') dw' ] dx' 



Here tau(x', x) is the optical depth from x' to x: 



tau(x', x) = exp [ -int_{x, x'} sigma_t (x'') dx''  ]



It is not easy to find the radiance function L(x,w)  that satisfies the integral equation of (3), where L occurs in both sides of the equation. 



In computer graphics [within computer science], this problem has been solved mainly by means of Monte Carlo

Integration technique, in particular "path tracing" techniques. In these techniques, we randomly generate a set of 

paths from the camera to the light sources, and compute the solution L by averaging the radiances carried by each path. A  path is a sequence of positions in space. The essence of the techniques comes down to how to sample good paths

which contributes much to the final radiance at the camera. So may paths would not connect the camera and the light sources and thus would not contribute to the final radiance at the camera. 



I use the term "radiance"  to mean the radiant energy per unit area per solid angle, and is the same as

the "intensity" often  used in the literature. 



NOW: As far as I gathered information from various sources, the yt volume renderer implements only a special

case of a radiative transfer equation. It seems that it does not consider the second term ( the integration) in equation (3). 

Or  it simplifies the integration 

            int_{x_S, x} tau(x', x) [ LeV_0 (x', w) + sigma_s(x') int_{Sp } f_p( w, x', w') dw' ] dx' 



to



 int_{x_S, x} tau(x', x) [ LeV_0 (x', w) ] dx'.



That is, it does not support the phase function f_p(w, x', w'). 



But I would like to use the phase function. In that case, we may try a "single scattering" version or a "multiple scattering"

version. In the first version, each sampled position in the volume scatters only the radiance coming directly from the 

light source. In the second version, each sampled  position in the volume scatters the radiances scattered by

other positions. In this case, two or three multiple scattering would be good enough. But for me the single scattering

version would be just fine. 



-----

The project I am interested in is rainbow simulation. The phase functions of a collection of water drops will be computed

by means of Mie theory or some other variants. 



The implementation in C++ of path tracers are available in open source in the following site:



http://www.mitsuba-renderer.org/devblog/?p=473



This implementation is reliable and tested. I am willing to add the relevant parts of the code

into the yt volume renderer. 



But as is well known, it is not easy to find where to hack the existing code....



I think I need to cooperate with some one who knows the internal structure of the volume rendering code.



Sincerely



Moon R. Jung

Professor

Dept of Media Technology

School of Media

Sogang University.













 

 








Science is the refinement of everyday thinking.

Zen is your everyday life

Life is  at root  playing

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20121116/80ca3480/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moon at sogang.ac.kr.gif
Type: image/gif
Size: 44 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20121116/80ca3480/attachment-0001.gif>


More information about the yt-users mailing list