Note: the original thesis document is written in Spanish. This page summarizes its contents in English.
Abstract
Physically-based rendering is ultimately a problem of numerical integration: each pixel of a synthetic image is the value of a high-dimensional integral over light transport paths. The dominant practical solution — Monte Carlo path tracing — samples those paths randomly, which converges to the correct answer but at the cost of variance that appears as noise in the rendered image. Pixels in smooth regions receive many “wasted” samples while pixels with fine structure remain under-sampled at equal budget.
This bachelor’s thesis explores an adaptive quadrature alternative to Monte Carlo. Instead of sampling uniformly at random, it estimates the numerical error of each region of the integration domain and directs further samples toward the regions where that error is highest, so that the number of samples scales with the complexity of the local integrand rather than being fixed up-front.
Method
The method is built on the Path Integral formulation of the rendering equation, combined with multidimensional adaptive quadrature using Simpson’s and trapezoidal rules as a posteriori error estimators. Two integration strategies are studied:
- Per-pixel subdivision. The two image-plane dimensions are fixed to the pixel centers, and adaptive subdivision operates over the remaining dimensions of the path space. This sidesteps the curse of dimensionality at the cost of losing image-plane adaptivity.
- Full-image subdivision. The image dimensions are included as part of the integration domain, so a single subdivision can span multiple pixels and polynomial interpolation amortizes samples across them. This behaves well on smooth regions and naturally provides antialiasing.
Subdivisions are ranked by their estimated error in a priority queue, which
steers the next sample to where it matters most. Two backing structures are
compared: a classical binary heap (STL priority_queue) with O(log n)
insert/pop but unbounded RAM growth, and a custom multi-bucket structure
(FileQueue) that groups subdivisions by error level and pages them out to
disk when the in-memory bucket limit is exceeded.
Implementation
The system is implemented in C++14 with Boost and the STL, compiled with
Clang on Fedora and built with CMake. Each integration strategy is exposed as
its own engine — EngineQuadratureGlobal, EngineQuadraturePerpixel,
EngineQuadratureImage — with ...File variants that swap the heap for the
FileQueue. Engines build on an existing RecursiveRayTracer used for
path-space sampling.
Results
- Smoother output than Monte Carlo. Adaptive quadrature replaces the stochastic noise of Monte Carlo with a structured error pattern, giving visually cleaner images on environment maps and smooth scenes at comparable or lower render times.
- Competitive convergence. Per-pixel adaptive subdivision converges to reference path-traced images in substantially less time on smooth regions, though discontinuities still require many subdivisions to resolve.
- Antialiasing. Full-image subdivision matches the quality of roughly 8× supersampled direct illumination at a fraction of the render time.
- Memory footprint. The custom FileQueue structure reduces peak RAM from ~300 MB with a classical heap to ~31 MB, at the cost of some disk I/O, enabling the adaptive approach to run on much larger images than the heap variant allows.
Future Work
- A hybrid strategy that uses full-image subdivision to partition the path space and Monte Carlo to sample within high-error regions — later explored by Crespo et al. (thesis, follow-up).
- Error estimators based on perceptual color spaces (HSV / HSL) instead of RGB distance.
- Algorithmic and storage optimizations to close the efficiency gap with production path tracers.