Revision 15 as of 2007-06-13 11:08:56

    NicolasBenitez/FinalProject

Final Project

Group Members

Nicolas Benitez

Michael Graeb

Goal

The goal of our project was to render a convincing image of the sky. More specifically, we were interested in modeling the sky such that the result:

1) Had convincing coloration

2) Provided appropriate lighting for the other elements in the scene

3) Contained realistic clouds

The image that we used as a reference to try to create these effects was the following image of the New York city skyline, taken from http://wwp.new-york-usa.com/:

new-york-city

Sky Simulation

Nico was responsible for simulating the color and exitant radiance of the sky. To do so, he implemented a new type of light source as a pbrt plugin. We made several attempts at modeling the sky before settling on the current system.

The first version of our sky model was based on A Practical Analytic Model for Daylight by Preetham et al. In the paper, Preetham describes a method for rendering skies based on Perez's phenomenological model for sky color. Perez defines a function based on five parameters that determine the shape and intensity of the sky gradient. Preetham used data from an intricate simulation of the sky and attempted to fit the five parameters to this data.

We implemented this model, but found the results to be insufficient for our purposes. The main problem that we encountered with this model was that it was very difficult to "tweak" the colorization of the sky, since it depended only on solar angle and a variable called "turbidity," which is similar to visibility. In order to better capture the color of the original image, we decided to attempt a more phisically-based model.

[image:perez.png]

(an example of a sky rendered using our implementation of Preetham's model).

The model that we ended up using was mainly inspired by two papers: Modeling and Rendering of the Atmosphere Using Mie-Scattering by D. Jackel and B. Walter, and Display Method of the Sky Color Taking into Account Multiple Scattering, by T. Nishita.

According to both papers, the spectral properties of the atmosphere are well-described by Mie Theory, which uses Maxwell's equations to describe the interaction of light with spherical particles. Mie's general theory is very complicated and computationally intense. However, for small particles, Mie scattering reduces to an approximation called Rayleigh scattering, which explains phenomena such as the blue appearance of the daytime sky and red sunsets.

To try to make our system as flexible as possible, we modeled the sky as a set of an arbitrary number of different types of particles. This idea is similar to Walter's model, which used a set of concentric spheres to define areas of different optical properties. Each type of particle may define its own phase function, scattering coefficient, extinction coefficient (which is the same as the scattering coefficient for most atmospheric particles), and density distribution. Our final model used two types of particles: small particles, which we approximated using rayleigh scattering, and larger particles such as aerosols and soot, which we modeled with a highly forward-scattering phase function that was not very wavelength-dependant. Both types of particles fall off exponentially in density as a function of height.

To actually render the scene, we approximated the sun as a directional light with paralell rays. We computed the radiance coming from they sky along a ray in a way similar to the single-scattering volume integrator provided by pbrt (this method is described roughly the same in both papers as well). We took a fixed number of samples along the ray starting at the viewer and moving towards the outer edge of the atmosphere. At each step, we multiplied the radiance of the sun by the product of the phase function and scattering coefficient (together called the volume phase function). The result was then multiplied by the optical depth to the viewer and the optical depth to the sun from the current position along the ray. Because we did not implement multiple scattering, we had to multiply our optical depths by a correction factor so that the sky did not appear too dark.

Once we had implemented the basic functionality of our sky light source, we attempted to find real-world data to refine our model. The OPAC (Optical Properties of Aerosols and Clouds) software package is a tool for accessing the optical properties of particles in the Earth's atmosphere. OPAC is capable of outputting the extinction coefficient, scattering coefficient, and sampled phase function for various realistic mixtures of atmospheric particles. We wrote a class to parse this data and apply it to our own model, however, because the atmosphere is modeled in four discrete layers in OPAC, the resulting images had undesirable visual artifacts at the boundaries between layers. That said, given more time it would be interesting to work more on incorporating this data, since it is such a valuable resource for anyone attempting to simulate the sky. In the end, our method fell somewhere between the two extremes of a phenominological model and a completely physically accurate model - we modeled a rough approximation to the real physics, but based much of our parameters on pure aesthetics to come up with the best image.

References

A. J. Preetham , Peter Shirley , Brian Smits, A practical analytic model for daylight, Proceedings of the 26th annual conference on Computer graphics and interactive techniques, p.91-100, July 1999

Jackèl D, Walter B (1997) Modeling and rendering of the atmosphere using Mie-scattering. Comput Graph Forum 16(4):201–210

T. Nishita, Y. Dobashi, K. Kaneda, H. Yamashita, "Display Method of the Sky Color Taking into Account Multiple Scattering," Proc. Pacific Graphics'96, 117-132, 1996.

M.Hess, P.Koepke, and I.Schult, “Optical properties of aerosols and clouds: The software package OPAC,” Bull. Amer. Meteorol. Soc., vol. 79, pp. 831-844, May 1998.

Recent