Visual Appearance Chapter 4 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.

Slides:



Advertisements
Similar presentations
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
Advertisements

CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Polygon Rendering Flat Rendering Goraud Rendering Uses Phong Reflectance Phong Rendering.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
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.
 Engineering Graphics & Introductory Design 3D Graphics and Rendering REU Modeling Course – June 13 th 2014.
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
Computer Graphics - Class 10
Rendering (彩現 渲染).
IMGD 1001: Illumination by Mark Claypool
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
(conventional Cartesian reference system)
Skin Rendering GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from David Gosselin’s Power Point and article, Real-time skin rendering,
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.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
7/2/2006Based on: Angel (4th Edition) & Akeine-Möller & Haines (2nd Edition)1 CSC345: Advanced Graphics & Virtual Environments Lecture 4: Visual Appearance.
Lighting & Shading.
SET09115 Intro Graphics Programming
Lecture 5: 3D Rendering Pipeline (II) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
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.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Game Object Appearance. The Three Faces of Designing GO Appearance The Artistic Face: ◦ aesthetic – beautiful and ugly ◦ done by artists The Communication.
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Game Programming 06 The Rendering Engine
Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Illumination and Shading
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
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.
Where We Stand So far we know how to: –Transform between spaces –Rasterize –Decide what’s in front Next –Deciding its intensity and color.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CDS 301 Fall, 2008 From Graphics to Visualization Chap. 2 Sep. 3, 2009 Jie Zhang Copyright ©
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Lecture 25 Fasih ur Rehman. Last Class Shading.
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
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
Computer Graphics (Fall 2006) COMS 4160, Lecture 16: Illumination and Shading 1
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Texturing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Computer Graphics (fall,2010) School of Computer Science University of Seoul Minho Kim.
Shading CS 465 Lecture 4 © 2004 Steve Marschner • 1.
- Introduction - Graphics Pipeline
Week 7 - Monday CS361.
Shading To determine the correct shades of color on the surface of graphical objects.
Photorealistic Rendering vs. Interactive 3D Graphics
Computer Graphics Chapter 9 Rendering.
The Graphic PipeLine
Visual Appearance Chapter 4
Deferred Lighting.
CS451Real-time Rendering Pipeline
CSE 470 Introduction to Computer Graphics Arizona State University
UMBC Graphics for Games
Computer Graphics Material Colours and Lighting
Lighting Calculations
Presentation transcript:

Visual Appearance Chapter 4 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Tomas Akenine-Mőller © 2002 Overview of today’s lecture Refresher on simple lighting models – Plus some new stuff Fog Gamma correction Transparency and alpha

Tomas Akenine-Mőller © 2002 Compute lighting at vertices, then interpolate over triangle How compute lighting? We could set colors per vertex manually For a little more realism, compute lighting from – Light sources – Material properties – Geometrical relationships light Geometry blue red green Rasterizer

Tomas Akenine-Mőller © 2002 Refresher on lighting Diffuse component : i diff i=i amb +i diff +i spec Diffuse is Lambert’s law: Photons are scattered equally in all directions

Tomas Akenine-Mőller © 2002 Lighting Specular component : i spec Diffuse is dull (left) Specular: simulates a highlight

Tomas Akenine-Mőller © 2002 Specular component: Phong Phong specular highlight model Reflect l around n: n l r -l-l Read about Blinns highlight formula: (n. h) m

Tomas Akenine-Mőller © 2002 Ambient component: i amb Ad-hoc – tries to account for light coming from other surfaces Just add a constant color:

Tomas Akenine-Mőller © 2002 Lighting i=i amb +i diff +i spec This is just a hack! Has little to do with how reality works! ++ = DEMO

Tomas Akenine-Mőller © 2002 Additions to the lighting equation Depends on distance: 1/(a+bt+ct ) Can have more lights: just sum their respective contributions Different light types: 2

Tomas Akenine-Mőller © 2002 What’s lighting and what’s shading? Lighting: the interaction between light and matter Shading: do lighting (at vertices) and determine pixel’s colors from these Three types of shading: – Flat, Goraud, and Phong

Tomas Akenine-Mőller © 2002 Fog Simple atmospheric effect – A little better realism – Help in determining distances Color of fog: color of surface: How to compute f ? 3 ways: linear, exponential, exponential-squared Linear:

Tomas Akenine-Mőller © 2002 Fog example Often just a matter of – Choosing fog color – Choosing fog model – Turning it on

Tomas Akenine-Mőller © 2002 Gamma correction If input to gun is 0.5, then you don’t get 0.5 as output in intensity Instead, gamma correct that signal: gives linear relationship

Tomas Akenine-Mőller © 2002 Gamma correction I =intensity on screen V =input voltage (electron gun) a,  and  are constants for each system Common gamma values: Assuming  =0, gamma correction is:

Tomas Akenine-Mőller © 2002 Why is it important to care about gamma correction? Portability across platforms Image quality – Texturing – Interpolation One solution is to put gamma correction in hardware…

Tomas Akenine-Mőller © 2002 Transparency and alpha Transparency – Very simple in real-time contexts The tool: alpha blending (mix two colors) Alpha (  ) is another component in the frame buffer, or on triangle – Represents the opacity – 1.0 is totally opaque – 0.0 is totally transparent The over operator: Rendered object

Tomas Akenine-Mőller © 2002 Transparency Need to sort the transparent objects – Render back to front Lots of different other blending modes Can store RGB  in textures as well Two ways: – Unmultiplied – Premultiplied