0% found this document useful (0 votes)
17 views

University of Waterloo CS 489: Monte Carlo Methods for Advanced Applications - Implementation of a path tracer

Uploaded by

dk4dv7vdgg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

University of Waterloo CS 489: Monte Carlo Methods for Advanced Applications - Implementation of a path tracer

Uploaded by

dk4dv7vdgg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Ray Tracing

Implementation of a path tracer

GT

July 27, 2023


Introduction

Path Tracing
• Recall a standard ray tracing approach in which rays can
branch into multiple directions.
• Kajiya (1986) proposed an extension, termed path tracing.
• It consists of only following the most probable path at each
intersection.

GT Ray Tracing July 27, 2023 2


Introduction

Path Tracing
• Recall a standard ray tracing approach in which rays can
branch into multiple directions.
• Kajiya (1986) proposed an extension, termed path tracing.
• It consists of only following the most probable path at each
intersection.
• Brute force path tracing: Send rays to the entire scene
• Importance sampling: Prioritize light sources

GT Ray Tracing July 27, 2023 2


Materials

Diffuse
The ray is scattered in a random direction:
• Uniformly sampled from hemisphere, or
• Cosine distribution

GT Ray Tracing July 27, 2023 3


Materials

Diffuse
The ray is scattered in a random direction:
• Uniformly sampled from hemisphere, or
• Cosine distribution

Metal
• The ray is reflected.
• Mildly randomized direction depending on fuzziness.

GT Ray Tracing July 27, 2023 3


Materials

Diffuse
The ray is scattered in a random direction:
• Uniformly sampled from hemisphere, or
• Cosine distribution

Metal
• The ray is reflected.
• Mildly randomized direction depending on fuzziness.

Dielectric
The ray is refracted (or internally reflected.)

GT Ray Tracing July 27, 2023 3


Materials

GT Ray Tracing July 27, 2023 4


Digressions

Camera
• Geometry: Wide angle lens, camera position, camera angle

GT Ray Tracing July 27, 2023 5


Digressions

Camera
• Geometry: Wide angle lens, camera position, camera angle

• Defocus Blur: Depth of field

GT Ray Tracing July 27, 2023 5


Digressions

Camera
• Geometry: Wide angle lens, camera position, camera angle

• Defocus Blur: Depth of field


• Motion Blur: Space-time ray tracing

GT Ray Tracing July 27, 2023 5


Digressions

GT Ray Tracing July 27, 2023 6


Digressions

Textures

3D Checker Texture

GT Ray Tracing July 27, 2023 7


Digressions

Textures

3D Checker Texture Image Mapping

GT Ray Tracing July 27, 2023 7


Light Source

GT Ray Tracing July 27, 2023 8


Light Source

Cornell Box Lite

200 rays per pixel, Uniform Hemisphere Sampling

GT Ray Tracing July 27, 2023 9


Importance Sampling

Prioritizing the Light Source

200 rays per pixel, Cosine


Distribution

GT Ray Tracing July 27, 2023 10


Importance Sampling

Prioritizing the Light Source

200 rays per pixel, Cosine 10 rays per pixel, Importance


Distribution Sampling

GT Ray Tracing July 27, 2023 10


Importance Sampling

Prioritizing the Light Source

200 rays per pixel, Cosine 10 rays per pixel, Importance 200 rays per pixel, Importance
Distribution Sampling Sampling

GT Ray Tracing July 27, 2023 10


Conclusion

Source Code

https://github.com/GauravTalreja/path-tracer/

GT Ray Tracing July 27, 2023 11

You might also like