Giter VIP home page Giter VIP logo

tracer's Introduction

CUDA Path Tracer

Interactive real-time iterative path tracer in CUDA.

Advanced Rendering Seminar, University of Pennsylvania, Spring 2013

Links: Images, Video

render

Features

  • Diffuse Shading
  • Diffuse Reflection
  • Specular Reflection
  • Fresnel Reflection and Refraction
  • Anti-aliasing
  • Interactive Depth of Field
  • Interactive Camera
  • Interactive Object Manipulation

Two visualization modes:

  1. Fast single bounce ray tracing (default at startup)
  2. Path tracing

Controls

Modes

  • Ray Tracer - Press 1
  • Path Tracer - Press 2

Camera Controls

  • Rotate - Left Click drag
  • Zoom - Right Click drag
  • Pan - Middle Click drag
  • Focal Length - F / Shift+F
  • Lens Radius - G / Shift+G

Object Manipulation

  • Translate - Ctrl + Left Click + drag
  • Scale - Ctrl + Right Click + drag
  • Rotate - Ctrl + Middle Click + drag

Details

Interactive real-time iterative path tracer in CUDA.

Image draw done through CUDA OpenGL Interop, by mapping OpenGL pixel buffer object to CUDA memory, then drawing the pixel buffer out as a texture on a full screen quad.

Path tracing kernel is a per-bounce structure, instead of a mega-kernel structure, in order to minimize thread divergence.

Stream compaction was attempted in order discard dead paths and minimize thread workload. However, the overhead costs and memory coherency issues turned out to negatively affect performance. (If interested, see corresponding commit.)

Cornell Box scene description is hard-coded, but the renderer supports .obj files, with normals, and does soft normal barycentric interpolation across triangle faces.

In addition, there is a fast visualization mode for quickly viewing the scene before path tracing. Instead of OpenGL draw, it uses single bounce ray tracing on CUDA, in order to ensure exact image pixel correspondence with path tracing.

Performance

Hardware: Intel Core i7 2.40GHz, 8.00GB RAM, NVIDIA GeForce GT 650M

At 256x256 buffer size: ~20fps. Approximately converges at ~400 iterations, ~20 seconds.

At 512x512 buffer size: ~10fps. Approximately converges at ~300 iterations, ~30 seconds.

References

tracer's People

Contributors

nopjia 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.