Bump Mapping Which one of these two image has a better visual effect?

Similar documents
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

More Texture Mapping. Texture Mapping 1/46

Computer Graphics. - Texturing Methods -

Overview. Hierarchy. Level of detail hierarchy Texture maps Procedural shading and texturing Texture synthesis and noise.

Einführung in Visual Computing

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

Surface Rendering. Surface Rendering

Texturas. Objectives. ! Introduce Mapping Methods. ! Consider two basic strategies. Computação Gráfica

Computer Graphics 7 - Texture mapping, bump mapping and antialiasing

Zeyang Li Carnegie Mellon University

Shading. Flat shading Gouraud shading Phong shading

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

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

Input Nodes. Surface Input. Surface Input Nodal Motion Nodal Displacement Instance Generator Light Flocking

Texture. Detail Representation

3D Rasterization II COS 426

Computergrafik. Matthias Zwicker. Herbst 2010

CS 5600 Spring

Advanced Rendering Techniques

Texture. Texture Maps

Texture Mapping. Brian Curless CSE 457 Spring 2016

Reading. Texture Mapping. Non-parametric texture mapping. Texture mapping. Required. Angel, 8.6, 8.7, 8.9, Recommended

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

Complex Features on a Surface. CITS4241 Visualisation Lectures 22 & 23. Texture mapping techniques. Texture mapping techniques

Reading. Texture Mapping. Non-parametric texture mapping. Texture mapping. Required. Angel, 8.6, 8.7, 8.9, 8.10,

Texture Mapping. Reading. Implementing texture mapping. Texture mapping. Daniel Leventhal Adapted from Brian Curless CSE 457 Autumn 2011.

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

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

CS 130 Final. Fall 2015

CS 4620 Midterm, March 21, 2017

MIT EECS 6.837, Teller and Durand 1

Displacement Mapping

Texture and other Mappings

Gettin Procedural. Jeremy Shopf 3D Application Research Group

Introduction to Computer Graphics 7. Shading

Texture Mapping. Brian Curless CSE 457 Spring 2015

Reading. 12. Texture Mapping. Texture mapping. Non-parametric texture mapping. Required. w Watt, intro to Chapter 8 and intros to 8.1, 8.4, 8.6, 8.8.

Curves & Surfaces. MIT EECS 6.837, Durand and Cutler

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes

Graphics Hardware and Display Devices

Shadows in the graphics pipeline

Texture Mapping. Computer Graphics, 2015 Lecture 9. Johan Nysjö Centre for Image analysis Uppsala University

Procedural Modeling. Last Time? Reading for Today. Reading for Today

Cap. 3 Textures. Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre

Advanced Shading and Texturing

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

COMP 175: Computer Graphics April 11, 2018

Advanced Lighting Techniques Due: Monday November 2 at 10pm

Curve and Surface Basics

Graphics and Interaction Rendering pipeline & object modelling

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Texture Mapping. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Texture Mapping and Sampling

CSE 167: Introduction to Computer Graphics Lecture #19: Wrapping Up. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Texture mapping. Computer Graphics CSE 167 Lecture 9

Complex Shading Algorithms

Chapter 1 Introduction. Marc Olano

Texture Mapping. Most slides courtesy of Leonard McMillan and Jovan Popovic

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Flowmap Generator River Tutorial

CS451 Texturing 4. Bump mapping continued. Jyh-Ming Lien Department of Computer SCience George Mason University. From Martin Mittring,

v. T u. Textures. Perlin, SIGGRAPH85. Werner Purgathofer

CS 563 Advanced Topics in Computer Graphics Chapter 31 Noise Based Textures. by Scott Ingram

CS 450: COMPUTER GRAPHICS TEXTURE MAPPING SPRING 2015 DR. MICHAEL J. REALE

Computer Graphics (CS 543) Lecture 10: Normal Maps, Parametrization, Tone Mapping

Computer Graphics. - Texturing - Philipp Slusallek

Computer Graphics with OpenGL ES (J. Han) Chapter XI Normal Mapping

TEXTURE MAPPING. DVA338 Computer Graphics Thomas Larsson, Afshin Ameri

Multiple Importance Sampling

frame buffer depth buffer stencil buffer

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Terrain Rendering (Part 1) Due: Thursday November 30 at 10pm

Anselmo Lastra, Steve Molnar, Marc Olano, Yulan Wang. Marc Olano, Yulan Wang University of North Carolina at Chapel Hill

CS 418: Interactive Computer Graphics. Basic Shading in WebGL. Eric Shaffer

Triangle meshes I. CS 4620 Lecture Kavita Bala (with previous instructor Marschner) Cornell CS4620 Fall 2015 Lecture 2

Shape modeling Modeling technique Shape representation! 3D Graphics Modeling Techniques

FLAMINGO CHEAT SHEET FOR ES 305 CLASS 5 Pages of Fresh Flamingo Goodness

The Traditional Graphics Pipeline

CSCI 4972/6963 Advanced Computer Graphics Quiz 2 Tuesday April 17, 2007 noon-1:30pm

Noise Course Overview Jim Whitehead. UC Santa Cruz School of Engineering courses.soe.ucsc.edu/courses/cmps265/spring14/01

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

Introduction to Visualization and Computer Graphics

A Family of Butterfly Patterns Inspired by Escher Douglas Dunham University of Minnesota Duluth Duluth, Minnesota

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Procedural modeling and shadow mapping. Computer Graphics CSE 167 Lecture 15

