Visual Appearance Chapter 4

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.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
 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
University of New Mexico
Computer Graphics - Class 10
Rendering (彩現 渲染).
IMGD 1001: Illumination by Mark Claypool
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
1Notes. 2Atop  The simplest (useful) and most common form of compositing: put one image “atop” another  Image 1 (RGB) on top of image 2 (RGB)  For.
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
CS 445 / 645 Introduction to Computer Graphics Lecture 18 Shading Shading.
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.
Game Object Appearance. The Three Faces of Designing GO Appearance The Artistic Face: ◦ aesthetic – beautiful and ugly ◦ done by artists The Communication.
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
Shading in OpenGL Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Visual Appearance Chapter 4 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
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 ©
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Lecture 25 Fasih ur Rehman. Last Class Shading.
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.
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
The Graphic PipeLine
Deferred Lighting.
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Chapter 14 Shading Models.
CSE 470 Introduction to Computer Graphics Arizona State University
Exploring Shaders in Unity
Game Programming Algorithms and Techniques
Computer Graphics Material Colours and Lighting
Computer Graphics (Fall 2003)
Lighting Calculations
Presentation transcript:

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

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 Geometry blue red green Rasterizer How compute lighting? We could set colors per vertex manually For a little more realism, compute lighting from Light sources Material properties Geometrical relationships Tomas Akenine-Mőller © 2002

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

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

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

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

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

Additions to the lighting equation 2 Depends on distance: 1/(a+bt+ct ) Can have more lights: just sum their respective contributions Different light types: 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

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

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

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

Tomas Akenine-Mőller © 2002 Gamma correction I=intensity on screen V=input voltage (electron gun) a,e, and g are constants for each system Common gamma values: 2.3-2.6 Assuming e=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 Very simple in real-time contexts The tool: alpha blending (mix two colors) Alpha (a) 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

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