Real-Time Rendering (2nd Edition)

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ECE 595 / CS 491 / CS 591 Real-Time Rendering & Graphics Hardware Pradeep Sen Advanced Graphics Lab Class 24 April 23, 2007 Real-time Rendering & Graphics Hardware Pradeep Sen Class 24 – April 23, 2007 Announcements Hope that you have started the final project! Won’t be in for office hours tomorrow Next week, Joe Kniss was supposed to give lectures but he has a family emergency. He won’t be here so class is cancelled (work on your project) GFX Café this week: Ken Perlin Real-time Rendering & Graphics Hardware Pradeep Sen Class 24 – April 23, 2007 Last time GPGPU Real-time Rendering & Graphics Hardware Pradeep Sen Class 24 – April 23, 2007 Today Real time ray tracing Course evaluations Real-time Rendering & Graphics Hardware Pradeep Sen Class 24 – April 23, 2007 What is ray tracing? Rendering algorithm developed by Turner Whitted T. Whitted, “An Improved Illumination Model for Shaded Display.” Communications of the ACM 1980 Real-time Rendering & Graphics Hardware Pradeep Sen Class 24 – April 23, 2007 Basic idea Send “rays” out from the eye (a ray is specified by a origin and a direction) One or more rays are sent out per pixel Intersect the ray with the scene geometry If ray intersects, then compute shaded value at that surface (send shadow ray to test shadow) If surface is reflective, compute reflection ray and repeat If surface is refractive, compute refracive ray and repeat Real-time Rendering & Graphics Hardware Pradeep Sen Class 24 – April 23, 2007 Basic idea occluder P R diffuse object S S T T R diffuse object S S Real-time Rendering & Graphics Hardware Pradeep Sen Class 24 – April 23, 2007 Ray tracing algorithm Color castRay(Ray r) { if (intersectRayWithGeometry(r, &i) { // i is the first intersection shadeSurface(r, i); if (r->depth < MAX_DEPTH) { // send reflection ray if (i->primitive->reflective) { r_refl = computeReflectionRay(r, i); refl_color = castRay(r_refl); } // send refraction ray if (i->primitive->refractive) { r_refr = computeRefractionRay(r, i); refr_color = castRay(r_refr); } } return (surf_color + K_refl * refl_color + K_refra * refr_color); } return Color(0,0,0); } Real-time Rendering & Graphics Hardware
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern