LEAN Mapping Marc Olano, Dan Baker Firaxis Games.

Slides:



Advertisements
Similar presentations
Accelerating Real-Time Shading with Reverse Reprojection Caching Diego Nehab 1 Pedro V. Sander 2 Jason Lawrence 3 Natalya Tatarchuk 4 John R. Isidoro 4.
Advertisements

Real-time Shading with Filtered Importance Sampling
Object Space EWA Surface Splatting: A Hardware Accelerated Approach to High Quality Point Rendering Liu Ren Hanspeter Pfister Matthias Zwicker CMU.
Bump Mapping CSE 781 Roger Crawfis.
Shaders Information on Light, Shadows & Roughness.
Computer Graphics I, Fall 2010 Shading II.
CS 480/680 Computer Graphics Shading 2 Dr. Frederick C Harris, Jr.
Spectacular Specular -LEAN and CLEAN specular highlights
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Frequency Domain Normal Map Filtering Charles Han Bo Sun Ravi Ramamoorthi Eitan Grinspun Columbia University.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2
Part I: Basics of Computer Graphics
(conventional Cartesian reference system)
Status – Week 277 Victor Moya.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
Jiaping Wang 1 Peiran Ren 1,3 Minmin Gong 1 John Snyder 2 Baining Guo 1,3 1 Microsoft Research Asia 2 Microsoft Research 3 Tsinghua University.
Object recognition under varying illumination. Lighting changes objects appearance.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
© 2005 University of Wisconsin
Texture Mapping CMSC435 UMBC *With lots of borrowing from the usual victims…
1 KIPA Game Engine Seminars Jonathan Blow Seoul, Korea November 29, 2002 Day 4.
Computer Graphics Inf4/MSc Computer Graphics Lecture 7 Texture Mapping, Bump-mapping, Transparency.
Shading. What is Shading? Assigning of a color to a pixel in the final image. So, everything in shading is about how to select and combine colors to get.
-Global Illumination Techniques
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
1 Texture Mapping. 2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing.
BUMP-MAPPING SET09115 Intro to Graphics Programming.
Computer Graphics (Spring 2003) COMS 4160, Lecture 18: Shading 2 Ravi Ramamoorthi Guest Lecturer: Aner Benartzi.
UV Mapping After a 3D object has been modeled it must be prepared for texturing. 3D surfaces can be “unwrapped” into a 2D representation with. This process.
02/2/05© 2005 University of Wisconsin Last Time Reflectance part 1 –Radiometry –Lambertian –Specular.
Local Illumination and Shading
Thank you for the introduction
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Tobias Zirr (1),2 and Anton Kaplanyan 1 1 NVIDIA Research 2 Karlsruhe Institute of Technology.
Physically-based Illumination Models (2) CPSC 591/691.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Reflection Models (1) Physically-Based Illumination Models (2)
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
1© 2009 Autodesk Hardware Shade – Presenting Your Designs Hardware and Software Shading HW Shade Workflow Tessellation Quality Settings Lighting Settings.
Basic Ray Tracing CMSC 435/634.
Working Group « Pre-Filtering »
Week 7 - Monday CS361.
Distributed Ray Tracing
Realtime Realistic Ocean Lighting
How to Bump Map a Skinned Polygonal Model
Texture Mapping COMP575/COMP770.
The Graphics Rendering Pipeline
Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular model
UMBC Graphics for Games
Distributed Ray Tracing
CS5500 Computer Graphics May 29, 2006
Last Time Presentation of your game and idea Environment mapping
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics Material Colours and Lighting
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Distributed Ray Tracing
Presentation transcript:

LEAN Mapping Marc Olano, Dan Baker Firaxis Games

LEAN Mapping Linear Efficient Antialiased Normal Mapping Fast and flexible solution for bump filtering – Shiny bumps are prone to aliasing – Distant bumps should change surface shading – Directional bumps change to anisotropic highlight – Existing solutions are too expensive Allows blending layers of bumps Works with existing Blinn-Phong pipeline

Bump Filtering

LEAN Map Normal Map

Bump & Normal Maps Bump maps [Blinn 1978] – Height displacement texture – Run-time partial derivatives Normal maps [Cohen et al. 1998] – Texture holds normal – Often in surface tangent space

