3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Image plane 65<br />
Image plane<br />
In <strong>3D</strong> computer <strong>graphics</strong>, the image plane is that plane in the world which is identified with the plane of the<br />
monitor. If one makes the analogy of taking a photograph to rendering a <strong>3D</strong> image, the surface of the film is the<br />
image plane. In this case, the viewing transformation is a projection that maps the world onto the image plane. A<br />
rectangular region of this plane, called the viewing window or viewport, maps to the monitor. This establishes the<br />
mapping between pixels on the monitor and points (or rather, rays) in the <strong>3D</strong> world.<br />
In optics, the image plane is the plane that contains the object's projected image, and lies beyond the back focal<br />
plane.<br />
Irregular Z-buffer<br />
The irregular Z-buffer is an algorithm designed to solve the visibility problem in real-time 3-d computer <strong>graphics</strong>.<br />
It is related to the classical Z-buffer in that it maintains a depth value for each image sample and uses these to<br />
determine which geometric elements of a scene are visible. The key difference, however, between the classical<br />
Z-buffer and the irregular Z-buffer is that the latter allows arbitrary placement of image samples in the image plane,<br />
whereas the former requires samples to be arranged in a regular grid.<br />
These depth samples are explicitly stored in a two-dimensional spatial data structure. During rasterization, triangles<br />
are projected onto the image plane as usual, and the data structure is queried to determine which samples overlap<br />
each projected triangle. Finally, for each overlapping sample, the standard Z-compare and (conditional) frame buffer<br />
update are performed.<br />
Implementation<br />
The classical rasterization algorithm projects each polygon onto the image plane, and determines which sample<br />
points from a regularly spaced set lie inside the projected polygon. Since the locations of these samples (i.e. pixels)<br />
are implicit, this determination can be made by testing the edges against the implicit grid of sample points. If,<br />
however the locations of the sample points are irregularly spaced and cannot be computed from a formula, then this<br />
approach does not work. The irregular Z-buffer solves this problem by storing sample locations explicitly in a<br />
two-dimensional spatial data structure, and later querying this structure to determine which samples lie within a<br />
projected triangle. This latter step is referred to as "irregular rasterization".<br />
Although the particular data structure used may vary from implementation to implementation, the two studied<br />
approaches are the kd-tree, and a grid of linked lists. A balanced kd-tree implementation has the advantage that it<br />
guarantees O(log(N)) access. Its chief disadvantage is that parallel construction of the kd-tree may be difficult, and<br />
traversal requires expensive branch instructions. The grid of lists has the advantage that it can be implemented more<br />
effectively on GPU hardware, which is designed primarily for the classical Z-buffer.<br />
With the appearance of CUDA, the programmability of current <strong>graphics</strong> hardware has been drastically improved.<br />
The Master Thesis, "Fast Triangle Rasterization using irregular Z-buffer on CUDA", provide a complete description<br />
to an irregular Z-Buffer based shadow mapping software implementation on CUDA. The rendering system is<br />
running completely on GPUs. It is capable of generating aliasing-free shadows at a throughput of dozens of million<br />
triangles per second.