Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Similar documents
Today. The Graphics Pipeline: Projective Transformations. Last Week: Schedule. XForms Forms Library. Questions?

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline

CSCI-4530/6530 Advanced Computer Graphics

CSCI-4530/6530 Advanced Computer Graphics

The 3-D Graphics Rendering Pipeline

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

News. Projections and Picking. Transforming View Volumes. Projections recap. Basic Perspective Projection. Basic Perspective Projection

Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing

Final projects. Rasterization. The Graphics Pipeline. Illumination (Shading) (Lighting) Viewing Transformation. Rest of semester. This week, with TAs

Fondamenti di Grafica 3D The Rasterization Pipeline.

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Viewing/Projection IV. Week 4, Fri Jan 29

Pipeline Operations. CS 4620 Lecture 14

Viewing/Projections III. Week 4, Wed Jan 31

Rasterization. MIT EECS Frédo Durand and Barb Cutler. MIT EECS 6.837, Cutler and Durand 1

CHAPTER 1 Graphics Systems and Models 3

Modeling Transformations

MIT Ray Tracing Ray Tracing

Announcements. Tutorial this week Life of the polygon A1 theory questions

Pipeline Operations. CS 4620 Lecture 10

Viewing and Projection

5.8.3 Oblique Projections

Chap 7, 2009 Spring Yeong Gil Shin

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Photorealism: Ray Tracing

Modeling Transformations

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Ray Tracing. Last Time? Today. Ray Casting. Durer s Ray Casting Machine. Reading for Today

The Rendering Equation & Monte Carlo Ray Tracing

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required:

Lecture 4: Viewing. Topics:

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Midterm Review. Wen-Chieh (Steve) Lin Department of Computer Science

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Ray Tracing. Quiz Discussion. Announcements: Final Projects. Last Time? Durer s Ray Casting Machine. Today

3-Dimensional Viewing

MIT EECS 6.837, Teller and Durand 1

What does OpenGL do?

Parallelization. Memory coherency helps when distributing rays to various threads/processors

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

Rasterization Overview

Ray Tracing. Announcements: Quiz. Last Time? Today. Durer s Ray Casting Machine. Ray Casting

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

COMP371 COMPUTER GRAPHICS

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Scan Conversion- Polygons

CS5620 Intro to Computer Graphics

CS Computer Graphics: Transformations & The Synthetic Camera

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Institutionen för systemteknik

Chapter 7 - Light, Materials, Appearance

Shading, Advanced Rendering. Week 7, Wed Feb 28

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Topics and things to know about them:

CS452/552; EE465/505. Intro to Lighting

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

CS 488. More Shading and Illumination. Luc RENAMBOT

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Two Dimensional Viewing

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.

The Graphics Pipeline. Interactive Computer Graphics. The Graphics Pipeline. The Graphics Pipeline. The Graphics Pipeline: Clipping

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

CSCI-4972/6963 Advanced Computer Graphics

Lecture 4. Viewing, Projection and Viewport Transformations

Introduction to Visualization and Computer Graphics

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Visibility: Z Buffering

COMPLETION OF Z-buffer Graphics Pipeline

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Computer Graphics. Modelling in 2D. 2D primitives. Lines and Polylines. OpenGL polygon primitives. Special polygons

9. Illumination and Shading

CS 464 Review. Review of Computer Graphics for Final Exam

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Graphics for VEs. Ruth Aylett

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

3D Geometry and Camera Calibration

Chap 7, 2008 Spring Yeong Gil Shin

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

Transcription:

Graphics Pipeline: Projective Last Time Shadows cast ra to light stop after first intersection Reflection & Refraction compute direction of recursive ra Recursive Ra Tracing maimum number of bounces OR contribution < error threshhold Epsilon Does Ra Tracing Simulate Phsics? Correct Transparent Shadow Ra Tracing is full of dirt tricks For eample, shadows of transparent objects: opaque? multipl b transparenc color? (ignores refraction & does not produce caustics) Animation b Henrik Wann Jensen Using advanced refraction technique (refraction for illumination is usuall not handled that well) Refraction and the Lifeguard Problem Does Ra Tracing Simulate Phsics? Running is faster than swimming Water Beach Lifeguard Photons go from the light to the ee, not the other wa What we do is backward ra tracing Run Person in trouble Swim

Forward Ra Tracing Start from the light source But low probabilit to reach the ee What can we do about it? Alwas send a ra to the ee. still not efficient The Rendering Equation Clean mathematical framework for lighttransport simulation At each point, outgoing light in one direction is the integral of incoming light in all directions multiplied b reflectance propert We ll see this later Questions? Toda Ra Casting / Tracing vs. advantages & disadvantages when is each appropriate? The Graphics Pipeline Projective Introduction to Ra Casting / Tracing Advantages? Smooth variation of normal, silhouettes Generalit: can render anthing that can be intersected with a ra Atomic operation, allows recursion Disadvantages? Time compleit (N objects, R piels) Usuall too slow for interactive applications Hard to implement in hardware (lacks computation coherence, must fit entire scene in memor) How Do We Render Interactivel? Use graphics hardware (the graphics pipeline), via OpenGL, MesaGL, or DirectX assignment 3 assignment 4 Most global effects available in ra tracing will be sacrificed, but some can be approimated

