1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
Geometry Graph and Meshes Surface Properties Bounding Volumes
Real-Time Rendering POLYGONAL TECHNIQUES Lecture 05 Marina Gavrilova.
9/25/2001CS 638, Fall 2001 Today Shadow Volume Algorithms Vertex and Pixel Shaders.
Computational Geometry & Collision detection
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
SURGICAL SIMULATIONS: IT’S ALL IN A GAME ! Gaming techniques for medical applications. V. Kotamraju, S. Payandeh, J. Dill Experimental Robotics Laboratory,
HCI 530 : Seminar (HCI) Damian Schofield.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Status – Week 277 Victor Moya.
3D computer graphic Basis for real-time rendering and GPU architecture 劉哲宇,Liou Jhe-Yu.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Real-time Rendering of Dynamic Vegetation Alexander Kusternig Vienna University Of Technology.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
What is ? Open Graphics Library A cross-language, multi-platform API for rendering 2D and 3D computer graphics. The API is used to interact with a Graphics.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CSE 381 – Advanced Game Programming Basic 3D Graphics
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.
Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures Vision, Modeling, Visualization Erlangen, Germany November 16-18,
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
Week 11 - Thursday.  What did we talk about last time?  Image processing  Blurring  Edge detection  Color correction  Tone mapping  Lens flare.
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Levels of Detail COMP 770 3/25/09. Problem Models can be very detailed Look great when close up Last week we explored one way of attacking this problem.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Fundamentals of Computer Graphics Sai-Keung Wong National Chiao Tung University Department of Computer Science Date: 5 March References: wikipedia,
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Collaborative Visual Computing Lab Department of Computer Science University of Cape Town Graphics Topics in VR By Shaun Nirenstein.
Game Programming 06 The Rendering Engine
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
컴퓨터 그래픽스 Real-time Rendering 1. Introduction.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
Graphics, Modeling, and Textures Computer Game Design and Development.
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
Game Engines Game: – Engine – Assets (models, animations, sounds, AI, and physics) – Code (Rules, AI, Scripting, etc.)
1 Real-Time High-Quality View-dependent Texture Mapping using Per-Pixel Visibility Damien Porquet Jean-Michel Dischler Djamchid Ghazanfarpour MSI Laboratory,
- Introduction - Graphics Pipeline
Week 12 - Thursday CS361.
3D Graphics Glossary PART 2.
The Graphic PipeLine
Graphics Processing Unit
Deferred Lighting.
3D Graphics Rendering PPT By Ricardo Veguilla.
Chapter 6 GPU, Shaders, and Shading Languages
From Turing Machine to Global Illumination
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Understanding Theory and application of 3D
Parts of these slides are based on
© University of Wisconsin, CS559 Fall 2004
Graphics, Modeling, and Textures
CS5500 Computer Graphics May 29, 2006
Introduction to Ray Tracing
Presentation transcript:

1 Geometry for Game

Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles / surfaces / … Property Property –Materials –Textures Motion Motion Hierarchy Hierarchy Level-of-detail Level-of-detail 2 Game Models

3 Vertex position Vertex position –(x, y, z, w) –In model space or screen spane Vertex normal Vertex normal –(n x, n y, n z ) Vertex color Vertex color –(r, g, b) or (diffuse, specular) Texture coordinates on vertex Texture coordinates on vertex –(u 1, v 1 ), (u 2, v 2 ), … Skin weights Skin weights –(bone 1, w 1, bone 2, w 2, …) Geometry Data

4 Lines Lines –Line segments –Polyline »Open / closed Indexed triangles Indexed triangles Triangle Strips / Fans Triangle Strips / Fans Surfaces Surfaces –Non-uniform Rational B Spline (NURBS) Subdivision Subdivision Topology Data

5 Geometric data Vertex data v 0, v 1, v 2, v 3, … (x, y, z, n x, n y, n z, t u, t v ) or (x, y, z, c r, c g, c b, t u, t v, … ) Topology Face v 0 v 3 v 6 v 7 Edge table v0v0 v3v3 v6v6 v7v7 Right-hand rule for index polygon normal vertex normal Indexed Triangles

6 v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 T0T0 T1T1 T2T2 T3T3 T4T4 T5T5 v 0, v 1, v 2, v 3, v 4, v 5, v 6, v 7 Triangle Strips “Get great performance to use triangle strips for rendering on current hardware

7 Material Material Textures Textures Shaders Shaders Property on Surface

