Image Synthesis Assignment 3: Realistic Camera Simulation
Due: March 1
lensview.zip (contains src and bins for the lensview program)
realistic.zip (contains src and prebuilt windows binaries for camera simulator)
Many rendering systems approximate irradiance on the film plane by sampling the scene through an infinitesimal aperture (i.e a pin-hole). However, this technique fails to capture important imaging characteristics of multi-lens cameras such as depth of field, distortion, vignetting and spatially varying exposure. In this assignment, you will implement a realistic camera model capable of capturing these effects. Specifically, your camera model will simulate the traversal of light rays through complex lens assemblies as shown above. This assignment is divided into the following parts:
Build a camera simulator that loads lens specification files, computes values such as focal length, principle plane locations, etc., and traces rays through the lens elements. We provide an OpenGL framework you can use to visualize the lens system and report your simulation results.
Read the paper A Realistic Camera Model for Computer graphics, which describes in detail the algorithms you will need to implement. You should be comfortable with the concepts before you attempt to write any code for this assignment. Also, you may want to look over a text on basic lens optics and transformations.
Below is a table listing of the intrinsic properties of the four included lens systems. Note that all values are assumed to be measured in millimeters.
|
fstop |
aperture |
F |
F’ |
P |
P’ |
ep |
fisheye |
4.0 |
5.9 |
-8.0 |
-56.4 |
-17.9 |
-46.5 |
(-28.7, 6.9) |
wide |
2.8 |
8.1 |
6.6 |
-47.8 |
-15.4 |
-25.7 |
(-23.5, 8.8) |
telephoto |
5.5 |
39.5 |
332.6 |
-208.1 |
81.9 |
41.6 |
(-28.9, 32.2) |
dgauss |
2.1 |
16.6 |
27.2 |
-68.1 |
-23.2 |
-17.8 |
(-14.4, 25.7) |
Here are two images per lens system, where the image on the left is the ray-traced solution, and the image on the right is the thick lens approximation. In some instances I choose to highlight the deviation (or lack thereof) between the two methods .
| Double Gauss | |
![]() |
![]() |
Fisheye |
|
![]() |
![]() |
Telephoto |
|
![]() |
![]() |
| Wide Angle | |
![]() |
![]() |
This lens system was then used to develop a plugin for pbrt that simulates realistic camera systems. Below are a series of images rendered with the implemented plugin. Note: these images have different exposure settings because some are inherently under/over exposed. Every image uses the lens systems described above. The weighting function associated with each image is not the normal Cos(θ)^4 term, but rather a form factor derived in the accompanying paper.
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
![]() |
![]() |
|
Don't just scale your rays by -x, it turns out this doesn't work... DUH Check out my cool point sampling though, yeaaaaaa |
Ahh the flipped x axis... | Fuzziness plagued my soul for a good 12 hours until I realized that it was all due to the fact that I never refocused my system after adjusting the fstop |