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

Similar documents
Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Computer Graphics (CS 563) Lecture 4: Advanced Computer Graphics Image Based Effects: Part 2. Prof Emmanuel Agu

Recall: Indexing into Cube Map

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Advanced Lighting Techniques Due: Monday November 2 at 10pm

Render all data necessary into textures Process textures to calculate final image

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Interactive Cloth Simulation. Matthias Wloka NVIDIA Corporation

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

Nonphotorealism. Christian Miller CS Fall 2011

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

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

Shading 1: basics Christian Miller CS Fall 2011

Deferred Rendering Due: Wednesday November 15 at 10pm

Department of Computer Engineering 3D Graphics in Games and Movies

Computer Graphics Introduction. Taku Komura

Evolution of GPUs Chris Seitz

Computer Graphics (CS 563) Lecture 4: Advanced Computer Graphics Image Based Effects: Part 1. Prof Emmanuel Agu

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

Wednesday, July 24, 13

Photoshop PSD Export. Basic Tab. Click here to expand Table of Contents... Basic Tab Additional Shading Tab Material Tab Motion Tab Geometry Tab

CS 354R: Computer Game Technology

Pipeline Operations. CS 4620 Lecture 14

Mattan Erez. The University of Texas at Austin

Bringing Hollywood to Real Time. Abe Wiley 3D Artist 3-D Application Research Group

Computergrafik. Matthias Zwicker. Herbst 2010

Lighting Killzone : Shadow Fall

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

Illumination & Shading I

LEVEL 1 ANIMATION ACADEMY2010

CS451Real-time Rendering Pipeline

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

CS 130 Final. Fall 2015

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Surface Rendering. Surface Rendering

Computer Graphics 10 - Shadows

The Making of Seemore WebGL. Will Eastcott, CEO, PlayCanvas

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. Shadows

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Shaders. Slide credit to Prof. Zwicker

CGDD 4113 Final Review. Chapter 7: Maya Shading and Texturing

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

Advanced Maya Texturing and Lighting

Physically Based Shading in Unity. Aras Pranckevičius Rendering Dude

Advanced Maya e Texturing. and Lighting. Second Edition WILEY PUBLISHING, INC.

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Z-Buffer hold pixel's distance from camera. Z buffer

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

Computer Graphics CS 543 Lecture 1 (Part I) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

MAXIS-mizing Darkspore*: A Case Study of Graphic Analysis and Optimizations in Maxis Deferred Renderer

Computer Graphics (CS 543) Lecture 8a: Per-Vertex lighting, Shading and Per-Fragment lighting

Zeyang Li Carnegie Mellon University

Pipeline Operations. CS 4620 Lecture 10

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Graphics and Interaction Rendering pipeline & object modelling

Mali Demos: Behind the Pixels. Stacy Smith

Advanced Shading and Texturing

Complex Shading Algorithms

Rasterization Overview

Computer Graphics (CS 543) Lecture 8c: Environment Mapping (Reflections and Refractions)

Models and Architectures

9. Illumination and Shading

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Spring 2009 Prof. Hyesoon Kim

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

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

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

Spring 2011 Prof. Hyesoon Kim

Synthesis of Textures with Intricate Geometries using BTF and Large Number of Textured Micropolygons. Abstract. 2. Related studies. 1.

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

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

Texture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Intro to Ray-Tracing & Ray-Surface Acceleration

Introduction to 3D Concepts

Introduction to Computer Graphics with WebGL

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

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

Hardware-Assisted Relief Texture Mapping

Corona Sky Corona Sun Corona Light Create Camera About

Game Graphics Programmers

LOD and Occlusion Christian Miller CS Fall 2011

Adaptive Point Cloud Rendering

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

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

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

COMP environment mapping Mar. 12, r = 2n(n v) v

Chapter 7 - Light, Materials, Appearance

rendering rasterization based rendering pipelined architecture, parallel mostly triangles (lines and points possible too)

Real-Time Rendering of a Scene With Many Pedestrians

Shadow Rendering EDA101 Advanced Shading and Rendering

The Rasterization Pipeline

Advanced Deferred Rendering Techniques. NCCA, Thesis Portfolio Peter Smith

Introduction to 3D Graphics

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

There have been many debates in the past about whether eight bits of resolution

CS 4620 Program 3: Pipeline

Transcription:

Computer Graphics (CS 543) Lecture 10: Normal Maps, Parametrization, Tone Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI)

Normal Mapping Store normals in texture Normals <x,y,z> stored in <r,g,b> values in texture Normal map may change a lot, simulate fine details Low rendering complexity method for making low-resolution geometry look like it s much more detailed

Normal Mapping Example: Ogre OpenGL 4 Shading Language Cookbook (2 nd edition) by David Wolff (pg 130) Base color texture (used this in place of diffuse component) Texture mapped Ogre (Uses mesh normals) Normal texture map Texture and normal mapped Ogre (Uses normal map to modify mesh normals)

Creating Normal Maps Many tools for creating normal map E.g. Nvidia texture tools for Adobe photoshop https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop

Tangent Space Vectors Normals in normal map stored in object local coord. frame (or tangent space) Object Local coordinate space? Axis positioned on surface of object (NOT global x,y,z) Need Tangent, normal and bi-tangent vectors at each vertex z axis aligned with mesh normal at that point x, y axes at a tangent (and bi-tangent) to the surface

Tangent Space Vectors Normals stored in texture includes mesh transformation + local deviation (e.g. bump) Reflection model must be evaluated in object s local coordinate (n, t, b) Need to transform view, light and normal vectors into object s local coordinate space Need to transform l, v and n into object local coord. v l

