Presentation is loading. Please wait.

Presentation is loading. Please wait.

Gene Au-yeung, Daniel Quach, Jeffrey Su, Albert Wang, Jessica Wang, David Woo.

Similar presentations


Presentation on theme: "Gene Au-yeung, Daniel Quach, Jeffrey Su, Albert Wang, Jessica Wang, David Woo."— Presentation transcript:

1 Gene Au-yeung, Daniel Quach, Jeffrey Su, Albert Wang, Jessica Wang, David Woo

2  Rendering technique: 3D scene to 2D image  Simulates physics of light propagation (rays).  Primary ray: from perspective of viewer (shot for every pixel on the screen)  Algorithm determines which object is hit first on ray’s path

3  At that hitpoint, a shader program is invoked.  To simulate a mirror reflection, the shader program can cast another ray

4  Shadow rays depend if the pixel is lit or in shadow  A pixel is lit if a ray can be shot to the light source without obstruction  If blocked, the pixel is in shadow

5  for each row  for each column ▪ Construct ray from camera through pixel (row, column) ▪ Find first shape hit by ray ▪ If (shape)  Calculate color at intersection point ▪ Else  Calculate background color ▪ Draw color

6  Color Calculation  for each light source ▪ if light is visible from this point ▪ Add light source’s contribution  Add contribution due to reflected ray  Add contribution due to refracted ray

7  Currently supports: spheres, reflections, shadows, diffuse lighting  Implement:  Refraction (Gene)  Planes (David)  Triangles (Albert)  Textures (Jessica)  Anti-Aliasing (Gene, Daniel)  Parallelization:  Initial investigation: Jeffrey  Whoever finishes their feature help Jeffrey

8

9  The bulk of ray tracer’s work lies in the recursive steps of reflecting each ray  However, we cannot parallelize each reflection since the second reflection cannot be completed until the first is done Must wait for this ray to trace Before starting the 2 nd or 3rd

10  Instead, we can parallelize the primary rays traced from the camera to the viewport  Divide viewport into 8 columns, have one thread calculating primary rays in each column  No data dependency, since each pixel’s color can be found independently of other pixels

11  With addition of anti-aliasing, a potential data dependency can occur as each primary ray requires information about the results of surrounding rays  Our potential solution is to re-check for edges at the boundaries between the 8 columns, then only apply anti-aliasing to pixels which are an edge

12  Currently: framework and repository ready  Week 7:  Implement raytracing features  Investigate parallelism using baseline code  Week 8:  Parallelize finished raytracer  Week 9:  Conduct performance tests between sequential and parallelized versions

13  http://www.athlonmp.com/reviews/processor s/ray-tracing-and-gaming-one-year-later/ http://www.athlonmp.com/reviews/processor s/ray-tracing-and-gaming-one-year-later/  http://www.codermind.com/articles/Raytrace r-in-C++-Part-III-Textures.html http://www.codermind.com/articles/Raytrace r-in-C++-Part-III-Textures.html


Download ppt "Gene Au-yeung, Daniel Quach, Jeffrey Su, Albert Wang, Jessica Wang, David Woo."

Similar presentations


Ads by Google