All the Polygons You Can Eat

Slides:



Advertisements
Similar presentations
Texture-Mapping Progressive Meshes
Advertisements

Surface Simplification using Quadric Error Metrics Guowei Wu.
Surface Simplification Using Quadric Error Metrics Speaker: Fengwei Zhang September
Exploration of bump, parallax, relief and displacement mapping
Texture Synthesis on [Arbitrary Manifold] Surfaces Presented by: Sam Z. Glassenberg* * Several slides borrowed from Wei/Levoy presentation.
Morphing & Warping 2D Morphing Involves 2 steps 1.Image warping “get features to line up” 2.Cross-dissolve “mix colors” (fade-in/fadeout transition)
Texture Visual detail without geometry. Texture Mapping desire for heightened realism.
Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova.
Computational Geometry & Collision detection
5/1/2000Deepak Bandyopadhyay / UNC Chapel Hill 1 Extended Quadric Error Functions for Surface Simplification Deepak Bandyopadhyay COMP 258 F2000 Project.
High-Quality Simplification with Generalized Pair Contractions Pavel Borodin,* Stefan Gumhold, # Michael Guthe,* Reinhard Klein* *University of Bonn, Germany.
Mesh Simplification Global and Local Methods:
Advanced Texture and Lighting
Lapped Textures SIGGRAPH 2000 Emil Praun Adam Finkelstein Hugues Hoppe.
Kumar, Roger Sepiashvili, David Xie, Dan Professor Chen April 19, 1999 Progressive 3D Mesh Coding.
Visualization and graphics research group CIPIC January 21, 2003Multiresolution (ECS 289L) - Winter Surface Simplification Using Quadric Error Metrics.
CSE554SimplificationSlide 1 CSE 554 Lecture 7: Simplification Fall 2014.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Week 8 - Monday.  What did we talk about last time?  Workday  Before that:  Image texturing ▪ Magnification ▪ Minification  Mipmapping  Summed area.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Quadric Error Metrics 1/20 Quadric Error Metrics.
Digital Image Processing Lecture 20: Representation & Description
Presented By Greg Gire Advised By Zoë Wood California Polytechnic State University.
Week 11 - Thursday.  What did we talk about last time?  Image processing  Blurring  Edge detection  Color correction  Tone mapping  Lens flare.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
1 Surface Applications Fitting Manifold Surfaces To 3D Point Clouds, Cindy Grimm, David Laidlaw and Joseph Crisco. Journal of Biomechanical Engineering,
Geometry Images Xiang Gu Harvard University Steven J. Gortler Harvard university Hugues Hoppe Microsoft Research Some slides taken from Hugues Hoppe.
DPL10/16/2015 CS 551/651: Simplification Continued David Luebke
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Surface Meshing Material tret de: S. J. Owen, "A Survey of Unstructured Mesh Generation Technology", Proceedings 7th International Meshing Roundtable,
Chapter 7 Advanced Part Modeling Techniques. After completing this chapter, you will be able to perform the following: –Extrude an open profile –Create.
CSE554Fairing and simplificationSlide 1 CSE 554 Lecture 6: Fairing and Simplification Fall 2012.
CHAPTER 8 Color and Texture Mapping © 2008 Cengage Learning EMEA.
Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael.
Mesh Coarsening zhenyu shu Mesh Coarsening Large meshes are commonly used in numerous application area Modern range scanning devices are used.
1 Polygonal Techniques 이영건. 2 Introduction This chapter –Discuss a variety of problems that are encountered within polygonal data sets The.
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Beyond Bouncing Boxes Fast, yet still Realistic, Deformation and Fracture Jeff Lander Darwin 3D, LLC Luxoflux James O'Brien U. of California, Berkeley.
Hank Childs, University of Oregon Volume Rendering, pt 1.
Graphics Interface 2009 The-Kiet Lu Kok-Lim Low Jianmin Zheng 1.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
Discontinuous Displacement Mapping for Volume Graphics, Volume Graphics 2006, July 30, Boston, MA Discontinuous Displacement Mapping for Volume Graphics.
Level of Detail: Generating LODs David Luebke University of Virginia.
Mesh Resampling Wolfgang Knoll, Reinhard Russ, Cornelia Hasil 1 Institute of Computer Graphics and Algorithms Vienna University of Technology.
Rendering Large Models (in real time)
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 10, 2015 TRIANGLE MESHES 3D MESHES MESH OPERATIONS.
Digital Image Processing CSC331
DPL3/10/2016 CS 551/651: Simplification Continued David Luebke
Chapter 7 Advanced Part Modeling Techniques. After completing this chapter, you will be able to perform the following: –Extrude an open profile –Create.
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
1 Real-Time High-Quality View-dependent Texture Mapping using Per-Pixel Visibility Damien Porquet Jean-Michel Dischler Djamchid Ghazanfarpour MSI Laboratory,

