Skip to content

Implement a raytracer and simulate real-life light interactions with objects (like shadows/reflections) while experimenting with rendering objects made up of different materials (like dielectrics or specular).

Notifications You must be signed in to change notification settings

divyanshu-talwar/Raytracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raytracing

Implement a raytracer and simulate real-life light interactions with objects (like shadows/reflections) while experimenting with rendering objects made up of different materials (like dielectrics or specular).

In this project we:

  • Render a couple of objects in flat color.
  • Simulate specular/shiny surfaces with Blinn-Phong shading.
  • Render shadows.
  • Simulate reflective and dielectric materials using Schlick’s approximation to Fresnel’s reflection.
  • Simulate the attenuation of light while passing through dielectrics with Beer's law.

Results

  1. Rendering objects in flat color

  1. Blinn-Phong shading:

  1. Adding shadows:

  1. Simulate reflection and refraction with specular and dielectric objects:

    Reflection Refraction (Schlick’s approximation)
    cube_image sphere_image
  2. Beer–Lambert law

    Refraction (Schlick’s approximation) Refraction (Schlick’s approximation + Beer's Law)
    cube_image sphere_image

Execution

  • Generate the object file:
    • mkdir build && cd build
    • cmake ..\
    • make
    • cd ../
  • Execute the object file:
    • ./bin/raytracer

About

Implement a raytracer and simulate real-life light interactions with objects (like shadows/reflections) while experimenting with rendering objects made up of different materials (like dielectrics or specular).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published