Given a primitive's vertices & the illumination at each verte: Figure out which piels to "turn on" to render the primitive Interpolate the illumination values to "fill in" the primitive At each piel, keep track of the closest primitive (- buffer) glbegin(gl_triangles) glnormal3f(...) glverte3f(...) glverte3f(...) glverte3f(...) glend(); Limitations of Restricted to scan- convertible primitives Object polgoniation Faceting, shading artifacts Effective resolution is hardware dependent No handling of shadows, reflection, transparenc Problem of overdraw (high depth compleit) What if there are man more triangles than piels? scan conversion flat shading ra tracing scan conversion gouraud shading Ra Casting vs. Rendering Pipeline Ra Casting vs. Rendering Pipeline Ra Casting For each piel For each object Send piels to the scene Discretie first Rendering Pipeline For each triangle For each piel Project scene to the piels Discretie last Ra Casting For each piel For each object Whole scene must be in memor Depth compleit: no computation for hidden parts Atomic computation More general, more fleible Primitives, lighting effects, adaptive antialiasing Rendering Pipeline For each triangle For each piel Primitives processed one at a time Coherence: geometric transforms for vertices onl Earl stages involve analtic processing Computation increases with depth of the pipeline Good bandwidth/computation ratio Sampling occurs late in the pipeline Minimal state required Movies both pipeline and ra tracing Games pipeline

Simulation pipeline (painter for a long time) CAD-CAM & Design pipeline during design, anthing for final image Architecture ra-tracing, pipeline with preprocessing for comple lighting Virtual Realit pipeline Visualiation mostl pipeline, ra-tracing for high-qualit ee cand, interactive ra-tracing is starting Medical Imaging same as visualiation

Questions? Toda Ra Casting / Tracing vs. The Graphics Pipeline Projective Introduction to The Graphics Pipeline The Graphics Pipeline Primitives are processed in a series of stages Each stage forwards its result on to the net stage The pipeline can be drawn and implemented in different was Some stages ma be in hardware, others in software Optimiations & additional programmabilit are available at some stages 3D models defined in their own coordinate sstem (object space) transforms orient the models within a common coordinate frame (world space) (Lighting) Vertices lit (shaded) according to material properties, surface properties (normal) and light sources Local lighting model (Diffuse, Ambient, Phong, etc.) Object space World space

Maps world space to ee space Viewing position is transformed to origin & direction is oriented along some ais (usuall ) Transform to Normalied Device Coordinates (NDC) World space Ee space Ee space Portions of the object outside the view volume (view frustum) are removed NDC The objects are projected to the 2D image place (screen space) Rasteries objects into piels Interpolate values as we go (color, depth, etc.) NDC Screen Space Common Coordinate Sstems Each piel remembers the closest object (depth buffer) Almost ever step in the graphics pipeline involves a change of coordinate sstem. are central to understanding 3D computer graphics. Object space local to each object World space common to all objects Ee space / Camera space derived from view frustum Clip space / Normalied Device Coordinates (NDC) [-,-,-] [,,] Screen space indeed according to hardware attributes

Coordinate Sstems in the Pipeline Questions? Object space World space Ee Space / Camera Space Clip Space (NDC) Screen Space Toda Ra Casting / Tracing vs. The Graphics Pipeline Projective & Homogeneous Coordinates Orthographic & Perspective s Coordinate Sstems & s in the Pipeline Canonical View Volume Introduction to Remember? Projective Affine Similitudes Linear Rigid / Euclidean Scaling Identit Translation Isotropic Scaling Reflection Rotation Shear Perspective Homogeneous Coordinates Most of the time w, and we can ignore it ' ' ' a e i b f j c g k d h l Homogeneous Visualiation Divide b w to normalie (homogenie) W? Point at infinit (direction) If we multipl a homogeneous coordinate b an affine matri, w is unchanged (,, ) (,, 2) (7,, ) (4, 2, 2) (4, 5, ) (8,, 2) w w 2

Orthographic vs. Perspective Orthographic Simple Orthographic Project all points along the ais to the plane Perspective Simple Perspective Project all points to the d plane, eepoint at the origin: Alternate Perspective Project all points to the plane, eepoint at the (,,-d): homogenie homogenie * d / * d / d / d /d * d / ( + d) * d / ( + d) ( + d)/ d /d In the limit, as d Where are projections in the pipeline? this perspective projection matri... /d...is simpl an orthographic projection Ee Space / Camera Space Clip Space (NDC) Screen Space

World Space Ee Space Change of Orthonormal Basis Positioning the camera u v n u v n u v n u v n Translation + Change of orthonormal basis Given: coordinate frames & uvn, and point p (,,) Find: p (u,v,n) v p v u u v p v u u where: u. u u. u etc. Normalied Device Coordinates Canonical Orthographic is more efficient in a rectangular, ais- aligned volume: (-,-,- ) (,,) OR (,,) (,,) Canonical Perspective Questions?

Toda Ra Casting / Tracing vs. The Graphics Pipeline Projective Introduction to Projecting to the Image Plane Wh Clip? Strategies What if the p is > ee? (ee, ee, ee ) ais + image plane What if the p is < ee? What if the p ee? (ee, ee, ee ) ais + (ee, ee, ee ) ais + image plane??? image plane "clip" geometr to view frustum (ee, ee, ee ) image plane ais + Eliminate portions of objects outside the viewing frustum View Frustum boundaries of the image plane projected in 3D left a near & far clipping plane User ma define additional clipping near planes far top right bottom

Wh Clip? Avoid degeneracies Don t draw stuff behind the ee Avoid division b and overflow Efficienc Don t waste time on objects outside the image boundar Other graphics applications (often non-conve) Hidden- surface removal, Shadows, Picking, Binning, CSG (Boolean) operations (2D & 3D) Strategies Don t clip (and hope for the best) Clip on-the-fl during rasteriation Analtical clipping: alter input geometr Net Time: & Line Rasteriation