Computer Graphics Imaging
Week 12 - Thursday CS361.
Morphing and Shape Processing
CS475 3D Game Development Level Of Detail Nodes (LOD)
Bump Mapping -1 Three scales of detail on an object
Computer Animation Texture Mapping.
Meshes.
Chapter III Modeling.
Introduction to Meshes
Chap 10. Geometric Level of Detail
Introduction to Meshes
Presentation transcript:

All the Polygons You Can Eat Hello, my name is Kevin Bjorke and I’m here to give you a brief technical overview of the new Cg language – a description of how the language itself integrates with your games and applications, along with how it controls key GPU functions. If you are not a technical person, please relax, there will only be a few gratuitous partial derivative equations in this talk. As you probably know, “Cg” is our way of saying “C for GPUs.” Like the original “C” language, Cg is not connected to any individual GPU design or manufacturer, and provides a GPU-neurtral API-neutral environment for programming complex realtime graphics. “Cg” is closely aligned with the Microsoft DX9 “HLSL” or “High Level Shading Language” – essentially, Cg and HLSL are the same language. What Cg provides beyond Microsoft’s DX9 built-in offering are support for a wider range of DirectX and OpenGL environments. All the Polygons You Can Eat Doug Rogers Developer Relations doug@nvidia.com

Future of Games Very high resolution models Complex Lighting Equations 20,000 triangles per model Lots of them Complex Lighting Equations Floating point Usually rely on surface normal

Managing Levels of Detail Model of 20,000 is good Model of 20,000 is that covers 20 pixels is not Reduce triangle count Retain as much quality as possible Melody (Multiple Level Of Detail Extraction)

Melody Features Normal Map Generation Texture Coordinate Generation Texture Coordinate Optimization Simplification Optimization Subdivision Surface Hull

Polygon Reduction 19k 9k 4k 2k 500 Melody automatically creates these model

But just reducing the polygon count reduces the quality We want this model: To be lit like the original 500 faces – low res model 19k faces

Lighting a low resolution model Using lighting information from the hires model for the low res model 500 faces 19k faces

Real World Example

In Wire Frame

Terms: Reference Model High resolution model used as a reference Used for surface attribute info Part of Dawn’s wing

Terms: Working Model or Manually simplified Same as reference Model that is to be simplified to create the lo-res model May be same as reference model or a hand simplified model or Same as reference Manually simplified

Lighting calculations are based on surface normals Calculate the normals for the reference (hi-res) resolution model Store them into a texture (normal map) Use them on the working (low res) model

Calculating Surface Normals for hi-res mesh Calculate face normals Use face normals to calculates vertex normals Use vertex normals to calculate surface normal

What is a Face Normal? A vector is normal to a surface when its direction is perpendicular to the plane which contains this surface When the magnitude of the vector is equal to 1 unit, the vector is called normalized The direction the triangle is facing, or the ‘up’ direction

What is a Vertex Normal? Summing all the face normal and normalizing the result yields one vertex normal This vector is the vertex normal and is used for vertex lighting

Multiple Normals per Vertex Sharp edges or borders of smoothing groups do not share normal Multiple normals per vertex Multiple normals on a cube corner

Surface Normals Vertex surface normals Normals are interpolated across a face (Barycentric) Always length 1.0 Vertex surface normals

Iterate surface normal Iterated surface normal

Iterate surface normal Iterated surface normal

Iterate surface normal Iterated surface normal

Iterate surface normal calculated per pixel pixels

Getting the hi-res normals to the low res model On the high resolution surface, we have many vertex normals Hi res model faces

Low res model Fewer vertices, fewer normals Low res normal

Low res model Iterated normals on low res model contains much less surface detail Iterated normals Low res model faces pixels

Textures are per-pixel storage So grab the normal from the high res surface Store that in a texture (called a normal map) Use those normals instead of the low-res iterated normals

Properties of Normals Normals are 3D vectors (x,y,z) Unit length (always 1.0) So each vector component has range [-1, 1]

Normal Maps Normal to Color -1 0 0 128 +1 255 We can store the xyz components of the normal in the RGB color channel of the texture Map directions [-1,1] to color [0,255] Normal to Color -1 0 0 128 +1 255

Two types of Normals Object Space Tangent Space Melody creates both Relative the object Tangent Space Relative to each face Melody creates both

Tangent Space Tangent, binormal and Normal define tangent basis Local coordinate system defined per vertex Allow relative normals, or normals defined in this local space Rotate the light into this space, or the normal into object space Coordinate system may be rotated by the deformation Tangent space transforms object Space to tangent Space Tangent, binormal and Normal define tangent basis

Tangent Space Normals Texel normals are relative to the face normal The vector (0,0,1) is considered the ‘up’ direction and coincident with the face normal (0,0,1) is stored as color (128,128,255) Can be derived from height maps Use 2D Images, using the Normal Map Plugin for Photoshop http://developer.nvidia.com/view.asp?IO=ps_texture_compression_plugin

Normals Displayed as Colors Tangent space Object space

Normal Maps Need to have texture coordinates Artist supplied Automatically created Texel cannot be used in more than one place on the model Texels correspond to a position on the model Example, tiling or mirroring is not allowed

