1 / 15

Overview: Ray Tracing

Overview: Ray Tracing. 22C:151 Computer Graphics Fall 2010. Preliminaries. Q: What is computer graphics? (Remember first class, or think of new ideas). Preliminaries. Q: What is computer graphics? Lots of subpieces , e.g.: Modeling Data representations Properties of virtual objects

alia
Download Presentation

Overview: Ray Tracing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Overview: Ray Tracing 22C:151 Computer Graphics Fall 2010

  2. Preliminaries • Q: What is computer graphics? • (Remember first class, or think of new ideas)

  3. Preliminaries • Q: What is computer graphics? • Lots of subpieces, e.g.: • Modeling • Data representations • Properties of virtual objects • Today, key ideais graphics involves image creation

  4. Preliminaries • Q: What is an image?

  5. Preliminaries • Q: What is an image? • In general, computer graphics output may include physical products, simulation data, video, sound, et cetera. • For this class, we will use a more common definition: A regular array of discrete pixels Also known as a raster image

  6. Preliminaries • Raster Image: • A grid of pixels • Each pixels stores a color • Usually consisting of red, green, and blue components • Most of graphics is concerned with how to create images

  7. How to Create an Image? • Two main approaches: • Rasterization • Ray tracing

  8. How to Create an Image? • Two main approaches: • Rasterization • Ray tracing • For context: • Rasterization is used in most modern video games • Ray tracing is used in many physical simulations • Movies typically use “REYES,” a variant of rasterization, though recent films are beginning to rely on ray tracing

  9. What is the Difference? • When coding, they appear very different • But similar at a high level • Rasterization: • For each piece of geometry • For each pixel inside the geometry • Color the pixel based on surface properties • Ray tracing: • For each pixel on screen • Find the closest visible piece of geometry • Color the pixel based on surface properties

  10. What is the Difference? • When coding, they appear very different • But similar at a high level • Rasterization: • For each piece of geometry • For each pixel inside the geometry • Color the pixel based on surface properties • Ray tracing: • For each pixel on screen • Find the closest visible piece of geometry • Color the pixel based on surface properties Changes: Order of the loops!

  11. Basic Ray Tracing • Given the basic ray tracing algorithm: • For each pixel on screen • Find the closest visible piece of geometry • Color the pixel based on surface properties • Q: What do you need to learn in order to implement it? • Discuss with your neighbors

  12. Basic Ray Tracing • Q: What do you need to learn in order to implement it? • Discuss with your neighbors

  13. Basic Ray Tracing • Did this last Thursday: • For each pixel on screen • Fill with a random color • So clearly, looping over pixels is not so hard

  14. Basic Ray Tracing • For each pixel: • Compute a ray through the pixel • Intersect ray with all geometry • Shade at closest intersection (smallest d) distance d

  15. But First: Review Some Math • Time to dust off your linear algebra!

More Related