Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Similar documents
Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7.

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

Local vs. Global Illumination & Radiosity

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

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

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

Texture-Mapping Tricks. How Bad Does it Look? We've Seen this Sort of Thing Before. Sampling Texture Maps

CS 431/636 Advanced Rendering Techniques

6. Illumination, Lighting

The Rendering Equation & Monte Carlo Ray Tracing

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

CS 488. More Shading and Illumination. Luc RENAMBOT

CS5620 Intro to Computer Graphics

CPSC GLOBAL ILLUMINATION

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

Computer Graphics 7 - Texture mapping, bump mapping and antialiasing

Ray Tracing. Outline. Ray Tracing: History

03 RENDERING PART TWO

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Sung-Eui Yoon ( 윤성의 )

Effects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)

Computer Graphics Global Illumination

Computer Graphics. Shadows

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Computer Graphics 10 - Shadows

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

Computer Graphics I Lecture 11

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Pipeline Operations. CS 4620 Lecture 10

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

CS770/870 Spring 2017 Radiosity

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

Global Illumination. COMP 575/770 Spring 2013

Interpolation using scanline algorithm

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

Questions??? Announcements Assignment 3 due today

CS770/870 Spring 2017 Radiosity

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Complex Shading Algorithms

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

Rendering and Radiosity. Introduction to Design Media Lecture 4 John Lee

CPSC / Texture Mapping

More Texture Mapping. Texture Mapping 1/46

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Computer Graphics Global Illumination

Announcements. Written Assignment 2 is out see the web page. Computer Graphics

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Rendering Light Reflection Models

Intro to Ray-Tracing & Ray-Surface Acceleration

Einführung in Visual Computing

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Computer Graphics. - Texturing Methods -

Simple Lighting/Illumination Models

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

Global Illumination and Radiosity

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

CS 325 Computer Graphics

Illumination Models & Shading

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

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

3D Rasterization II COS 426

The Rasterization Pipeline

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Introduction. Chapter Computer Graphics

Pipeline Operations. CS 4620 Lecture 14

Computer Graphics Ray Casting. Matthias Teschner

Graphics for VEs. Ruth Aylett

Topics and things to know about them:

Homework #2. Shading, Ray Tracing, and Texture Mapping

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Computergrafik. Matthias Zwicker. Herbst 2010

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

Texture Mapping. Brian Curless CSE 457 Spring 2016

The Traditional Graphics Pipeline

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

CPSC / Illumination and Shading

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

CMSC427 Final Practice v2 Fall 2017

9. Illumination and Shading

Review for Ray-tracing Algorithm and Hardware

Visualisatie BMT. Rendering. Arjan Kok

Final Project: Real-Time Global Illumination with Radiance Regression Functions

Texture. Texture Maps

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

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

CPSC 314 LIGHTING AND SHADING

Texture Mapping. Brian Curless CSE 457 Spring 2015

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Texture mapping. Computer Graphics CSE 167 Lecture 9

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

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

Radiosity. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

The Traditional Graphics Pipeline

Transcription:

Computer Graphics Lecture 14 Bump-mapping, Global Illumination (1)

Today - Bump mapping - Displacement mapping - Global Illumination Radiosity

Bump Mapping - A method to increase the realism of 3D objects without editing their geometry - By adding high resolution bump maps - In a way similar to texture mapping

What's Missing? What's the difference between a real brick wall and a photograph of the wall texture-mapped onto a plane? No shadows between the bricks

This is what we want

How do we achieve this? High resolution brick wall? - Difficult to prepare the model - Very costly to handle during run-time

Bump Mapping Use textures to alter the surface normal but not the geometry Done during the rasterization stage Can synthesize realistic images without using high resolution meshes Sphere w/diffuse Texture Swirly Bump Map Sphere w/diffuse Texture & Bump Map

Preparing Data Prepare a bump map whose values change from 0 to 1 Prepare a mapping of vertices to uv coordinates Cylinder w/texture Map & Bump Map

Procedure During rasterization, compute the barycentric coordinates of the pixel and compute its uv coordinates by interpolation Lookup the bump map and compute the finite difference of the bump map (Fu, Fv) = (df/du, df/dv) u= α u + β u2 + γ u3 v = α v + β v2 + γ v3 1 1

Procedure - continued When rasterizing a pixel in the triangle, compute the original normal vector n and the its uv coordinates by barycentric coordinates Perturb the normal vector by where (Fu, Fv) are the partial derivatives of the bump map, and Pu, Pv are the partial derivative of the geometry with respect to the uv Do the lighting computation using n

Computing Fu, Fv Simply compute the finite difference of the height map at the corresponding uv v u

Computing Pu, Pv How P changes according to u, v in the texture space v u

Or compute Pu, Pv in screen space using chain rule y x

Or compute Pu, Pv in screen space using chain rule y x These can be computed in the screen space by finite difference

Or compute Pu, Pv in screen space using chain rule y where x

Preparing Bump Maps Can be produced from photos or designed by the user If it is from an image, convert the image to greyscale Adjust the contrast, such the min is 0 and max is 1 White part bumps out and black color bump inwards Need to make sure there is no specular highlights in the image

Some more examples

Some more examples

Some more examples

