Lecture15-RayTracingBasics

Lecture15-RayTracingBasics - CS 455 Computer Graphics Ray...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 455 - Computer Graphics Ray Tracing Part I - The Basics Ray Tracing What is ray tracing? § Follow (trace) the path of a ray of light and model how it interacts with the scene § When a ray intersects an object, send secondary rays (reflection, shadow, transmission) and determine how they interact with the scene § Basic algorithm allows for:- Hidden surface removal- Reflections- Multiple light sources- Transparent refractions- Hard shadows § Extensions can achieve:- Soft shadows- Motion blur- Blurred reflections (glossiness)- Depth of field (finite apertures)- Translucent refractions- and more Ray Tracing • Produces Highly realistic scenes • Strengths: § Specular reflections § Transparency • Weaknesses: § Color bleeding (diffuse reflections) § Time consuming • Early References: § “An Improved Illumination Model for Shaded Display,” Turner Whitted, CACM, June 1980. § “Distributed Ray Tracing,” Cook, Porter, and Carpenter, Computer Graphics, July 1984, pp. 137-145. Ray traced images Ray Tracing • “Backward” ray tracing: § Traces the ray forward (in time) from the light source through potentially many scene interactions § Physically based § Global illumination model:- Color bleeding- Caustics- Etc. § Problem: most rays will never even get close to the eye § Very inefficient since it computes many rays that are never seen Eye Image plane Light Ray Tracing • “Forward” ray tracing: § Traces the ray backward (in time) from the eye, through a point on the screen § Not physically based § Doesn’t properly model:- Color bleeding- Caustics- Other changes in light intensity and color due to refractions and non-specular reflections § More efficient: computes only visible rays (since we start at eye) § Generally, ray tracing refers to forward ray tracing Eye Image plane Light Ray Tracing • Ray tracing is an image-order algorithm: Visibility determined on a per-pixel basis § Trace one (or more) rays per pixel § Compute closest object (triangle, sphere, etc.) for each ray • Produces realistic results • Computationally expensive 6000x8000 “couple of days” Minimal Ray Tracer • A basic (minimal) ray tracer is simple to implement: § The code can even fit on a 3×5 card (code courtesy of Paul Heckbert with a small change to output as a PPM file) : typedef struct{double x,y,z}vec;vec U,black,amb={.02,.02,.02};struct sphere{typedef struct{double x,y,z}vec;vec U,black,amb={....
View Full Document

Page1 / 30

Lecture15-RayTracingBasics - CS 455 Computer Graphics Ray...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online