Article Info
Title |
Computation of Irradiance from Triangles by Adaptive Sampling |
Authors |
C. Ureña |
Published |
Computer Graphics Forum, Volume 19, Issue2, pp. 165-171, June 2000. Ed. Wiley. |
Abstract
We introduce an algorithm for sample positioning in a planar triangle, in order to make numerical integration of an arbitrary function defined on it. This algorithm has some interesting properties which make it suitable for applications in the context of realistic rendering. We use an adaptive triangle partitioning procedure, driven by an appropriate measure of the error. The underlying variance is shown to be bounded, and in fact it can be controlled, so that it approaches the minimum possible value. We show results obtained when applying the method to irradiance computation, in the context of final-gather algorithms.
Article Document
You can download here an extended internal report describing the algorithm.
Source code
The described algorithm has been implemented in C++, and tested on Linux computers, with GNU C++ compiler. The main class is
ETriangle. This class includes the code which makes adaptive sample placement.
The above source code contains references to other files, and does not includes a main function. The complete set of source files can also be obtained here. It includes the source code used to produce the images in the paper, and a Makefile.
- File source.t.gz: full source code (tar file compressed with gzip)
To compile this, just type make after extracting the files.
Images
The following images have been obtained by using 4 samples per pixel (left column) and 36 samples per pixel (right column). At each row, the images where obtained by:
- Solid angle sampling.
- Solid angle sampling and stratification
- Adaptive sampling, K=0.2
- Adaptive sampling, K=0.1
- Adaptive sampling, K=0.001
Note that the three last rows show less noise than the first two, for the same number of samples.
4 samples
|
36 samples
|