Transforming V,L and N into Object s Local Coordinate Frame To transform a point P eye into a corresponding point S in object s local coordinate frame: Point S in object s locatl coordinate frame Point P in eye coordinate frame

Normal Mapping Example OpenGL 4 Shading Language Cookbook (2 nd edition) by David Wolff (pg 133) Vertex Shader VertexPosition VertexNormal VertexTexCoord VertexTangent Vertex 1 Attributes x y z x y z s t x y z VertexPosition VertexNormal VertexTexCoord VertexTangent ayout (location) = 0 layout (location) = 1 OpenGL Program

Normal Mapping Example OpenGL 4 Shading Language Cookbook (2 nd edition) by David Wolff (pg 133) Vertex Shader Transform normal and tangent to eye space. Compute bi-normal vector Form matrix to convert from eye to local object coordinates

Normal Mapping Example OpenGL 4 Shading Language Cookbook (2 nd edition) by David Wolff (pg 133) Vertex Shader Get position in eye coordinates. Transform light and view directions to tangent space Fragment Shader Receive Light, View directions and TexCoord set in vertex shader Declare Normal and Color maps

Normal Mapping Example OpenGL 4 Shading Language Cookbook (2 nd edition) by David Wolff (pg 133) Fragment Shader x y z x y z s t x y z r g b VertexPosition VertexNormal VertexTexCoord VertexTangent ColorTex Normal Map Diffuse Color Map

Normal Mapping Example OpenGL 4 Shading Language Cookbook (2 nd edition) by David Wolff (pg 133) Fragment Shader Function to compute Phong s lighting model Look up normal from normal map Look up diffuse coeff. from color texture x y z x y z s t x y z r g b VertexPosition VertexNormal VertexTexCoord VertexTangent ColorTex Normal Map Diffuse Color Map

Bump mapping by Blinn in 1978 Inexpensive way of simulating wrinkles and bumps on geometry Too expensive to model these geometrically Instead let a texture modify the normal at each pixel, and then use this normal to compute lighting geometry = + Bump map Stores heights: can derive normals Bump mapped geometry

Bump mapping: examples

Bump Mapping Vs Normal Mapping Bump mapping (Normals n=(n x, n y, n z ) stored as distortion of face orientation. Same bump map can be tiled/repeated and reused for many faces) Normal mapping Coordinates of normal (relative to tangent space) are encoded in color channels Normals stored include face orientation + plus distortion. )

Displacement Mapping Uses a map to displace the surface at each position Offsets the position per pixel or per vertex Offsetting per vertex is easy in vertex shader Offsetting per pixel is architecturally hard

Hot Research Topic: Parametrization

Parametrization in Practice Texture creation and parametrization is an art form Option: Unfold the surface

Parametrization in Practice Option: Create a Texture Atlas Break large mesh into smaller pieces

Light Maps Good shadows are complicated and expensive If lighting and objects will not change, neither are the shadows Can bake the shadows into a texture map as a preprocess step (called lightmap) During shading, lightmap values are multiplied into resulting pixel

Light Maps

Specular Mapping Use a greyscale texture as a multiplier for the specular component

Alpha Mapping Represent the texture in the alpha channel Can give complex outlines, used for plants Render Bush on 1 polygon Render Bush on polygon rotated 90 degrees

High Dynamic Range Sun s brightness is about 60,000 lumens Dark areas of earth has brightness of 0 lumens Basically, world around us has range of 0 60,000 lumens (High Dynamic Range) However, monitor has ranges of colors between 0 255 (Low Dynamic Range) New file formats have been created for HDR images (wider ranges). (E.g. OpenEXR file format) 60,000 Lumens HDR 0 Lumens

High Dynamic Range Some scenes contain very bright + very dark areas Using uniform scaling factor to map actual intensity to displayed pixel intensity means: Either some areas are unexposed, or Some areas of picture are overexposed Under exposure Over exposure

Tone Mapping Technique for scaling intensities in real world images (e.g HDR images) to fit in displayable range Try to capture feeling of real scene: non-trivial Example: If coming out of dark tunnel, lights should seem bright General idea: apply different scaling factors to diffferent parts of the image HDR Tone Mapping LDR

Tone Mapping

Types of Tone Mapping Operators Global: Use same scaling factor for all pixels Local: Use different scaling factor for different parts of image Time-dependent: Scaling factor changes over time Time independent: Scaling factor does NOT change over time Real-time rendering usually does NOT implement local operators due to their complexity

Simple (Global) Tone Mapping Methods

Motion Blur Motion blur caused by exposing film to moving objects Motion blur: Blurring of samples taken over time (temporal) Makes fast moving scenes appear less jerky 30 fps + motion blur better than 60 fps + no motion blur

Motion Blur Basic idea is to average series of images over time Move object to set of positions occupied in a frame, blend resulting images together Can blur moving average of frames. E.g blur 8 images Velocity buffer: blur in screen space using velocity of objects

Depth of Field We can simulate a real camera In photographs, a range of pixels in focus Pixels outside this range are out of focus This effect is known as Depth of field

Lens Flare and Bloom Caused by lens of eye/camera when directed at light Halo refraction of light by lens Ciliary Corona Density fluctuations of lens Bloom Scattering in lens, glow around light Halo, Bloom, Ciliary Corona top to bottom

Reference Tomas Akenine-Moller, Eric Haines and Naty Hoffman, Real Time Rendering