Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Similar documents
Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

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

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

Sung-Eui Yoon ( 윤성의 )

CPSC GLOBAL ILLUMINATION

CS5620 Intro to Computer Graphics

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Supplement to Lecture 16

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Intro to Ray-Tracing & Ray-Surface Acceleration

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

03 RENDERING PART TWO

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Local vs. Global Illumination & Radiosity

Topics and things to know about them:

Photorealism: Ray Tracing

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

Lighting and Shading

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Ray-Tracing. Misha Kazhdan

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

CHAPTER 1 Graphics Systems and Models 3

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

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

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Ray tracing. EECS 487 March 19,

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Ray Tracing. Shandong University

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I

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

Ray Tracing. Kjetil Babington

Global Illumination The Game of Light Transport. Jian Huang

Photorealism. Photorealism: Ray Tracing. Ray Tracing

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

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

COMP371 COMPUTER GRAPHICS

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

CS559 Computer Graphics Fall 2015

Virtual Reality for Human Computer Interaction

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

Computer Graphics I Lecture 11

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Lecture 11. More Ray Casting/Tracing

Pipeline Operations. CS 4620 Lecture 10

Homework #2. Shading, Ray Tracing, and Texture Mapping

Introduction to Ray-tracing Objectives

Ray Tracing. Last Time? Reading for Today. Reading for Today

6. Illumination, Lighting

Graphics for VEs. Ruth Aylett

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

Global Illumination. COMP 575/770 Spring 2013

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Ray-tracing Cont. Ray-tracing

Computer Graphics Ray Casting. Matthias Teschner

Illumination Models & Shading

Interactive Methods in Scientific Visualization

CS 428: Fall Introduction to. Raytracing. Andrew Nealen, Rutgers, /18/2009 1

CMSC427 Final Practice v2 Fall 2017

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Computer Graphics Global Illumination

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Lecture 15: Shading-I. CITS3003 Graphics & Animation

CS 488. More Shading and Illumination. Luc RENAMBOT

Render methods, Compositing, Post-process and NPR in NX Render

Visualisatie BMT. Rendering. Arjan Kok

782 Schedule & Notes

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Lecture 11: Ray tracing (cont.)

Distributed Ray Tracing

Shading I Computer Graphics I, Fall 2008

Shading, Advanced Rendering. Week 7, Wed Feb 28

Reflection and Shading

Comp 410/510 Computer Graphics. Spring Shading

A Little Background. Motivation. Motivation

Raytracing CS148 AS3. Due :59pm PDT

Advanced Ray Tracing

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Ray Tracing. Foley & Van Dam, Chapters 15 and 16

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Recursion and Data Structures in Computer Graphics. Ray Tracing

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Computer Graphics. Lecture 9 Environment mapping, Mirroring

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

Raytracing. COSC 4328/5327 Scott A. King

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Chapter 11. Caustics and Global Illumination

Illumination & Shading: Part 1

Assignment 6: Ray Tracing

Transcription:

Topic 12: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Texture sources: Photographs

Texture sources: Procedural

Texture sources: Solid textures

Texture sources: Synthesized

Original Synthesized Original Synthesized

Texture coordinates How does one establish correspondence? (UV mapping)

Aliasing During Texture Mapping aliasing

MIP-Mapping: Basic Idea Given a polygon, use the texture image, where the projected polygon best matches the size of the polygon on screen.

Bump mapping

Environment Map Render a 3D scene as viewed from a central viewpoint in all directions (as projected onto a sphere or cube). Then use this rendered image as an environment texture an approximation to the appearance of highly reflective objects.

Environment Mapping Cube

Environment Mapping

Local vs. Global Illumination Local Illumination Models e.g. Phong Model source from a light reflected once off a surface towards the eye Indirect light is included with an ad hoc ambient term which is normally constant across the scene Global Illumination Models e.g. ray tracing or radiosity (both are incomplete) Try to measure light propagation in the scene Model interaction between objects and other objects, objects and their environment

All surfaces are not created equal Specular surfaces e.g. mirrors, glass balls An idealized model provides perfect reflection Incident ray is reflected back as a ray in a single direction Diffuse surfaces e.g. flat paint, chalk Lambertian surfaces Incident light is scattered equally in all directions General reflectance model: BRDF

Categories of light transport Specular-Specular Specular-Diffuse Diffuse-Diffuse Diffuse-Specular

Ray Tracing Traces path of specularly reflected or transmitted (refracted) rays through environment Rays are infinitely thin Don t disperse Signature: shiny objects exhibiting sharp, multiple reflections Transport E - S S S D L.

Ray Tracing Unifies in one framework Hidden surface removal Shadow computation Reflection of light Refraction of light Global specular interaction

Topic 13: Basic Ray Tracing Introduction to ray tracing Computing rays Computing intersections ray-triangle ray-polygon ray-quadric Computing normals Evaluating shading model Spawning rays Incorporating transmission refraction ray-spawning & refraction

Rasterization vs. Ray Tracing Rasterization: -project geometry onto image. -pixel color computed by local illumination (direct lighting). Ray-Tracing: -project image pixels (backwards) onto scene. -pixel color determined based on direct light as well indirectly by recursively following promising lights path of the ray.

