Skip to content

josephto/Project2-Pathtracer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


CIS565: Project 2: CUDA Pathtracer ------------------------------------------------------------------------------- Fall 2013 -------------------------------------------------------------------------------
INTRODUCTION: ------------------------------------------------------------------------------- This project is a CUDA based path tracer that utilizes the GPU to generate path traced images very quickly. The project reads in a text file that specifies the materials, objects, and camera for the scene. For my path tracer, I've implemented intersection testing for spheres and cubes, full global illumination, properly accumulating emittance, supersampled antialiasing, parallelization by ray with my own coded stream compaction, perfect specular reflection, depth of field, an interactive camera, and fresnel refraction. Here’s two sample renders: ![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/FinalRender.jpg "refractive spheres") ![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/PathTracerRender2.jpg "glass sphere")
SREENSHOTS: -------------------------------------------------------------------------------

Because my current CUDA compatible computer doesn't have the necessary software installed to screen capture a video of my path tracer in process, here are a bunch of screen shots illustrating the image converging.

![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/Screenshot2.jpg "screenshots") ![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/Screenshot4.jpg "screenshots") ![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/Screenshot6.jpg "screenshots") ![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/Screenshot8.jpg "screenshots") ![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/Screenshot9.jpg "screenshots") Final Render ![path tracer](https://raw.github.com/josephto/Project2-Pathtracer/master/renders/Screenshot.jpg "screenshots")
PERFORMANCE REPORT: -------------------------------------------------------------------------------

Here's a table with some performance analysis that I conducted on my code. I recorded how many seconds per iteration it takes for my path tracer with stream compaction and without stream compaction.

Maximum Ray Depth With Stream Compaction No Stream Compaction
1 0.036 sec/iter 0.035 sec/iter
2 0.066 sec/iter 0.052 sec/iter
4 0.121 sec/iter 0.089 sec/iter
8 0.201 sec/iter 0.160 sec/iter
16 0.291 sec/iter 0.268 sec/iter
32 0.399 sec/iter 0.336 sec/iter
64 0.548 sec/iter 0.345 sec/iter
128 0.825 sec/iter 0.357 sec/iter
256 1.379 sec/iter 0.383 sec/iter
512 2.482 sec/iter 0.430 sec/iter

As you can see, my stream compaction actually ended slowing down my path tracer. This is probably because I used a lot of memcopy to and from the GPU which seriously slowed down my stream compaction. I plan on going back and re-implementing the stream compaction so that it actually achieves a significant speed up per iteration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 56.6%
  • C++ 43.2%
  • Other 0.2%