Implementation of the Dual Scattering Model (a mistake here)

Start from this one, I will add a series of posts regarding the dual scattering model along with my implementation progress.

The first issue, how to compute Equation 6.

Because \bar{a_f} is an integral, so it would be better to compute it in the application and then send it to the shader. At this moment, all I can think out is to declare it as an array with each entry holding the value for a certain inclination \theta_d, and then later in the fragment shader, use the inclination of direct illumination at that fragment to index into the array.

But how to compute the value at each entry?

Notice that the integrand contains f_s, which is the single scattering component and are fed with three parameters, \theta_d, \Phi and \omega. Recall my own implementation of Marschner’s model, the intensity are decided by \Phi, \theta_h and \theta_d, no \omega there. But judge from the author’s description of this equation, \omega should be the outgoing direction, that is, the eye direction in Marschner’s model.

In addition, since it is a double integral, two steps of numerical integration are needed to compute it. First, generate random distribution for \omega, which spreads on the front hemisphere. Then for each \omega, compute the inner integral.

A big notice here:
\theta_d in Equation 6 is not the difference angle, but the longitudinal inclination of the incoming light, which is denoted as \theta_i in the original Marschner’s paper. This has been clearly pointed out in the paper Efficient Implementation of the Dual Scattering Model in RenderMan, but not mentioned in Zinke et al’s dual scattering paper!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s