Ray Tracing: Basic Idea

Ray Tracing: Advantages Customizable: modular approach for ray sampling, ray object Intersections and reflectance models. Variety of visual effects: shadows, reflections, refractions, indirect illumination, depth of field etc. Parallelizable: each ray path is independent. Speed vs. Accuracy trade-off: # and recursive depth of rays cast.

Ray Tracing: Basic Algorithm For each pixel q { compute r, the ray from the eye through q; find first intersection of r with the scene, a point p; estimate light reaching p; estimate light transmitted from p to q along r; }

Ray Tracing Imagery

Ray Tracing vs. Radiosity

Topic 13: Basic Ray Tracing Introduction to ray tracing Computing rays Computing intersections ray-triangle ray-polygon ray-quadric Computing normals Evaluating shading model Spawning rays Incorporating transmission refraction ray-spawning & refraction

Computing the Ray Through a Pixel: Steps Pixel q in local camera coords [x,y,d,1] T Let C be camera to world transform Sanity check e= C [0,0,0,1] T pixel q at (x,y) on screen is thus C [x,y,d,1] T Ray r has origin at q and direction (q-e)/ q-e. e (x,y)

Topic 13: Basic Ray Tracing Introduction to ray tracing Computing rays Computing intersections ray-triangle ray-polygon ray-quadric the scene signature Computing normals Evaluating shading model Spawning rays Incorporating transmission refraction ray-spawning & refraction

Computing Ray-Triangle Intersections Let ray be defined parameterically as q+rt for t>=0. Compute plane of triangle <p1,p2,p3> as a point p1 and normal n= (p2-p1)x(p3-p2). Now (p-p1).n=0 is equation of plane. Compute the ray-plane intersection value t by solving (q+rt-p1).n=0 => t= (p1-q).n /(r.n) Check if intersection point at the t above falls within triangle.

Computing Ray-Quadric Intersections Implicit equation for quadrics is p T Qp =0 where Q is a 4x4 matrix of coefficients. Substituting the ray equation q+rt for p gives us a quadratic equation in t, whose roots are the intersection points.

Computing Ray-Sphere Intersections (c-q) 2 ((c-q).r) 2 =d 2 - k 2 k Solve for k, if it exists. r d Intersections: q c q+r((c-q).r +/- k)

Intersecting Rays & Composite Objects Intersect ray with component objects Process the intersections ordered by depth to return intersection pairs with the object.

Ray Intersection: Efficiency Considerations Speed-up the intersection process. Ignore object that clearly don t intersect. Use proxy geometry. Subdivide and structure space hierarchically. Project volume onto image to ignore entire Sets of rays.

Topic 13: Basic Ray Tracing Introduction to ray tracing Computing rays Computing intersections ray-triangle ray-polygon ray-quadric the scene signature Computing normals Evaluating shading model Spawning rays Incorporating transmission refraction ray-spawning & refraction

Computing the Normal at a Hit Point Polygon Mesh: interpolate normals like with Phong Shading. Implicit surface f(p)=0 : normal is gradient(f)(p). Explicit parametric surface f(a,b): δf(s,b)/ δs X δf(a,t)/ δt Affinely transformed shape:

Topic 13: Basic Ray Tracing Introduction to ray tracing Computing rays Computing intersections ray-triangle ray-polygon ray-quadric the scene signature Computing normals Evaluating shading model Spawning rays Incorporating transmission refraction ray-spawning & refraction

Evaluating the Shading Model I(q) = L(n,v,l) + G(p)k s Intensity at q = phong local illum. + global specular illum. q v n l G

Reflected ray is sent out from intersection point

Reflected ray has hit object

Transmitted ray generated for transparent objects

No reflection

Single reflection

Double reflection

Topic 13: Basic Ray Tracing Introduction to ray tracing Computing rays Computing intersections ray-triangle ray-polygon ray-quadric the scene signature Computing normals Evaluating shading model Spawning rays Incorporating transmission refraction ray-spawning & refraction

Ray Tracing with Refraction For transparent objects spawn an additional ray along the refracted direction and recursively return the light contributed due to refraction.

local illumination reflection refraction

Ray Tracing Deficiencies Ignores light transport mechanisms involving diffuse surfaces. Intersection computation time can be long and recursive algorithm can lead to exponential complexity.

Ray Tracing Efficiency Improvements Bounding volumes Spatial subdivision Octrees BSP

Ray Tracing Improvements: Caustics

Ray Tracing Improvements: Image Quality Backwards ray tracing Trace from the light to the surfaces and then from the eye to the surfaces shower scene with light and then collect it Where does light go? vs Where does light come from? Good for caustics Transport E S S S - D S S S - L

Ray Tracing Improvements: Image Quality Cone tracing Models some dispersion effects Distributed Ray Tracing Super sample each ray Blurred reflections, refractions Soft shadows Depth of field Motion blur Stochastic Ray Tracing

Antialiasing Supersampling jaggies w/ antialiasing point light area light

Radiosity Diffuse interaction within a closed environment Theoretically sound View independent No specular interactions Color bleeding visual effects Transport E D D D - L