8 Material Material –Ambient »Environment »Non-lighted area –Diffuse »Dynamic lighting –Emissive »Self-lighting –Specular with shineness »Hi-light »View-dependent »Not good for hardware rendering Local illumination Local illumination For fixed function rendering pipeline For fixed function rendering pipelineMaterials

9 Textures Textures –Single texture –Texture coordinate animation –Texture animation –Multiple textures –Alphamap Textures Material or vertex colors Base color texture Lightmap

10 Programmable Shading Language Programmable Shading Language –Vertex shader –Pixel shader Procedural way to implement some process of rendering Procedural way to implement some process of rendering –Transformation –Lighting –Texturing –BRDF –Rasterization –Pixel fill-in Shaders

11 Vertex DataTopology Data Classic Transform & Lighting Vertex Shader Clipping & Viewport Mapping TexturingPixel Shader Fog Alpha, Stencil, Depth Testing Geometry Stage Rasterizer Stage Shader Pipeline

Per-pixel lighting Per-pixel lighting Motion blur Motion blur Volume / Height fog Volume / Height fog Volume lines Volume lines Depth of field Depth of field Fur fighting Fur fighting Reflection / Refraction Reflection / Refraction NPR ( non-photorealistic rendering ) NPR ( non-photorealistic rendering ) Shadow Shadow Linear algebra operators Linear algebra operators Perlin noise Perlin noise Quaternion Quaternion Sparse matrix solvers Sparse matrix solvers Skin bone deformation Skin bone deformation Normal map Normal map Displacement map Displacement map Particle shader Particle shader 12 Procedural Morphing Water Simulation Powered by Shader

13 Time-dependent data Time-dependent data Transformation data Transformation data –Position –Orientation Formats Formats –Pivot –Position vector –Quaternion –Eurler angles –Angular displacement Motion Data

14 Discrete LOD Discrete LOD –Switch multiple resolution models run-timely Continuous LOD Continuous LOD –Use progressive mesh to dynamically reduce the rendered polygons View-dependent LOD View-dependent LOD –Basically for terrain Level-of-detail

Render a model in different level-of-detail at runtime Render a model in different level-of-detail at runtime User control or automatic change the percentage of rendered vertices User control or automatic change the percentage of rendered vertices Use mapping function between two successive meshes to control the simplification process Use mapping function between two successive meshes to control the simplification process 15 Progressive Mesh Map for edge collapse Vertex list Triangle list Index Map

16 Real-time optimal adapting meshes (ROAM) Real-time optimal adapting meshes (ROAM) Use height map Use height map Run-timely to re-construct the active (for rendering) geometric topology (re-mesh) to get an optimal mesh (polygon count) to improve the rendering performance Run-timely to re-construct the active (for rendering) geometric topology (re-mesh) to get an optimal mesh (polygon count) to improve the rendering performance Someone calls this technique as the view- dependent level-of-detail Someone calls this technique as the view- dependent level-of-detail Very good for fly-simulation-like application Very good for fly-simulation-like application View-dependent LOD for Terrain - ROAM

17 Apply progressive mesh for multi-resolution model generation Apply progressive mesh for multi-resolution model generation Use in-game discrete LOD for performance tuning Use in-game discrete LOD for performance tuning Why ? Why ? –For modern game API / platform, dynamic vertex update is expensive (not good for performance) »Lock video memory -> aversely affect CPU/GPU performance Level-of-detail Suggestion

18 Bounding sphere Bounding cylinder Axis-aligned bounding box (AABB) Oriented bounding box (OBB) Discrete oriented polytope (k-DOP); k/2 pairs Bounding Sphere AABB OBB k-DOP Bounding Volume Bounding Cylinder

19 Collision Detection Collision Detection Visibility Culling Visibility Culling Hit Test Hit Test Bounding Volume - Application

20 Bounding sphere B 1 (c 1, r 1 ), B 2 (c 2, r 2 ) If the distance between two bounding spheres is larger than the sum of radius of the spheres, then these two objects have no chance to collide. d > r 1 + r 2 D B1B1 B2B2 c1c1 c2c2 Application Example - Bounding Sphere

21 Axis-aligned bounding box (AABB) Axis-aligned bounding box (AABB) –Simplified computation based on the axis- aligned feature –Have to compute the AABBs at runtime AABB Application Example - AABB

22 Oriented bounding box (OBB) Oriented bounding box (OBB) –Intersection computation based on the transformed OBB geometric data »3D containment test »Line intersection with plane For games, For games, OBB Application Example - OBB