University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.

Slides:



Advertisements
Similar presentations
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Advertisements

Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
1 Computer Graphics Chapter 9 Rendering. [9]-2RM Rendering Three dimensional object rendering is the set of collective processes which make the object.
1 Computer Graphics By : Mohammed abu Lamdy ITGD3107 University of Palestine Supervision: Assistant Professor Dr. Sana’a Wafa Al-Sayegh.
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
Computer Graphics - Class 10
IMGD 1001: Illumination by Mark Claypool
Lighting and Shading Wen-Chieh (Steve) Lin
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.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
LIGHTING Part One - Theory based on Chapter 6. Lights in the real world Lights bounce off surfaces and reflect colors, scattering light in many directions.
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.
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.
CS 638, Fall 2001 Admin Grad student TAs may have had their accounts disabled –Please check and the lab if there is a problem If you plan on graduating.
Shading & Texture. Shading Flat Shading The process of assigning colors to pixels. Smooth Shading Gouraud ShadingPhong Shading Shading.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
Steve Sterley. Real World Lighting Physical objects tend to interact with light in three ways: Absorption (black body) Reflection (mirror) Transmission.
03/14/02 (c) 2002 University of Wisconsin, CS559 Last Time Some more visibility (Hidden Surface Removal) algorithms –A-buffer –Scanline –Depth sorting.
CS 638, Fall 2001 Interactive Programs Games are interactive systems - they must respond to the user Today is all about how interactive programs are designed.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Komputer Grafik 2 (AK045206) Shading 1/17 Realisme : Shading.
11/04/04© University of Wisconsin, CS559 Fall 2004 Last Time Visibility –Z-Buffer and transparency –A-buffer –Area subdivision –BSP Trees –Exact Cell-Portal.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
Local Illumination and Shading
Where We Stand So far we know how to: –Transform between spaces –Rasterize –Decide what’s in front Next –Deciding its intensity and color.
In the name of God Computer Graphics. Where We Stand So far we know how to: –Transform between spaces –Draw polygons Next –Deciding a pixel’s intensity.
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.
David Luebke3/16/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
03/19/2002(c) University of Wisconsin, CS 559 Last Time BSP Tree rendering and exact visibility in mazes Local Shading –Diffuse term –Specular term.
Computer Graphics: Illumination
Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics.
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Illumination : Hearn & Baker Ch. 10
© University of Wisconsin, CS559 Spring 2004
Unit-7 Lighting and Shading
Chapter 14 Shading Models.
© University of Wisconsin, CS559 Fall 2004
Isaac Gang University of Mary Hardin-Baylor
Chapter IX Lighting.
Illumination and Shading
Computer Graphics (Fall 2003)
Chapter 14 Shading Models.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
Presentation transcript:

University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012

Rendering Recall the standard graphics pipeline: University of Texas at Austin CS 378 – Game Technology Don Fussell 2

Normal Vectors The intensity of a surface depends on its orientation with respect to the light and the viewer CDs are an extreme example The surface normal vector describes the orientation of the surface at a point Mathematically: Vector that is perpendicular to the tangent plane of the surface What’s the problem with this definition? Just “the normal vector” or “the normal” Will use N to denote University of Texas at Austin CS 378 – Game Technology Don Fussell 3

Local Shading Models Local shading models provide a way to determine the intensity and color of a point on a surface The models are local because they don’t consider other objects at all We use them because they are fast and simple to compute They do not require knowledge of the entire scene, only the current piece of surface University of Texas at Austin CS 378 – Game Technology Don Fussell 4

Local Shading Models (Watt 6.2) What they capture: Direct illumination from light sources Diffuse and Specular components (Very) Approximate effects of global lighting What they don’t do: Shadows Mirrors Refraction Lots of other stuff … University of Texas at Austin CS 378 – Game Technology Don Fussell 5

“Standard” Lighting Model Consists of several simple terms linearly combined: Diffuse component for the amount of incoming light reflected equally in all directions Specular component for the amount of light reflected in a mirror- like fashion Ambient term to approximate light arriving via other surfaces University of Texas at Austin CS 378 – Game Technology Don Fussell 6

Diffuse Illumination Incoming light, Ii, from direction L, is reflected equally in all directions No dependence on viewing direction Amount of light reflected depends on: Angle of surface with respect to light source Actually, determines how much light is collected by the surface, to then be reflected Diffuse reflectance coefficient of the surface, kd Don’t want to illuminate back side. Use University of Texas at Austin CS 378 – Game Technology Don Fussell 7

Diffuse Example University of Texas at Austin CS 378 – Game Technology Don Fussell 8 Where is the light source?

Specular Reflection (Phong Model) Incoming light is reflected primarily in the mirror direction R Perceived intensity depends on the relationship between the viewing direction V and the mirror direction R Bright spot is called a specular highlight Intensity controlled by: The specular reflectance coefficient k s The parameter n controls the apparent size of the specular highlight Higher n, smaller highlight University of Texas at Austin CS 378 – Game Technology Don Fussell 9 L R V

Specular Example University of Texas at Austin CS 378 – Game Technology Don Fussell 10

Putting It Together Global ambient intensity, I a : Gross approximation to light bouncing around of all other surfaces Modulated by ambient reflectance k a Emitted term I e – no reflected light, comes from object Just sum all the terms If there are multiple lights, sum contributions from each light Several variations, and approximations … University of Texas at Austin CS 378 – Game Technology Don Fussell 11

Flat shading Compute shading at a representative point and apply to whole polygon OpenGL uses one of the vertices Advantages: Fast - one shading value per polygon Disadvantages: Inaccurate Discontinuities at polygon boundaries University of Texas at Austin CS 378 – Game Technology Don Fussell 12

Gourand Shading Shade each vertex with it’s own location and normal Linearly interpolate across the face Advantages: Fast - incremental calculations when rasterizing Much smoother - use one normal per shared vertex to get continuity between faces Disadvantages: Specular highlights get lost University of Texas at Austin CS 378 – Game Technology Don Fussell 13

Phong Interpolation Interpolate normals across faces Shade each pixel Advantages: High quality, narrow specular highlights Disadvantages: Expensive Still an approximation for most surfaces Not to be confused with Phong’s shading model University of Texas at Austin CS 378 – Game Technology Don Fussell 14

University of Texas at Austin CS 378 – Game Technology Don Fussell 15