07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Path tracing 99<br />

}<br />

Color reflected = TracePath(newRay,depth+1);<br />

return emittance + ( BDRF * cos_omega * reflected );<br />

In the above example if every surface of a closed space emitted and reflected (0.5,0.5,0.5) then every pixel in the<br />

image would be white.<br />

Bidirectional path tracing<br />

In order to accelerate the convergence of images, bidirectional algorithms trace paths in both directions. In the<br />

forward direction, rays are traced from light sources until they are too faint to be seen or strike the camera. In the<br />

reverse direction (the usual one), rays are traced from the camera until they strike a light or too many bounces<br />

("depth") have occurred. This approach normally results in an image that converges much more quickly than using<br />

only one direction.<br />

Veach and Guibas give a more accurate description veach1997metropolis :<br />

These methods generate one subpath starting at a light source and another starting at the lens, then they<br />

consider all the paths obtained by joining every prefix of one subpath to every suffix of the other. This<br />

leads to a family of different importance sampling techniques for paths, which are then combined to<br />

minimize variance.<br />

Performance<br />

A path tracer continuously samples pixels of an image. The image starts to become recognisable after only a few<br />

samples per pixel, perhaps 100. However, for the image to "converge" and reduce noise to acceptable levels usually<br />

takes around 5000 samples for most images, and many more for pathological cases. This can take hours or days<br />

depending on scene complexity and hardware and software performance. Newer GPU implementations are<br />

promising from 1-10 million samples per second on modern hardware, producing acceptably noise-free images in<br />

seconds or minutes. Noise is particularly a problem for animations, giving them a normally-unwanted "film-grain"<br />

quality of random speckling.<br />

Metropolis light transport obtains more important samples first, by slightly modifying previously-traced successful<br />

paths. This can result in a lower-noise image with fewer samples.<br />

Renderer performance is quite difficult to measure fairly. One approach is to measure "Samples per second", or the<br />

number of paths that can be traced and added to the image each second. This varies considerably between scenes and<br />

also depends on the "path depth", or how many times a ray is allowed to bounce before it is abandoned. It also<br />

depends heavily on the hardware used. Finally, one renderer may generate many low quality samples, while another<br />

may converge faster using fewer high-quality samples.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!