Computer Graphics Lecture 29 Mathematics of Lighting and Shading - III Taqdees A. Siddiqi cs602@vu.edu.pk.

Slides:



Advertisements
Similar presentations
Request Dispatching for Cheap Energy Prices in Cloud Data Centers
Advertisements

SpringerLink Training Kit
Luminosity measurements at Hadron Colliders
From Word Embeddings To Document Distances
Choosing a Dental Plan Student Name
Virtual Environments and Computer Graphics
Chương 1: CÁC PHƯƠNG THỨC GIAO DỊCH TRÊN THỊ TRƯỜNG THẾ GIỚI
THỰC TIỄN KINH DOANH TRONG CỘNG ĐỒNG KINH TẾ ASEAN –
D. Phát triển thương hiệu
NHỮNG VẤN ĐỀ NỔI BẬT CỦA NỀN KINH TẾ VIỆT NAM GIAI ĐOẠN
Điều trị chống huyết khối trong tai biến mạch máu não
BÖnh Parkinson PGS.TS.BS NGUYỄN TRỌNG HƯNG BỆNH VIỆN LÃO KHOA TRUNG ƯƠNG TRƯỜNG ĐẠI HỌC Y HÀ NỘI Bác Ninh 2013.
Nasal Cannula X particulate mask
Evolving Architecture for Beyond the Standard Model
HF NOISE FILTERS PERFORMANCE
Electronics for Pedestrians – Passive Components –
Parameterization of Tabulated BRDFs Ian Mallett (me), Cem Yuksel
L-Systems and Affine Transformations
CMSC423: Bioinformatic Algorithms, Databases and Tools
Some aspect concerning the LMDZ dynamical core and its use
Bayesian Confidence Limits and Intervals
实习总结 (Internship Summary)
Current State of Japanese Economy under Negative Interest Rate and Proposed Remedies Naoyuki Yoshino Dean Asian Development Bank Institute Professor Emeritus,
Front End Electronics for SOI Monolithic Pixel Sensor
Face Recognition Monday, February 1, 2016.
Solving Rubik's Cube By: Etai Nativ.
CS284 Paper Presentation Arpad Kovacs
انتقال حرارت 2 خانم خسرویار.
Summer Student Program First results
Theoretical Results on Neutrinos
HERMESでのHard Exclusive生成過程による 核子内クォーク全角運動量についての研究
Wavelet Coherence & Cross-Wavelet Transform
yaSpMV: Yet Another SpMV Framework on GPUs
Creating Synthetic Microdata for Higher Educational Use in Japan: Reproduction of Distribution Type based on the Descriptive Statistics Kiyomi Shirakawa.
MOCLA02 Design of a Compact L-­band Transverse Deflecting Cavity with Arbitrary Polarizations for the SACLA Injector Sep. 14th, 2015 H. Maesaka, T. Asaka,
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Fuel cell development program for electric vehicle
Overview of TST-2 Experiment
Optomechanics with atoms
داده کاوی سئوالات نمونه
Inter-system biases estimation in multi-GNSS relative positioning with GPS and Galileo Cecile Deprez and Rene Warnant University of Liege, Belgium  
ლექცია 4 - ფული და ინფლაცია
10. predavanje Novac i financijski sustav
Wissenschaftliche Aussprache zur Dissertation
FLUORECENCE MICROSCOPY SUPERRESOLUTION BLINK MICROSCOPY ON THE BASIS OF ENGINEERED DARK STATES* *Christian Steinhauer, Carsten Forthmann, Jan Vogelsang,
Particle acceleration during the gamma-ray flares of the Crab Nebular
Interpretations of the Derivative Gottfried Wilhelm Leibniz
Advisor: Chiuyuan Chen Student: Shao-Chun Lin
Widow Rockfish Assessment
SiW-ECAL Beam Test 2015 Kick-Off meeting
On Robust Neighbor Discovery in Mobile Wireless Networks
Chapter 6 并发:死锁和饥饿 Operating Systems: Internals and Design Principles
You NEED your book!!! Frequency Distribution
Y V =0 a V =V0 x b b V =0 z
Fairness-oriented Scheduling Support for Multicore Systems
Climate-Energy-Policy Interaction
Hui Wang†*, Canturk Isci‡, Lavanya Subramanian*,
Ch48 Statistics by Chtan FYHSKulai
The ABCD matrix for parabolic reflectors and its application to astigmatism free four-mirror cavities.
Measure Twice and Cut Once: Robust Dynamic Voltage Scaling for FPGAs
Online Learning: An Introduction
Factor Based Index of Systemic Stress (FISS)
What is Chemistry? Chemistry is: the study of matter & the changes it undergoes Composition Structure Properties Energy changes.
THE BERRY PHASE OF A BOGOLIUBOV QUASIPARTICLE IN AN ABRIKOSOV VORTEX*
Quantum-classical transition in optical twin beams and experimental applications to quantum metrology Ivano Ruo-Berchera Frascati.
The Toroidal Sporadic Source: Understanding Temporal Variations
FW 3.4: More Circle Practice
ارائه یک روش حل مبتنی بر استراتژی های تکاملی گروه بندی برای حل مسئله بسته بندی اقلام در ظروف
Decision Procedures Christoph M. Wintersteiger 9/11/2017 3:14 PM
Limits on Anomalous WWγ and WWZ Couplings from DØ
Presentation transcript:

