Git Product home page Git Product logo

project2-pathtracer's Introduction


CIS565: Project 2: CUDA Pathtracer

Fall 2013

Due Wednesday, 10/02/13

Qiong Wang


INTRODUCTION

This is a fast GPU path tracer initialized by a CUDA ray tracer with ray parallelization. It is one project of CIS 565 GPU Programming course at University of Pennsylvania.

The basic algorithm of the path tracing of this project can be summarized as:

  1. Build a pool of rays that need to be tested;
  2. Construct an image that each color can be accumulated;
  3. Launch a kernel to trace one bounce of a ray;
  4. Add any new rays to the pool after bounce and check whether the ray hits the light source or not;
  5. Remove terminated rays from the pool;
  6. Repeat the third step until no ray left in the pool.

Since the number of the ray in the ray pool decreases we need fewer blocks per grid when launching the kernel. Hence, we can have a quite fast execution speed for the path tracer.

Note: Please run the 565Raytracer.sln file rather to run the 565Pathtracer.sln one, you can directly copy the 565Raytracer file from the Project 1 repo. Thank you :)


FEATURES IMPLEMENTED

Basic features:

  • Full global illumination (including soft shadows, color bleeding, etc.) by pathtracing rays through the scene.
  • Properly accumulating emittance and colors to generate a final image
  • Supersampled antialiasing
  • Parallelization by ray instead of by pixel via string compaction
  • Perfect specular reflection

Optional features:

  • Translational motion blur
  • Depth of field
  • Fresnel-based Refraction, i.e. glass (Still tuning)

SCREENSHOTS OF THE FEATURES IMPLEMENTED

  • Global illumination

ScreenShot

  • Properly accumulating emittance and colors to generate a final image

ScreenShot

  • Antialiasing (Stochastic method)

ScreenShot

  • Perfect specular reflection

ScreenShot

  • Translational motion blur

ScreenShot

  • Depth of field

With small radius for the circle of confusion

ScreenShot

With big radius for the circle of confusion

ScreenShot


VIDEOS OF IMPLEMENTATION

This is the video of the rendering process of the path tracer.

ScreenShot

The youtube link is here if you cannot open the video in the markdown file: http://www.youtube.com/watch?v=GcbRUaLgz5A


PERFORMANCE EVALUATION

Here is the table for the performance evaluation when changing the size of tile and with stream compaction or not.

tileSize with compaction time for running 10 iteration approximate fps
8 yes 0 : 22.72 0.440
10 yes 0 : 25.97 0.385
8 no 0 : 23.39 0.428
10 no 0 : 27.47 0.364

We can easily find that when the tile size become larger the fps decrease a little somehow. The fps with stream compaction is higher than that without stream compaction.


REFERENCES


ACKNOWLEDGEMENT

Thanks a lot to Patrick and Liam for the preparation of this project. And special thanks to Liam who helped us debugging so late till 4:30 am in the morning! Thank you all :)

project2-pathtracer's People

Contributors

gabriellaqiong avatar liamboone avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.