The Application Stage. The Game Loop, Resource Management and Renderer Design

Perfect Hair. Manual Version 1.0

Deferred Rendering Due: Wednesday November 15 at 10pm

Images from 3D Creative Magazine. 3D Modelling Systems

CS 4620 Program 3: Pipeline

The Traditional Graphics Pipeline

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik

Hardware-Assisted Relief Texture Mapping

CS 354R: Computer Game Technology

move object resize object create a sphere create light source camera left view camera view animation tracks

Transcription:

Bump Mapping Which one of these two image has a better visual effect? 1

Bump Mapping 2 Or, these two?

Bump Mapping Many textures are the result of small perturbations in the surface geometry Modeling these changes would result in an explosion in the number of geometric primitives. Bump mapping attempts to alter the lighting across a polygon to provide the illusion of texture. How? 3

Introduced by James Blinn in 1978 Bump Mapping Perturb normals of a surface - creates a bump-like effect 4 Does not change silhouette edges

Bump Mapping 5 The sphere looks bumpy But the underlying surface is not changed

Bump Mapping methods Approach 1: for each visible point: 6 1. Look up the height in the heightmap that corresponds to the position on the surface. 2. Calculate the surface normal of the heightmap, using the finite difference method. 3. Combine the surface normal from step two with the true ("geometric") surface normal so that the combined normal points in a new direction. 4. Calculate the interaction of the new "bumpy" surface with lights in the scene using the Phong reflection model.

Bump Mapping Heightmap (Heightfield) Heightmap: a raster image containing one channel interpreted as a distance of displacement or height from the floor of a surface black representing minimum height and white representing maximum height used in bump mapping to calculate where this 3D data would create shadow in a material in displacement mapping to displace the actual geometric position of points over the textured surface 7

Bump Mapping heightmap (heightfield) 8 The same heightmap converted to a 3D mesh Heightmap of Earth's surface in equirectangular projection, normalized as 8-bit grayscale

Bump Mapping methods Approach 2: for each visible point: 9 1. Look for the specified normal for that point in a normal map that contains the modified normal for each point on the surface. 2. Use the specified normal to calculate the interaction of the new "bumpy" surface with lights in the scene using the Phong reflection model. Leads to more predictable results Easier for artists to work with most common method of bump mapping today

Bump Mapping This modifies the surface normals using approach 2 (left) and approach 1 (right) 10

Bump Mapping approach 2 11

Bump Mapping approach 2 12

Bump Mapping approach 2 13

Displacement Mapping Use texture to displace the surface geometry 14 Bump mapping only affects the normals, Displacement mapping changes the entire surface (including the silhouette)

Displacement Mapping Consider the lighting for a modeled surface. 15

Displacement Mapping We can model this as deviations from some base surface. The question is then how these deviations change the lighting. 16

Displacement Mapping Step 1: Putting everything into the same coordinate frame as B(u,v). x(u,v), y(u,v), z(u,v) this is given for parametric surfaces, but easy to derive for other analytical surfaces. Or O(u,v) 17

Displacement Mapping Define the tangent plane to the surface at a point (u,v) by using the two vectors O u and O v. The normal is then given by: N = O u O v N 18

Displacement Mapping 19 The new surface positions are then given by: O (u,v) = O(u,v) + B(u,v) N Where, N = N / N Differentiating leads to: O u = O u + B u N + B (N) u O u = O u + B u N O v = O v + B v N + B (N) v O v = O v + B v N If B is small.

Displacement Mapping This leads to a new normal: N (u,v) = O u O v - B u (N O v ) + B v (N O u ) + B u B v (N N) = N - B u (N O v ) + B v (N O u ) = N + D 20

Displacement Mapping For efficiency, can store B u and B v in a 2- component texture map. The cross products are geometric terms only. N will of course need to be normalized after the calculation and before lighting. This floating point square root and division makes it difficult to be embedded into hardware. 21

Displacement Mapping 22 Do you see the difference?

3D Textures 23 Can simulate an object carved from a material

3D Textures - Noise and Turbulence Useful tools when we want to add random variations to our texture, but in a controllable way A noise function is a continuous function that varies throughout space at a uniform frequency. To create a simple noise function, consider a 3D lattice, with a random value assigned to each triple of 24integer coordinates: Slide Courtesy of Leonard McMillan & Jovan Popovic, MIT

3D Textures Noise and Turbulence Create a 3D integer-aligned lattice of random numbers For any 3DPoint p, noise is defined as: 25

3D Textures - Noise and Turbulence Noise by itself looks pretty ugly. We can use noise to make a more interesting function called turbulence. A turbulence functions can be computed by summing many different frequencies of noise functions. 26 Slide Courtesy of Leonard McMillan & Jovan Popovic, MIT

3D Textures - Noise and Turbulence 27

Marble example However, even turbulence is rarely used all by itself. We can use turbulence to build more fancy 3D textures, such as 3D marble textures [Ken Perlin]. Basic idea: use a sin wave function to fill space with black and white stripes use turbulence to distort those planes 28 Marble = sin(f * (x + A * Turb (x, y, z))) control the thickness of the veins by varying the frequency of the sin function and control the distortion of the veins by varying the amplitude of the turbulence function Slide Courtesy of Leonard McMillan & Jovan Popovic, MIT

3D Textures - Noise and Turbulence Simplified versions 29 turbulence(x ) sin( x turbulence ( x))

Animating Turbulence Use an extra dimension as time 30

End of Texture-mapping II 31