Virtual Reality for Human Computer Interaction

Similar documents
Lighting. Figure 10.1

Virtual Reality for Human Computer Interaction

Comp 410/510 Computer Graphics. Spring Shading

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Shading I Computer Graphics I, Fall 2008

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

Illumination & Shading

Shading. Why we need shading. Scattering. Shading. Objectives

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

Introduction to Computer Graphics 7. Shading

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

CS5620 Intro to Computer Graphics

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

Overview. Shading. Shading. Why we need shading. Shading Light-material interactions Phong model Shading polygons Shading in OpenGL

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Three-Dimensional Graphics V. Guoying Zhao 1 / 55

CS452/552; EE465/505. Intro to Lighting

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

Why we need shading?

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Shading Intro. Shading & Lighting. Light and Matter. Light and Matter

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Illumination Models & Shading

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

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

CEng 477 Introduction to Computer Graphics Fall

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

CS 4600 Fall Utah School of Computing

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics V. Guoying Zhao 1 / 65

Reflection and Shading

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

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

w Foley, Section16.1 Reading

Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Shading. Shading = find color values at pixels of screen (when rendering a virtual 3D scene).

Models and Architectures

Shading. Brian Curless CSE 457 Spring 2017

Shading. Brian Curless CSE 557 Autumn 2017

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

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

CPSC / Illumination and Shading

Computer Graphics. Illumination and Shading

Lessons Learned from HW4. Shading. Objectives. Why we need shading. Shading. Scattering

Illumination in Computer Graphics

Illumination & Shading: Part 1

Sung-Eui Yoon ( 윤성의 )

6. Illumination, Lighting

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

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

CHAPTER5. We have learned to build three-dimensional graphical models and to LIGHTING AND SHADING

Simple Lighting/Illumination Models

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

Illumination and Shading

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Objectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading.

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

Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

Illumination and Shading

Lighting and Shading

Pipeline Operations. CS 4620 Lecture 10

Illumination and Shading

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

03 RENDERING PART TWO

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

Assignment 2 Ray Tracing

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Shading and Illumination

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

Visualisatie BMT. Rendering. Arjan Kok

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source

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

Pipeline Operations. CS 4620 Lecture 14

Raytracing CS148 AS3. Due :59pm PDT

Reading. Shading. Introduction. An abundance of photons. Required: Angel , Optional: OpenGL red book, chapter 5.

Shading 1: basics Christian Miller CS Fall 2011

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

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

Chapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

CPSC GLOBAL ILLUMINATION

Ray-Tracing. Misha Kazhdan

Chapter 2 A top-down approach - How to make shaded images?

Supplement to Lecture 16

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

Computer Graphics. Illumination and Shading

Shading , Fall 2004 Nancy Pollard Mark Tomczak

INF3320 Computer Graphics and Discrete Geometry

Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong

Deferred Rendering Due: Wednesday November 15 at 10pm

Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Graphics for VEs. Ruth Aylett

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

Lighting and Materials

Transcription:

Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color additive system (taking into account the described problems) Frames can be displayed using RGB system:

Motivation Suppose we build a model of a green sphere using many polygons and just color it. We get something like:! The image of the sphere looks flat! But light-material interactions should cause each point to have a different color or shade to generate depth perception. Need to consider Light sources Material properties Location of viewer Surface orientation Principle Lighting Model 1. Lighting (or illumination): Description or model of light-object-eye interaction. 2. Shading: (Algorithmical) lighting application across a primitive. Physically, surfaces may reflect or emit light or both. Color that we see is determined by multiple interactions between light and surfaces. Recursive process: Light from A is reflected on B is reflected on A is reflected on B Equations could be derived which use principles like conservation of energy to describe this process. This results in integral equation which can not be solved analytically but global model lighting approaches like ray-tracing and radiosity use numerical approximations which are becoming real-time capable (depending on parameterization and HW-support).

Principle Lighting Model Correct shading requires a global calculation involving all objects and light sources. Incompatible with pipeline model which shades each polygon independently (local rendering). Numerical solutions are expensive but can in principle be sped up using dedicated hardware. For real time computer graphics, approaches are utilized which imitate physically correct lightmatter-eye interaction, hence which look right. Exist many techniques for approximating global effects shadows translucency multiple reflections Local Lighting Model Local model: Following rays of light from light emitting surfaces (light-sources) instead of looking at a global energy balance. Derive a model which describes how these rays interact with reflecting surfaces. Will focus on single interaction in contrast to multiple interaction (like used in ray-tracing). This approach requires light sources and reflection model. Viewer sees only light which reaches eye. No reflection inbetween: Perception of light source s color. With surface reflection: Perception based on light source s color and surface material. Viewer s eye is exchanged for COP (Center of Projection) and projection plane.

