Rendering (彩現 渲染).

Slides:



Advertisements
Similar presentations
5.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 5 A Simple Reflection Model.
Advertisements

Polygon Rendering Flat Rendering Goraud Rendering Uses Phong Reflectance Phong Rendering.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Light Issues in Computer Graphics Presented by Saleema Amershi.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading III Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading II Week.
IMGD 1001: Illumination by Mark Claypool
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Lighting and Shading Comp 770 Lecture Notes Spring 2009.
Lighting and Shading Wen-Chieh (Steve) Lin
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
7M836 Animation & Rendering
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Course Website: Computer Graphics 16: Illumination.
Lighting & Shading.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Fundamentals of Computer Graphics Part 6 Shading prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
CS 445 / 645: Introductory Computer Graphics
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Shading I Shandong University Software College Instructor: Zhou Yuanfeng
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Shading / Light Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Steve Sterley. Real World Lighting Physical objects tend to interact with light in three ways: Absorption (black body) Reflection (mirror) Transmission.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
CSE 381 – Advanced Game Programming GLSL Lighting.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
Specular Reflection Lecture 27 Mon, Nov 10, 2003.
Local Illumination and Shading
Cornell CS465 Spring 2004 Lecture 4© 2004 Steve Marschner 1 Shading CS 465 Lecture 4.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Chris Mayer & Nic Shulver Shading Definitions Light emanating from small surfaces is called a Point light sourcee.g. the sun (not really small though!)
Written by: Itzik Ben Shabat Technion - Israel Institute of Technology Faculty of Mechanical Engineering Laboratory for CAD & Lifecycle Engineering Lab.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Illumination Model How to compute color to represent a scene As in taking a photo in real life: – Camera – Lighting – Object Geometry Material Illumination.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
Illumination and Shading Sang Il Park Sejong University.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
David Luebke3/16/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1.
Computer Graphics Lecture 30 Mathematics of Lighting and Shading - IV Taqdees A. Siddiqi
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics: Illumination
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Computer Graphics (fall,2010) School of Computer Science University of Seoul Minho Kim.
CSE 470 Introduction to Computer Graphics Arizona State University
Illumination and Shading
Isaac Gang University of Mary Hardin-Baylor
Chapter IX Lighting.
Illumination and Shading
Computer Graphics Material Colours and Lighting
CS 480/680 Computer Graphics Shading.
Lighting Calculations
Presentation transcript:

Rendering (彩現 渲染)

Content Light-Material Interaction Phong Reflection model Gouraud vs. Phone Shading Fall 2013

Rendering The computation required to convert 3D scene to 2D display photo-realistically Fall 2013

Shading the gradation (of color) that give the 2D images the appearance of being 3D Fall 2013

Light-Material Interaction specular diffuse translucent Fall 2013

Light point, spot, directional lights ambient light: to account for uniform level room lighting describe a light source through a three-component (RGB) intensity Fall 2013

Phong Reflection Model Diffuse (漫射) Specular Ambient Fall 2013

Those Were the Days… “In trying to improve the quality of the synthetic images, we do not expect to be able to display the object exactly as it would appear in reality, with texture, overcast shadows, etc. We hope only to display an image that approximates the real object closely enough to provide a certain degree of realism.” – Bui Tuong Phong, 1975 Fall 2013

Lambert’s Cosine Law The reflected luminous intensity in any direction from a perfectly diffusing surface varies as the cosine of the angle between the direction of incident light and the normal vector of the surface. Intuitively: cross-sectional area of the “beam” intersecting an element of surface area is smaller for greater angles with the normal. Fall 2013

Lambert’s Cosine Law Ideally diffuse surfaces obey cosine law. Often called Lambertian surfaces. Id = kd Iincident cos  = kd Iincident (N·L). kd is the diffuse reflectance of the material. L N  Fall 2013

Phong Lighting Model Phong adds specular highlights. His original formula for the specular term: W(i)[cos s ]n s is the angle between the view and specular reflection directions. “W(i) is a function which gives the ratio of the specular reflected light and the incident light as a function of the the incident angle i.” Ranges from 10 to 80 percent. “n is a power which models the specular reflected light for each material.” Ranges from 1 to 10. Fall 2013

Phong Lighting Model More recent formulations are slightly different. Replace W(i) with a constant ks independent of the incident direction. What do we lose when we do this? Is= ks Iincident cosn = ks Iincident (V·R)n R = 2(N·L)N – L Fall 2013

Ambient Reflection Local illumination models account for light scattered from the light source only Light may be scattered from all surfaces in the scene. We are missing a lot of light, typically over 50% Ambient term = a coarse approximation to this missing flux This is a constant everywhere in the scene Fall 2013

Johann Heinrich Lambert (1728 – 1777) was a Swiss mathematician, physicist and astronomer. Diffuse Reflection Lambertian scatters (wikipedia): the irradiance landing on the area element is proportional to the cosine of the angle between the illuminating surface and the normal. When a Lambertian surface is viewed from any angle, it has the same radiance. Fall 2013

Specular Reflection a Effect of Shininess Coefficient a. v Fall 2013

Phong Reflection Model L: light source property (RGB) R: material property (RGB) ambient reflection diffuse reflection specular reflection final result To consider distance attenuation a: shininess coefficient Fall 2013

Phong Model (cont) For multiple light sources: Fall 2013

Blinn-Phong Model Popular variation of Phong model. Uses the halfway vector, H. Is = ks Iincident (N·H)n. H = (L+V) / | L+V | What are the advantages? L N  H V Fall 2013

Blinn-Phong Model Popular variation of Phong model. Uses the half vector, H. Is = ks Iincident (N·H)n. H = (L+V) / | L+V | Faster to compute than reflection vector. Still view-dependent since H depends on V. Jim Blinn (1949 - now) L N  H V Fall 2013

Blinn-Phong Model Time-Consuming! n r l An alternate formulation employs the half vector H Time-Consuming! Fall 2013 20

Blinn-Phong Highlights Does using N.H vs. R.V affect highlights? Yes, the highlights “spread” (Wikipedia) Why? Is this bad? Fall 2013

Blinn-Phong Highlights Does using N.H vs. R.V affect highlights? Yes, the highlights “spread”. Why? Is this bad? Not really, for two reasons. Can always adjust the exponent. Phong and Blinn-Phong are not physically based, so it doesn’t really matter! Fall 2013

Target of Shading: Polygon, Vertex or Fragments Recall the rendering (OpenGL) pipeline Fall 2013

Shading Modes Flat vs. Smooth Local vs. Global Flat: single color per face Gouraud (intensity interpolation) Phong (normal interpolation) Local vs. Global Fall 2013

Gouraud vs. Phong Most h/w implement Gouraud shading Phong shading can better imitate specular effects (∵normals are interpolated) Fall 2013

Fall 2013

Compare: Flat, Gouraud, Phong Fall 2013

Rendering Pipeline Tutorial No longer on line [local copy]

Rendering Pipeline (Foley and van Dam) Fall 2013