Skip to content

charliegil/Raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Triangle Intersections and Normal Interpolation

In this assignment, I implemented a simple ray tracer with triangle intersection capabilities and normal interpolation for smooth shading. The environment supports basic scene navigation using the WASD keys and includes multiple shading modes to visualize different aspects of our scene.

Cornell Box Scene

Below is an example of the Cornell box rendered with my raytracer.

Screenshot 2024-11-11 140048


2. Progressive Rendering, Direct Illumination, and Sampling

In the second assignment, progressive rendering and ray jittering were added to improve image quality by reducing aliasing. Additionally, we implemented Uniform and BRDF direction sampling along with Probability Density Function (PDF) sampling. This setup and the progressive renderer allow us to achieve smooth rendering results in simple scenes with reasonable performance.

Progressive Renderer in Action

Untitled video - Made with Clipchamp (2)

Sampling Techniques

Below are images showcasing different sampling techniques:

Uniform Sampling

uniform

BRDF Sampling

brdf


3. Mesh Lights, Light Importance Sampling and MIS

In this assignment, I added support for mesh lights, which allows for soft shadows, light importance sampling, and MIS, which allows us to blend BRDF and importance sampling to obtain better results. The following images show how MIS allows us to converge towards a correct image much faster.

BRDF Sampling @ 1spp

image

Light Importance Sampling @ 1spp

image

MIS: 50% BRDF, 50% LIS @ 1spp

image

Final Image @ 100spp

image


4. Path tracing

I added implicit and explicit path-tracing with Russian roulette termination in this assignment. As images are much nicer when using explicit path tracing, I have skipped results for implicit path tracing. Here are the results of explicit path tracing for increasing maximum bounces @ 100spp.

1 bounce

image

2 bounces

image

3 bounces

image

4 bounces

image

About

Custom raytracer and pathtracer.

Topics

Resources

Stars

Watchers

Forks

Languages