Ray Tracing on the GPU - PowerPoint PPT Presentation

About This Presentation
Title:

Ray Tracing on the GPU

Description:

Every pixel yields at least one ray (more for antialiasing) ... Specular highlights. Straightforward reflection and refraction. Not just triangles! CUDA ... – PowerPoint PPT presentation

Number of Views:129
Avg rating:3.0/5.0
Slides: 18
Provided by: mikeal3
Category:
Tags: gpu | ray | specular | tracing

less

Transcript and Presenter's Notes

Title: Ray Tracing on the GPU


1
Ray Tracing on the GPU
  • Mike Allgyer

2
What is ray tracing?
  • Method of generating photo-realistic images
  • Simulates light bouncing around an environment
  • Traces light from camera to world

3
Ray tracing contd
  • Every pixel yields at least one ray (more for
    antialiasing)
  • Objects are tested for intersection with ray
  • Intersection with shortest distance is drawn
    (closest to camera)

4
Ray tracing contd
  • If hit
  • If object is reflective or refractive, bend
    light, spawn another ray (recursively)
  • Spawn ray from intersection to light source to
    calculate shadows
  • Color based on shading, texture, etc.

5
(No Transcript)
6
Why use rasterization?
  • Ray tracing is slow
  • Scenes can take hours or days to render
  • GPUs designed for rasterizing images
  • Current CPUs not powerful enough for real-time

7
Ray Tracing vs. Rasterization
  • Perfect, easy shadows
  • Specular highlights
  • Straightforward reflection and refraction
  • Not just triangles!

8
CUDA
  • New nVidia 8800 GPU
  • C compiler available to use GPU as general
    purpose CPU
  • My project!

9
Why GPU?
  • Floating-point arithmetic
  • Massively multi-threaded
  • Intel quad-core processor 4 processors
  • nVidia 8800 GTX 128 processors
  • Ray tracing ideal for parallel processing

10
Parallelization
  • 2 ways in ray tracing
  • Pixel space
  • Object space

11
Parallelizing pixel space
  • Each pixel independent
  • Can be calculated in any order
  • Each thread requires knowledge of entire scene
  • GPU 16 kb shared memory very limiting

12
Parallelizing Object Space
  • Each thread computes intersection of one object
  • Thread only needs knowledge of ray and single
    object.

13
Other Obstacles
  • No recursion
  • Memory may still be a problem

14
Project Summary
  • Real-time ray tracer
  • Implement on nVidia 8800 using CUDA
  • Parallelize object space

15
Results
  • Frame Rate
  • Resolution
  • Number of objects
  • Ideal
  • 60 fps
  • 1280x1024
  • 100,000 triangles
  • Well see!

16
Questions?
17
References
  • http//en.wikipedia.org/wiki/Ray_tracing
  • http//hof.povray.org/office-13.html
  • http//www.nvidia.com/page/8800_tech_briefs.html
Write a Comment
User Comments (0)
About PowerShow.com