effects needed for realism effects needed for realism
play

Effects needed for Realism Effects needed for Realism Computer - PDF document

Effects needed for Realism Effects needed for Realism Computer Graphics (Fall 2005) Computer Graphics (Fall 2005) (Soft) Shadows Reflections (Mirrors and Glossy) COMS 4160, Lecture 21: Ray Tracing Transparency (Water, Glass)


  1. Effects needed for Realism Effects needed for Realism Computer Graphics (Fall 2005) Computer Graphics (Fall 2005) � (Soft) Shadows � Reflections (Mirrors and Glossy) COMS 4160, Lecture 21: Ray Tracing � Transparency (Water, Glass) http://www.cs.columbia.edu/~cs4160 � Interreflections (Color Bleeding) � Complex Illumination (Natural, Area Light) � Realistic Materials (Velvet, Paints, Glass) � And many more Ray Tracing Ray Tracing � Different Approach to Image Synthesis as compared to Hardware pipeline (OpenGL) � Pixel by Pixel instead of Object by Object � Easy to compute shadows/transparency/etc Image courtesy Paul Heckbert 1983 Outline Outline Ray Tracing: History Ray Tracing: History � History � Appel 68 � Basic Ray Casting (instead of rasterization) � Whitted 80 [recursive ray tracing] � Comparison to hardware scan conversion � Landmark in computer graphics � Lots of work on various geometric primitives � Shadows / Reflections (core algorithm) � Lots of work on accelerations � Ray-Surface Intersection � Current Research � Optimizations � Real-Time raytracing (historically, slow technique) � Ray tracing architecture � Current Research Section 10 in text

  2. Outline Ray Casting Outline Ray Casting � History Produce same images as with OpenGL � Visibility per pixel instead of Z-buffer � Basic Ray Casting (instead of rasterization) � Find nearest object by shooting rays into scene � Comparison to hardware scan conversion � Shade it as in standard OpenGL � Shadows / Reflections (core algorithm) � Ray-Surface Intersection � Optimizations Section 10.1-10.2 in text (we show visually, omitting math) � Current Research Ray Casting Comparison to hardware scan Comparison to hardware scan- -line line � Per-pixel evaluation, per-pixel rays (not scan-convert each object). On face of it, costly � But good for walkthroughs of extremely large models (amortize preprocessing, low complexity) Virtual Viewpoint � More complex shading, lighting effects possible Virtual Screen Objects Multiple intersections: Use closest one (as does OpenGL) Ray intersects object: shade using color, lights, materials Ray misses all objects: Pixel colored black Shadows Outline Outline Light Source � History � Basic Ray Casting (instead of rasterization) � Comparison to hardware scan conversion � Shadows / Reflections (core algorithm) � Ray-Surface Intersection Virtual Viewpoint � Optimizations � Current Research Virtual Screen Objects Shadow ray to light is unblocked: object visible Shadow ray to light is blocked: object in shadow 10.5 in textbook

  3. Shadows: Numerical Issues Mirror Reflections/Refractions • Numerical inaccuracy may cause intersection to be below surface (effect exaggerated in figure) • Causing surface to incorrectly shadow itself • Move a little towards light before shooting shadow ray Virtual Viewpoint Virtual Screen Objects Generate reflected ray in mirror direction, 10.6 in textbook Get reflections and refractions of objects Recursive Ray Tracing Recursive Ray Tracing Problems with Recursion Problems with Recursion For each pixel � Reflection rays may be traced forever � Trace Primary Eye Ray, find intersection � Trace Secondary Shadow Ray(s) to all light(s) � Generally, set maximum recursion depth � Color = Visible ? Illumination Model : 0 ; � Trace Reflected Ray � Color += reflectivity * Color of reflected ray � Same for transmitted rays (take refraction into account) Also see section 10.4 in text Effects needed for Realism • (Soft) Shadows • Reflections (Mirrors and Glossy) • Transparency (Water, Glass) • Interreflections (Color Bleeding) • Complex Illumination (Natural, Area Light) • Realistic Materials (Velvet, Paints, Glass) Discussed in this lecture Not discussed but possible with distribution ray tracing (10.11) Turner Whitted 1980 Hard (but not impossible) with ray tracing; radiosity methods

  4. Outline Ray/Object Intersections Outline Ray/Object Intersections � History � Heart of Ray Tracer � One of the main initial research areas � Basic Ray Casting (instead of rasterization) � Optimized routines for wide variety of primitives � Comparison to hardware scan conversion � Various types of info � Shadow rays: Intersection/No Intersection � Shadows / Reflections (core algorithm) � Primary rays: Point of intersection, material, normals � Texture coordinates � Ray-Surface Intersection � Work out examples � Optimizations � Triangle, sphere, polygon, general implicit surface � Current Research Section 10.3 Ray Ray- -Tracing Transformed Objects Tracing Transformed Objects Outline Outline We have an optimized ray-sphere test � History � But we want to ray trace an ellipsoid… � Basic Ray Casting (instead of rasterization) Solution: Ellipsoid transforms sphere � Comparison to hardware scan conversion � Apply inverse transform to ray, use ray-sphere � Shadows / Reflections (core algorithm) � Allows for instancing (traffic jam of cars) � Ray-Surface Intersection Mathematical details worked out in class � Optimizations � Current Research Section 10.8 of text Acceleration Acceleration Acceleration Structures Acceleration Structures Testing each object for each ray is slow Bounding boxes (possibly hierarchical) If no intersection bounding box, needn’t check objects � Fewer Rays Adaptive sampling, depth control � Generalized Rays Bounding Box Beam tracing, cone tracing, pencil tracing etc. � Faster Intersections � Optimized Ray-Object Intersections � Fewer Intersections Ray Spatial Hierarchies (Oct-trees, kd trees, BSP trees) Section 10.9 goes into more detail, we just discuss some approaches at high level

  5. Acceleration Structures: Grids Outline Acceleration Structures: Grids Outline � History � Basic Ray Casting (instead of rasterization) � Comparison to hardware scan conversion � Shadows / Reflections (core algorithm) � Ray-Surface Intersection � Optimizations � Current Research Interactive Raytracing Interactive Raytracing � Ray tracing historically slow � Now viable alternative for complex scenes � Key is sublinear complexity with acceleration; need not process all triangles in scene � Allows many effects hard in hardware � OpenRT project real-time ray tracing (http://www.openrt.de) Raytracing Raytracing on Graphics Hardware on Graphics Hardware � Modern Programmable Hardware general streaming architecture � Can map various elements of ray tracing � Kernels like eye rays, intersect etc. � In vertex or fragment programs � Convergence between hardware, ray tracing [Purcell et al. 2002, 2003] http://graphics.stanford.edu/papers/photongfx

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend