kitchen with programmer's art
Abstract
Since I really did not have any idea what to render, I simply used Google Image andpicked the second image for the general idea. Here is the image I used as a reference.
from
http://blog69.fc2.com/k/kazubou5165/file/20060622160148.jpg
I also decided to add some computer graphics "things" to the scene. The goal was not to reproduce the scene, but to make a similar scene with some modifications. For the lighting, I used "flash" like lightingwhich perceptuallygives more realistic images.
Final Image
Features
I extended the Miro for the final project. In addition to all the features for the assignments (I implemented the all hacker points features), I have implemented the following features:
Modeling
I made the models using Metasequoia except for the bunny, teapot, buddha anddragon. For the floor in the final image, I applied displacement mapping outside of the renderer. Although I could use bump mapping for it, I used displacement mapping because the floor covers the large area of rendered image, which should be highly detailed. The resulting number of triangles is approximately 590k.
Wireframe rendering
Realtimepreview
MQO loader
Since the obj format can have relatively few parameters for materials, I decided to use the different format. I chose mqo format of Metasequoia which I used for modeling. All the material I have implemented can be specified by using the parameters in mqo files. For subsurface scattering, I used the reparameterization method described in [1] to get the scattering and absorption coefficients.
Hemispherical light source and area light sources
To simulate real world lighting, I have implemented hemispherical light source and area light sources. For hemispherical light source, it can use a single color specified by users. Area light sources are defined as an usual triangle mesh with an emitter material. Therefore, my renderer can handle light sources with any kinds of shape. Handling lots of light sources in triangle mesh is done by importance sampling of triangle area light sources.
White hemispherical light source + white diffuse surfaces
Area light sources (4 ceiling lights + 1 light above the
table)
Automatic estimation of intersection costs for BVH construction
Tuning parameters for BVH construction is tedious task. Since two parameters for SAH based BVH are estimated costs of intersection with triangle/AABB, my renderer actually measures the time to calculate these intersections before it constructs a BVH.
Fresnel reflections/refractions, Beer-Lambert's Law for colored transparent materials
I simply have implemented Beer-Lambert's Law for attenuation of lights in a glass like material. Note that the color difference between the ears and the body of the bunny.
Fresnel reflection + Beer-Lambert's law
Image textures
Because every object in real world has a "texture" on it, I added support for image textures. In my renderer, everything textured is automatically bump mapped to get further details.
Bump mapping with image texturing
Glossy reflections/refractions
Almost all real world metal has rather blurry reflections, so I added glossy reflections. In addition, I also added glossy refractions, which is useful for rendering of frosty glass.
Glossy reflection
Glossy refraction
Depth of field effect, chromatic aberration, arbitrary aperture shape, camera shake and vignetting
I believe one of the big difference between computer generated images and photographs is that computer generated images tend to be perfect. To fix (or "mess up") this problem, I have implemented several "bad" camera effects, which includedepth of field effect with a thin-lens model, chromatic aberration and arbitrary aperture shape by using user defined "aperture image", camera shake by randomly offsetting ray origin and vignettingbased on the cosine^4 law (thanks for Neel Joshiand Will Changfor suggesting to implement vignetting).
The aperture image
The focal plane is around the teapot in the middle. Note that the
"colored" blur caused by chromatic aberration.
Photon mapping (global and caustics)
Since removing noise by pure path tracing is really time consuming, I implemented the photon mapping based on the code provided on the class website. I also added support for caustics photon map.
Left: direct visualization of global photon mapping. Right: path
tracing
Caustics by caustics photon map
Final gathering
Directly visualizing photon mapping for global illumination might not be desirable due to its spotty noises, so I added final gathering,.
Final
gathering + direct illumination
Subsurface scattering
Ihave implemented subsurface scatteringbased onthe method described in [1]. For kd-tree construction, I utilized the codes for the photon mapping. Since we actually need irradiance results from global illuminationon the subsurface scattering material to use this method,I used the photon mapping for this purpose.
Translucent teapot
Participating media (single scattering)
I added support for participating media by ray marching. Since the scene I want to render does not involve much about participating media (except for subsurface scattering), I only added a single scattering. However, for the final image, I eventually did not use this because it seems not to be needed for my scene (who wants a smoky kitchen?).
Cornell box with participating media
Test for the final image
Progressive rendering
Deciding the sufficient number of samples beforehand is difficult, so I modified the code to do rendering progressively. The intermediate result is always written to the disk in the case of any kinds of crash. Although it is not technically interesting, itgreatly improved trial and error turnaround for setting materials and lighting.
RGB to Spectrum and Spectrum to RGB conversion
RGB triplet might not be enough to generate realistic color interreflection, so I did experiment for spectrum based rendering, including conversion from RGB to spectrum and spectrum to RGB using XYZ response curves. Although this feature is not incorporated to the rendererand not used for the final rendering, I wanted to mention this feature here because I came up with a new methodfor convertingRGB to spectrum based on non-linear optimization. This method moreaccurately reproduces RGB color when we reconvert the resulting spectrum into RGB color. The resulting spectrum is smooth across the whole range of frequency and strictly reside within 0 to 1, which is the case for real world material. The following original image and the result by Sun [3] are from [2]. Note that the results by Sun and Smit slightly lose the contrast, which is due to the error caused by the spectrum conversion.
The original image [2]
Converted image by my method
Converted image by Sun [3]
Converted image bySmit [4]
Some other test images
References
[1] Henrik Wann Jensen, Juan Buhler:
"A Rapid Hierarchical Rendering
Technique for Translucent Materials",
SIGGRAPH, 2002
[2] Takahiro Yoshinobu, Tomohisa Manabe, Kazufumi Kaneda,Hideo
Yamashita:
"The conversion method from RGB-image to Spectral-image"
Visual
Computing/Graphics and CAD joint symposium, 2003 (in Japanese).
[3] Yinlong Sun, F. David Fracchia, Thomas W. Calvert, Mark S. Drew:
"Deriving Spectra from Colors and Rendering Light Interference."
IEEE
Computer Graphics and Applications, 1999
[4] Brian Smits:
"An RGB-to-Spectrum Conversion for
Reflectance."
Jouranal of Graphics Tools, 1999