Automatic Texture Coordinate Creation We could just flatten the triangles and pack them in the texture No index reuse (poor cache performance) Waste texture space Resulting texture map

Charts Resulting texture map Instead, we combine the faces to form ‘charts’ Combine faces until some criteria is met Flatness One perimeter Resulting texture map

One Chart Special case Needs one connected border Not required to be flat No flipped triangles Can be automatically generated Automatically generated

Normal Map Object space normal map Tangent space normal map Now that we have texture coordinates Store normals Wait! How did we get the normals to store in the texture? Object space normal map Tangent space normal map

Ray Casting Follow the iterated normal from the lo-res surface to the hires surface

Ray Casting Intersection point Extend the iterated normal to find the intersection of the hi res model Intersection point

Ray Casting Calculate hi-res normal at intersection point Calculate the iterated normal for the hi res model at the intersection point Calculate hi-res normal at intersection point

Ray Casting Store this in…

Ray Casting the normal map

What can happen in during raycasting Intersection point behind ray Allow ray to go forward and backwards

What can happen in during raycasting Multiple Intersections

Chosing closest intersection This might not be what you want May hide the detail on the top most surface Selecting closest

Restricting ray length Define bounds for ray Chose farthest within bounds

Restricting ray length No intersection within bounds

Restricting ray length Find closest intersection if no Intersection within bounds

Simplification Attribute discontinuities Features Texture Normal Color Features Sharp Edges Seams Boundaries – perimeter of material

Simplification – Edge Collapse Edge collapse method removes one or two faces

Simplification Option Attempt to preserve seams, sharp edges or boundaries Check topology after collapse so no illformed geometry is created When edge is collapsed (p2 p1), placement of p1: Optimal position Any where along edge Endpoints (p1 or p2) or edge midpoint Endpoints only (vertex removal). Can be used if you have weighted vertices

Progressive Mesh Collapse until no more legal collapses . . . . . . Edge collapses based on weight Collapse each edge, one at a time and record all collapses Allows undo of collapses Assignment to LOD for additional processing

Save to LOD from Progressive Mesh Collapse/Expand to achieve triangle count . . . . . . . . . . . . . . . . . . copy copy LOD0 LOD1

Melody Simplification Methods Quadric Error Metric (QEM) Move new point to closest point on all faces Volume Preservation Maintain volume of model Energy Minimization (EMIN) Minimize new faces to data points sampled from reference model. Slow

Seam Seams show attribute discontinuities. Show in red Any vertex that shares a position with another vertex and all the attributes do not match Discontinuity in color, texture coordinates, normal etc. Simplification can try to maintain seam positions Seams show attribute discontinuities. Show in red

Attribute Group Attribute Groups A group of faces that are bordered by seams Attribute Groups

Attribute Group Matching Match Attribute Groups from low res model to reference model. Fetches correct normal For Simplification and Normal Map Generation Look on same group for normal first Reference Model Lo res model

Sharp Edge Sharp edges shown as yellow Angle between two faces that exceeds a specified values Typical values for sharp edge is 140 degrees. 180 is a flat surface. Sharp edges shown as yellow

Corner Angle fatter lines. Angle between two edges on one face Option not to generate during simplification Small corner angles produce slivers Very small area/perimeter ratio Poor GPU performance Sliver: small corner angle Corner angle

Boundary Edge that has only one face attached Defines the perimeter of a model

Illformed Geometry: Folded Edge Commonly called “BowTie” When two faces Share an edge and are Coplanar and Face in opposite directions Melody can simplify this, but its slower Shared edges between green and blue faces

Illconditioned Geometry Three or more faces sharing an edge Melody can simplify this, but its slower Non 2 manifold

Illconditioned Geometry T-junctions Vertex splits the edge on the red face

After LOD Creation . . . . . . . . . . . . . . . Normal Map Creation Model Optimization LOD

Fitting to a Reference Model Working After simplification, fit all vertices in the working model to the reference model Tries to make a better match of low res models to high res models This just moves vertices Fitting

Model Optimizations Fitting to reference model Geometry Optimization Move vertex only Geometry Optimization NOT simplification Adds or removes geometry Split Edge (create vertex and 4 edges) Flip Edge Collapse Edge (remove two face) Solves a spring based system Hugues Hoppe’s technique

Optimize example optimize

Melody Demo

Links to Related Material http://developer.nvidia.com/ http://research.microsoft.com/~hhoppe/ http://talika.eii.us.es/~titan/magica/ http://www.cbloom.com/3d/galaxy3/index.html http://mirror.ati.com/developer/index.html http://www.okino.com/conv/conv.htm http://graphics.cs.uiuc.edu/~garland/research/quadrics.html http://gts.sourceforge.net http://www.loria.fr/~levy/Papers/2002/s2002_lscm.pdf http://deas.harvard.edu/~pvs/research/tmpm/ http://developer.nvidia.com/view.asp?IO=ps_texture_compression_plugin At this point I’d like to say thank you, and open the floor for any questions.

Future Extreme simplification using Hull Subdivision surface + displacement map generation Better chart creation and packing Reduce memory usage Command line version DCC integration