Skip to content

ZoeWheatcroft/PhysicalRayTracingEngine

Repository files navigation

Table of Contents

Summary

Devs: Zoe Wheatcroft

C++ physics based ray tracing engine-- in progress!

code here

Basic Milestones

Refraction

refraction non-refractive The same scene with a refractive and non-refractive first ball. I also modified the shadow ray test to take transmissive materials into account-- I didn't realize that not only would a glass ball, as in this case, not have a shadow, but it also has two specular highlights.

Reflection

image

Procedural Textures

procedural_textures

Phong Lighting

phong

Basic Image!

ray_tracing

Setting the Scene

Here is my Blender recreation of Whitted's sample scene: image

It is as faithful of a recreation that I could manage! It may be tiny bit off but it achieves a semblance. Here are its measurements (location in x,y,z format, y-up is positive):

  • Center sphere
    • size: radius of 1
    • location: (0, 1.03, -4.4)
  • Back sphere
    • size: radius of 1
    • location: (0.87, 0.6, -2.0)
  • Floor
    • size: (0.6, 0, 2.0)
    • location: (1.3, 0, 0)
  • Camera
    • width: 1, height 0.5625
    • virtual viewpoint: (0, 1, -7.8)
    • rotation: (0, 0, 0)

Extra Additions

K-D Tree

tiny_bunny_kdtree

Above is the Stanford Bunny in my ray tracer. With this version of the bunny, there are 948 faces and 453 vertices. With the K-D tree, the entire image took just about 200 seconds to render. WIthout the k-d tree, it took almost 500. What a testament to the necessity of the k-d tree for high poly scenes!

Supersampling

With the supersampling (4 rays per pixel): image

Without the supersampling: image

Transmissive material shadow

refraction

About

C++ physics based ray tracing engine-- in progress!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published