Local Lighting Model Light that strikes an object is partially absorbed and partially scattered (reflected). The amount reflected determines the color and brightness of the object.! A surface appears red under white light because the red component of the light is reflected and the rest is absorbed The reflected light is scattered in a manner that depends on the smoothness and orientation of the surface. Reflecting Surfaces (a) Specular surfaces: Appear shiny because most of reflected light is scattered in a narrow range of abgles close to angle of reflection. Ideal reflectors: Mirrors (parts can be still absorbed). Angle of incidence is equal angle of reflection. (b) Diffuse surfaces: Reflected light is scattered in all directions. E.g., walls painted with matte or flat paint or terrains seen from hight. Perfect diffuse surfaces scatters equally in all directions. (c) Transluscent surfaces: Allow some light to penetrate the surface and to emerge from another location -> Refraction. Some incident light may be reflected as well. (a) (b) (c)

Light Sources In general, light sources should integrate light coming from all points on the source. Light can leave a surface by self-emission and/or reflection. Each point p=(x,y,z) on the surface is characterized by the direction of emission (", #) and the intensity of energy at each wavelength! and hence the illumination function To calculate the source s contribution to an illuminated surface one has to integrate over the source s surface, account for the emission angles and account for the distance between source and surface.! Integration (analytical or numerical) is expensive. Light Sources An approximation to light-material interaction uses 4 different light sources to calculate an intensity function I using the three color model of the human visual system. 1. Ambient light: Same amount of light everywhere, can model contribution of many sources and reflecting surfaces. 2. Point source: Model with position and color. 3. Distant (directional) light: Point source in infinite distance (parallel rays). 4. Spotlight: Point source with restricted light.

Ambient Light Near uniform lighting created by highly diffused light sources. One could model all light sources and interactions or use a concept called ambient light which lights all surfaces uniformly. is not viewer location dependent. m amb vector is a material attribute s amb vector is a light source attribute Point Light Sources Ideal point emits light in all directions. Intensity of illumination is inverse square of distance between source and surface. Use of point sources is more a matter of efficiency rather than realism as most sources have a dimension:

Spotlights and Distant Lights Spotlights: Point source with limited direction. Point source Ps in a direction I s and a width of ". Spotlight attenuation: Greater realism can be obtained by varying the intensity of light across the cone Typical Function: cos ( # ) = S. I Distant lights: Light sources that are distant to the surface Light is parallel: Lighting in OpenGL Light sources can be turned on/off: glenable(gl_lighting); glenable(gl_light0); Support: multiple lights (but performance suffers) For each light: Ambient, Diffuse, Specular per RGB Position, Direction Spotlight Exponent and Cutoff Angle Light to Surface Distance Attenuation

Lighting At A Point Lighting at a point on an object s surface: For each color in(red, Green, Blue): For each light source: For each light type (ambient, diffuse, specular): Determine the amount of light reaching the point (Typically Ignore Shadowing) Determine the amount of light reflected (Based on properties of the surface) I! => sum of all light reflection from each light source Lighting At A Point Illumination, I, at a point is modeled as the sum of several terms: More terms give more plausible results. Fewer terms give more efficient computations. Each additive term of I is expressed in primary colors, I r, I g and I b, i.e. I! where! is r, g, or b (typically defined as a range from 0 to 1) Each of these colors (I! ) is computed independently. Components (I! ), can be used to express how much light a source emits and a surface reflects. Total illumination: Sum of each light source I! =I!1 +I!2 +I! Various solutions for dealing with possible overflow (>1), e.g., clamp to max allowable normalize individual terms:

Applying a lighting model light blue green Geometry (transform & lighting) red Rasterizer (fragment shading) Calculating lighting using objects defined by their surfaces: In which coordinate system should the lighting be applied? For which points on objects surfaces should lighting be applied? Sampling into surface may be to coarse or may be to detailed and may produce unnecessary computational overhead and sampling artifacts. Idea: Lighting calculation per vertex and surface approximation in screen space. Supported by pipeline architecture.