Introduction to geometry instancing

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

DirectX11 Performance Reloaded
COMPUTER GRAPHICS SOFTWARE.
Status – Week 257 Victor Moya. Summary GPU interface. GPU interface. GPU state. GPU state. API/Driver State. API/Driver State. Driver/CPU Proxy. Driver/CPU.
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
 The success of GL lead to OpenGL (1992), a platform-independent API that was  Easy to use  Close enough to the hardware to get excellent performance.
Damon Rocco.  Tessellation: The filling of a plane with polygons such that there is no overlap or gap.  In computer graphics objects are rendered as.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Morphing and Animation GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from articles taken from ShaderX 3, 4 and 5 And GPU Gems 1.
Tools for Investigating Graphics System Performance
3D Rendering & Algorithms__ Sean Reichel & Chester Gregg a.k.a. “The boring stuff happening behind the video games you really want to play right now.”
Sprite Batching and Texture Atlases Randy Gaul. Overview Batches Sending data to GPU Texture atlases Premultiplied alpha Note: Discussion on slides is.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
4.2. D EFERRED S HADING Exploration of deferred shading (rendering)
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
Computer Graphics Introducing DirectX
High Performance in Broad Reach Games Chas. Boyd
CSE 381 – Advanced Game Programming Basic 3D Graphics
CSC461 Lecture 11: Interactive Programs Contents and Objectives Picking Writing modes – XOR/Copy Rubberbanding Display list.
4.7. I NSTANCING Introduction to geometry instancing.
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.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Emerging Technologies for Games Alpha Sorting and “Soft” Particles CO3303 Week 15.
Computer Graphics Module Review CO2409 Computer Graphics.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
1 Shadows (2) ©Anthony Steed Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
DirectX Objects Finalised Paul Taylor Packing Your Objects
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
Maths & Technologies for Games DirectX 11 – New Features Tessellation & Displacement Mapping CO3303 Week 19.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Wilf LaLonde ©2012 Comp 4501 COMP 4501 Advanced Computer Game Design and Development Wilf LaLonde.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Maths & Technologies for Games Graphics Optimisation - Batching CO3303 Week 5.
What are Computer Graphics Basically anything that is on you Monitor – This includes the text that you will see Text isn’t Advanced Graphics But…. Understanding.
Emerging Technologies for Games Capability Testing and DirectX10 Features CO3301 Week 6.
Ray Tracing using Programmable Graphics Hardware
Mesh Skinning Sébastien Dominé. Agenda Introduction to Mesh Skinning 2 matrix skinning 4 matrix skinning with lighting Complex skinning for character.
Graphics for Games Particle Systems CO2301 Games Development 1 Week 23.
Build your own 2D Game Engine and Create Great Web Games using HTML5, JavaScript, and WebGL. Sung, Pavleas, Arnez, and Pace, Chapter 5 Examples 1.
Our Graphics Environment Landscape Rendering. Hardware  CPU  Modern CPUs are multicore processors  User programs can run at the same time as other.
How to use a Pixel Shader CMT3317. Pixel shaders There is NO requirement to use a pixel shader for the coursework though you can if you want to You should.
OOP - Object Oriented Programming
- Introduction - Graphics Pipeline
Week 12 - Thursday CS361.
Real-Time Soft Shadows with Adaptive Light Source Sampling
Real-Time Rendering Buffers in OpenGL 3.3
The Basics: HTML5, Drawing, and Source Code Organization
Computer Graphics Index Buffers
Graphics on GPU © David Kirk/NVIDIA and Wen-mei W. Hwu,
Deferred Lighting.
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Selective material rendering
Computer Graphics Module Review
Games Development Practices Sound Effects
Computer Graphics Introduction to Shaders
03 | Creating, Texturing and Moving Objects
Use of particle effects within games
Computer Graphics Introducing DirectX
Emerging Technologies for Games Review & Revision Strategy
Using billboards within games
Rendering of trees and vegetation
Opengl implementation
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

Introduction to geometry instancing

Instancing Introduction to geometry instancing

Instancing Explore the DirectX SDK Instancing sample

Geometry Instancing Games often have to render many objects of a similar type (perhaps differing only in terms of colour, position, orientation, etc.). Rendering a large number of objects (each with a limited number of polygons) can stretch modern GPUs, which are not designed to render a small number of polygons thousands of times per frame (the pre-call setups costs very quickly accumulate).

Geometry Instancing Submitting triangles to the GPU for rendering is a relatively slow operation. On modern hardware about 30k-120k batches per second is readily attainable. This amounts to 1k-4k batches per frame at 30fps. Instancing attempts to minimize the number of draw calls, alongside state changes, and render the same triangles multiple times within the same batch in a single call.

Geometry Instancing Instancing requires the vertex and index data to be organised in a particular way so that multiple copies of the mesh can be drawn per batch. Instancing is best suited to tasks where the model to be instanced is relatively simple (<1000 triangles). For a complex model, instancing will return little, if any, benefit, as the performance bottleneck will become GPU bound.

Geometry Instancing (Hardware instancing) Hardware instancing sends two vertex streams to the GPU. One stream contains the normal vertex data and a second stream holds instance data (position, colour, etc.). The advantage of hardware instancing is that the original mesh need only be sent once to the GPU (saving memory).

Geometry Instancing (Shader instancing) Shader instancing builds a vertex buffer which holds a number of copies of the original mesh. The buffer is then used to draw batches of the original object. Instance data is set within the shader using constants. The number of objects drawn per batch is constrained by the maximum number that can be stored within the vertex buffer and the number of available shader constants (e.g. 256 for SM2.0)

Explore the DirectX SDK DX10 Instancing sample

Directed Reading Directed reading concerning geometry instancing

Directed reading Directed reading: Read Batch, Batch, Batch: What Does it Really Mean – for information on the importance of batching within games Read GPU Gems 2 – Inside Geometry Instancing for more information on instancing Read GPU Gems 3 - Animated Crowd Rendering for more information on advanced instancing

To do: Summary Read the directed reading Today we explored: Different geometry instancing techniques To do: Read the directed reading Think if you would like to consider instancing within your project