Prior Work Posed by Kajiya 1985 Monte-Carlo – Cabral et al. 1987, Westin et al. 1992, Becker & Max 1993 Multi-lobed distributions – Fournier 1992, Han et al Single Gaussian/Beckmann distribution – Olano & North 1997, Schilling 1997, Toksvig 2005 Diffuse [Kilgard 2000]

Filtering Filter is linear combination over kernel Linear representation → any linear filter – Summed Area, EWA, … – MIP map, Hardware Anisotropic

Filtering: Gaussians Gaussian described by mean and variance – Mean combines linearly Variance does not, but second moment does

Probability Distributions in Shading Distribution of microfacet normals – Perfectly reflective facets – Only facets oriented with reflect to – Look up probability of in distribution Beckmann distribution – Gaussian of facet tangents = projection

Distributions & Bumps Each bump defines its own tangent plane But how to combine them?

Distribution & Bumps Per-level nonlinear fit [Fournier 1992] Fake it – MIP variance values [Schilling 1997] Spherical distribution – 3D Gaussian | sphere [Olano and North 1997] – Von Mises-Fischer [Han 2007]

LEAN mapping Blinn-Phong ↔ Beckmann Filtering Bumps Sub-facet shading Layers of bumps

Blinn-Phong ↔ Beckmann Blinn-Phong approximates Gaussian [Lyon 1993] Better fit as increases Variance, normalize with

Blinn-Phong ↔ Beckmann Blinn-PhongBeckmann

Filtering Bumps Rather than bump-local frame Use surface tangent frame – Bump normal = mean of off-center distribution

Bumps vs. Surface Frame Surface-frame Beckmann Bump-frame Beckmann

LEAN Data Normal (for diffuse) Bump center in tangent frame Second moments

LEAN Use Pre-process – Seed textures with, and – Build MIP chain Render-time – Look up with HW filtering – Reconstruct 2D covariance – Compute diffuse & specular per light

Sub-facet Shading What about base specularity? – Given base Blinn-Phong exponent, – Base Beckmann distribution One of these at each facet = convolution – Gaussians convolve by adding ’s – Fold into, or add when reconstructing

LEAN Map features Seamless replacement for Blinn-Phong Specular bump antialiasing Turns directional bumps into anisotropic microfacets

Bump Layers Uses – Bump motion (ocean waves) – Detail texture – Decals Our approach – Conceptually a linear combination of heights – Equivalent to linear combination of ’s Even from normal maps

Bump Layers: The Tricky Part What about ? – – Expands out to,, and terms – terms are in, terms are in – terms are new: – Total of four new cross terms

Layering Options 1.Generate single combined LEAN map – Mix actual heights, or use mixing equations – Time varying: need to generate per-frame – Decal or detail: need high-res LEAN map 2.Generate mixing texture – One per pair of layers – Decal or detail: need high-res LEAN mixture maps 3.Approximate cross terms – Use rather than a filtered mixing texture

Single LEAN MapMixture TextureApproximationSource 2 Source 1 Layer Options Source 1 MIP Biased Mixed

Single LEAN MapMixture TextureApproximationMixedSource 2 Source 1 Layer Options Approximation misses layer coherence MIP Biased

Performance Single LayerTwo Layers Blinn- Phong LEANPer-frameMix textureApprox ATI Radeon HD FPS1540 FPS917 FPS1450 FPS1458 FPS D3D Instructions 30 ALU 1 TEX 42 ALU 2 TEX 50 ALU 3 TEX 54 ALU 5 TEX 54 ALU 4 TEX 1600 x 1200, single full screen object

Limitations Mixing layers uses mixing terms Mixture fractions cannot create bumps Only one Gaussian lobe – No shiny cloth (two anisotropic directions) – No sharp grooves (two distinct peaks)

Conclusions Linear – Linear texture filtering – Linear combination of layers Efficient – One extra texture access – Small number of extra instructions Antialiased – Works with hardware MIP and anisotropic filtering Normal Mapping – Height map or normal map source – Compatible with existing Blinn-Phong assets and pipeline