Computer Graphics Lecture 29 Mathematics of Lighting and Shading - III Taqdees A. Siddiqi cs602@vu.edu.pk

Mathematics of Lighting and Shading - III Taqdees A. Siddiqi cs602@vu Mathematics of Lighting and Shading - III Taqdees A. Siddiqi cs602@vu.edu.pk

Traditional 3D Hardware-Accelerated Lighting Models

We will now take a look at the traditional method of calculating lighting in hardware A method that we'll find is sufficient for most of our needs

The traditional approach in real-time computer graphics has been to calculate lighting at a vertex as a sum of the ambient, diffuse, and specular light.

In the simplest form (used by OpenGL and Direct3D), the function is simply the sum of these lighting components (clamped to a maximum color value).

we have an ambient term and then a sum of all the light from the light sources

where itotal is the intensity of light (as an rgb value) from the sum of the intensity of the global ambient value and the diffuse and specular components of the light from the light sources

This is called a local lighting model since the only light on a vertex is from a light source, not from other objects. That is, lights are lights, not objects!

we've included the reflection coefficients for each term, k for completeness.

The reflection coefficients are in the [0,1] range and are specified as part of the material property

This equation does fail to take into account any gross roughness or anything other than perfect isotropic reflection

the surface is treated as being perfectly smooth and equally reflective in all directions

Thus this equation is really not good at modeling the illumination of objects that have anything other than a smooth surface (like fur or sand)

or a surface that doesn't really reflect light uniformly in all directions (like brushed metal, hair, or skin).

However, with liberal use of texture maps to add detail, this model has served pretty well and can still be used for a majority of the lighting processing to create a realistic environment in real time

Let's take a look at the individual parts of the traditional lighting pipeline.

Ambient Light

Ambient light is the light that comes from all directions — thus all surfaces are illuminated equally regardless of orientation

Figure 1: Ambient light provides illumination, but no surface details.

We can see that it's difficult to make out details or depth information with just ambient light.

Ambient lighting is our friend Ambient lighting is our friend. With it we make our scene seem more realistic than it is.

A world without ambient light is one filled with sharp edges, of bright objects surrounded by sharp, dark, harsh shadows.

A world with too much ambient light looks washed out and dull.

Diffuse Light

Diffuse light is the light that is absorbed by a surface and is reflected in all directions

In the traditional model, this is ideal diffuse reflection

This is good for rough surfaces where the reflected intensity is constant across the surface and is independent of viewpoint but depends only upon the direction of the light source to the surface

The regardless of the direction from which we view an object with a stationary diffuse light source on it, the brightness of any point on the surface will remain the same

Unlike ambient light, the intensity of diffuse light is directional and is a function of the angle of the incoming light and the surface

This type of shading is called Lambertian shading after Lambert's cosine law,

The law states that the intensity of the light reflected from an ideal diffuse surface is proportional to the cosine of the direction of the light to the vertex normal

Since we're dealing with vertices here and not surfaces, each vertex has a normal associated with it

Diffuse light decreases as the angle between the light vector and the surface normal increases.

Figure 2 shows the intensity of reflected light as a function of the angle between the vertex normal and the light direction.

The equation for calculating diffuse lighting is

Diffuse light term is now multiplied by the dot product of the unit normal of the vertex and the unit direction vector to the light from the vertex (not the direction from the light)

Diffuse light shading brings out some surface details

The problem with just diffuse lighting is that it's independent of the viewer's direction

Thus as we change the viewing angle to a vertex, the vertex's diffuse light value never changes

We have to rotate the object (change the normal direction) or move the light (change the light direction) to get a change in the diffuse lighting of the object

However, when we combine the ambient and diffuse, as in Figure 4, we can see that the two types of light give a much more realistic representation than either does alone

Ambient and Diffuse light together give a much better shading

Figure 4: When diffuse and ambient terms are combined, you get more detail and a more natural-looking scene. The final color is the combination of the ambient and diffuse colors.

Specular Light

Specular light is the light from a light source that is reflected by a surface and is reflected in such a manner that it's both a function of the light's vector and the viewer's direction.

Specular light's intensity follows the reflection vector.

Most discussions of lighting (including this one) start with Phong's lighting equation

Phong's Specular Light Equation

Warnock [WARNOCK 1969] and Romney [ROMNEY 1969] were the first to try to simulate highlights using a cos n (θ ) term.

But it wasn't until Phong Bui-Tong [BUI 1998] reformulated this into a more general model that formalized the power value as a measure of surface roughness that we approach the terms used today for specular highlights

Phong's equation for specular lighting is

Figure 6: The relationship between the normal n, the light vector l, the view direction v, and the reflection vector r.

RECAP The traditional approach in real-time computer graphics has been to calculate lighting at a vertex as a sum of the ambient, diffuse, and specular light.

This is called a local lighting model since the only light on a vertex is from a light source, not from other objects. That is, lights are lights, not objects!

The reflection coefficients are in the [0,1] range and are specified as part of the material property

Let's take a look at the individual parts of the traditional lighting pipeline.

Ambient Light

Figure 1: Ambient light provides illumination, but no surface details.

Diffuse Light

Diffuse light decreases as the angle between the light vector and the surface normal increases.

The equation for calculating diffuse lighting is

Diffuse light shading brings out some surface details

Ambient and Diffuse light together give a much better shading

Specular Light

Specular light's intensity follows the reflection vector.

Phong's equation for specular lighting is

Computer Graphics Lecture 29