What's Missing? There are no actual bumps on the silhouette of a bump-mapped object

Displacement Mapping - Use the texture to actually move the surface point - The texture is a 3D mesh defined in the uv space

How it works 1. 2. 1. Tessellate (subdivide) the base polygon mesh such that its resolution is same as the displacement map 2. Move each vertex in the normal direction of the base polygon mesh as much as the height in the displacement map

Displacement Mapping: Discussions The cost increases as the polygon numbers is high Done in the geometry stage and not in the rasterization stage Can adaptively tessellate the base polygon mesh for the region the spatial frequency is high Methods to do it in the image space are getting popular

Today - Bump mapping - Displacement mapping - Global Illumination Radiosity

Background Rendering methods can be classified into Local Illumination techniques Global Illumination techniques

Local Illumination methods Considers light sources and surface properties only. Phong Illumination, Phong shading, Gouraud Shading Very fast Used for real-time applications such as 3D computer games

Local Illumination : problems Images synthesized appear artificial No inter-surface reflections Ambient light is a very simplified model Requires the user to add the effects like shadows and mirrors one by one Shadow maps, shadow volume, shadow texture for producing shadows Mirroring by reflecting the world or environment mapping

Global Illumination In the real-world, light comes from all directions (ambient light) This is due to inter-reflections Global illumination methods handle such effects

Global Illumination Methods Radiosity Monte-Carlo ray tracing, Photon Mapping Requires more computation and is slow

The Radiosity Method (85 -) Based on a method developed by researchers in heat transfer in 1950s Applied to computer graphics in the mid 1980s by Michael Cohen Tomoyuki Nishita

The Radiosity Method (85 -) Can simulate inter-surface reflection Can produce nice ambient effects Can simulate effects such as Soft shadows, color bleeding Can only handle diffuse color need to be combined with raytracing to handle specular light

Color bleeding

Color Bleeding

The Radiosity Model At each surface in a model the amount of energy that is given off (Radiosity) is comprised of Bj the energy that the surface emits internally (E), plus the amount of energy that is reflected off the surface (ρh) Eq. 1

The Radiosity Model (2) The amount of incident light hitting the surface can be found by summing for all other surfaces the amount of energy that they contribute to this surface Eq. 2 Form factor

Form Factor (Fij) The fraction of energy that leaves surface i and lands on surface j Between differential areas, it is The overall form factor between i and j is

Form Factor (2) Also need to take into account occlusions The form factor for those faces which are hidden from each other must be zero

The Radiosity Matrix The radiosity equation now looks like this: The derived radiosity equations form a set of N linear equations in N unknowns. This leads nicely to a matrix solution: Solve for Bi Use methods like Gauss-Seidal

Radiosity Steps: 1. Generate Model (set up the scene) 2. Compute Form Factors and set the Radiosity Matrix 3. Solve the linear system 4. Render the scene

Radiosity Steps: 1. Generate Model (set up the scene) 2. Compute Form Factors and set the Radiosity Matrix 3. Solve the linear system 4. Render the scene

Radiosity Steps: 1. Generate Model (set up the scene) 2. Compute Form Factors and set the Radiosity Matrix 3. Solve the linear system 4. Render the scene

Radiosity Steps: 1. Generate Model (set up the scene) 2. Compute Form Factors and set the Radiosity Matrix 3. Solve the linear system 4. Render the scene

Radiosity Steps: 1. Generate Model 2. Compute Form Factors and set the Radiosity Matrix 3. Solve the linear system 4. Render the scene Where do we resume from if objects are moved? Where do we resume from if the lighting is changed? Where do we resume from if the reflectance parameters of the scene are modified? Where do we resume from if the view point changes?

Radiosity Features: Very costly The faces must be subdivided into small patches to reduce the artefacts The computational cost for calculating the form factors is expensive Solving for Bi is also very costly Cubic to the number of patches Cannot handle specular light Quadratic to the number of patches

Hemicube: by Michael Cohen 85 Accelerates the computation of the form factor The form factor for the right four faces with respect to a small patch in the bottom is the same Then, we can project the patches onto a hemicube

Hemicube (2) Prepare a hemicube around the patch i Project those polygons you want to compute the form factor with patch i onto the hemicube Then, compute the form factor between them

Hemicube (3) This can be done by perspective projection We can use the Z-buffer algorithm to find the closest polygon Handling the occlusion Setting the form factor of the pairs that occlude each other to zero

Hemicube (4) The form factor between each pixel of the hemicube and the patch at the origin can be pre-computed and saved in a table Only 1/8 of all are needed, thanks to symmetry

Summary Bump maps can be used to increase the reality without increasing the resolution of the meshes Global illumination methods simulate inter-reflectance Radiosity can simulate diffuse interreflectance The form factor computation can be accelerated by hemi-cube.

Readings Blinn, "Simulation of Wrinkled Surfaces", Computer Graphics, (Proc. Siggraph), Vol. 12, No. 3, August 1978, pp. 286-292. Real-time Rendering, Chapter 5,1-5.2 http://www.blacksmith-studios. dk/projects/downloads/tangent_matrix_deriv ation.php Cohen et al., The hemi-cube: a radiosity solution for complex environments, SIGGRAPH 85