Hacker News new | ask | show | jobs
by kuya 3979 days ago
Ray tracing is a more generic term that covers rendering techniques which trace rays between a camera and a scene. Back in the day everyone used Whitted style ray tracers to render shiny metal blobs because secular reflections are trivially handled with ray tracing. Unfortunately other physical aspects of light like diffuse reflections were not handled by early ray tracing algorithms.

Kajiya introduced the rendering equation, a mathematical formulation of global illumination (takes diffuse, secular into account). It's a multidimensional integral equation. Unidirectional path tracing is an algorithm he introduced to solve the rendering equation. It uses several rays traced from pixels in the camera bouncing randomly through the scene. It's a Monte Carlo integration algorithm for solving the nasty integrals.

Photon mapping involves a pass algorithm tracing light from light sources into the scene, then a pass (like path tracing) gathering that light back at the camera. It better handles more complex light effects like caustics.

2 comments

> It better handles more complex light effects like caustics.

I wouldn't say better. I would say it provides an approximation to the rendering equation more quickly than path tracing does. However, photon mapping is a biased algorithm, which means that if you average many independent renderings together, they won't converge on the correct (exact) image. Path tracing methods (bi-directional, Metropolis, etc.) converge on the exact solution, regardless of how noisy each individual rendering is. (However, it may be the case that an unwieldy number of samples is required for tricky caustics, so in practice, path tracing may fail to produce a correct result because of high variance.)

Photon Mapping might be biased, but it's extremely easy to make it consistent by using the method outlined by Knaus and Zwicker [1]. Using that method photon mapping will converge to the right result. Even without progressive photon mapping you can choose a photon radius that won't cause visible errors.

[1] http://cgg.unibe.ch/publications/2011/progressive-photon-map...

Stupid phone: secular-specular