Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Similar documents
Whiz-Bang Graphics and Media Performance for Java Platform, Micro Edition (JavaME)

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

Baback Elmieh, Software Lead James Ritts, Profiler Lead Qualcomm Incorporated Advanced Content Group

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

CS GAME PROGRAMMING Question bank

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

CHAPTER 1 Graphics Systems and Models 3

Mobile Performance Tools and GPU Performance Tuning. Lars M. Bishop, NVIDIA Handheld DevTech Jason Allen, NVIDIA Handheld DevTools

CS 354R: Computer Game Technology

LOD and Occlusion Christian Miller CS Fall 2011

CS451Real-time Rendering Pipeline

GeForce4. John Montrym Henry Moreton

Coming to a Pixel Near You: Mobile 3D Graphics on the GoForce WMP. Chris Wynn NVIDIA Corporation

POWERVR MBX & SGX OpenVG Support and Resources

The Application Stage. The Game Loop, Resource Management and Renderer Design

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager

Real-Time Rendering. Tomas Möller Eric Haines. A K Peters Natick, Massachusetts

Spring 2009 Prof. Hyesoon Kim

Graphics Processing Unit Architecture (GPU Arch)

GeForce3 OpenGL Performance. John Spitzer

M3G Overview. Tomi Aarnio Nokia Research Center

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

Dave Shreiner, ARM March 2009

Deferred Splatting. Gaël GUENNEBAUD Loïc BARTHE Mathias PAULIN IRIT UPS CNRS TOULOUSE FRANCE.

POWERVR MBX. Technology Overview

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Optimizing Games for ATI s IMAGEON Aaftab Munshi. 3D Architect ATI Research

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Hardware-driven visibility culling

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Render-To-Texture Caching. D. Sim Dietrich Jr.

Spring 2011 Prof. Hyesoon Kim

Game Architecture. 2/19/16: Rasterization

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies

Wed, October 12, 2011

Programming Graphics Hardware

Sign up for crits! Announcments

GoForce 3D: Coming to a Pixel Near You

Profiling and Debugging Games on Mobile Platforms

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Falanx Microsystems. Company Overview

Practical Shadows. Outline

Module 13C: Using The 3D Graphics APIs OpenGL ES

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Optimisation. CS7GV3 Real-time Rendering

Introduction to the OpenGL Shading Language

Lecture 9: Deferred Shading. Visual Computing Systems CMU , Fall 2013

Realistic and Fast Cloud Rendering in Computer Games. Niniane Wang Software Engineer Microsoft Flight Simulator (now at Google Inc) Intro Video

Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics. Sean Ellis Consultant Graphics Engineer ARM, Maidenhead

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Evolution of GPUs Chris Seitz

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal

Programming Guide. Aaftab Munshi Dan Ginsburg Dave Shreiner. TT r^addison-wesley

Pipeline Operations. CS 4620 Lecture 14

Computer Graphics: Programming, Problem Solving, and Visual Communication

Windowing System on a 3D Pipeline. February 2005

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Lecture 2. Shaders, GLSL and GPGPU

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

FRUSTUM-TRACED RASTER SHADOWS: REVISITING IRREGULAR Z-BUFFERS

Pipeline Operations. CS 4620 Lecture 10

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Sung-Eui Yoon ( 윤성의 )

Feeding the Beast: How to Satiate Your GoForce While Differentiating Your Game

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog

Copyright Khronos Group Page 1

Working with Metal Overview

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

CS 130 Final. Fall 2015

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

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

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Real-World Applications of Computer Arithmetic

Enabling immersive gaming experiences Intro to Ray Tracing

Graphics Hardware. Instructor Stephen J. Guy

Mali Demos: Behind the Pixels. Stacy Smith

Engineering Real- Time Applications with Wild Magic

Challenges for GPU Architecture. Michael Doggett Graphics Architecture Group April 2, 2008

PROFESSIONAL. WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB. Andreas Anyuru WILEY. John Wiley & Sons, Ltd.

Mobile HW and Bandwidth

1.2.3 The Graphics Hardware Pipeline

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

3D Computer Games Technology and History. Markus Hadwiger VRVis Research Center

Dominic Filion, Senior Engineer Blizzard Entertainment. Rob McNaughton, Lead Technical Artist Blizzard Entertainment

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Lecture 13: Reyes Architecture and Implementation. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Real-Time Graphics Architecture

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Visibility. Welcome!

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

HE COMPLETE OPENGL PROGI FOR WINDOW WIND

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

RASTERISED RENDERING

Computer Graphics I Lecture 11

PowerVR Hardware. Architecture Overview for Developers

Transcription:

Building scalable 3D applications Ville Miettinen Hybrid Graphics

What s going to happen... (1/2) Mass market: 3D apps will become a huge success on low-end and mid-tier cell phones Retro-gaming New game genres taking into account special characteristics of cell phones Navigation apps, screen savers, animations Mass market is the place for revolutions

What s going to happen... (2/2) Separate market for high-end game phones Console ports Still need to run popular low-end games Place for evolution Some devices will form their own markets Launch titles still subsidized by device manufacturers Much more variety than in PCs or consoles

What is a mobile platform? CPU speed and available memory varies Current range ~30Mhz - 600MHz, no FPUs Portability issues Different CPUs, OSes, Java VMs, C compilers,... Different resolutions QCIF (176x144) to VGA (640x480), antialiasing on higher-end devices 4-8 bits per color channel (12-32 bpp)

Graphics capabilities General-purpose multimedia hardware Pure software renderers (all CPU & integer ALU) Software + DSP / WMMX / FPU / VFPU Multimedia accelerators Dedicated 3D hardware Software T&L + HW tri setup / rasterization Full HW Performance: 50K 2M tris, 1M 100M pixels

Dealing with diversity Problem: running the same game on 100+ different devices Same gameplay but can scale video and audio Scalability must be built into game design Profile-based approach

3D content is easy to scale Separate low and high poly 3D models Different texture resolutions and compressed formats Scaling down special effects not critical to game play (particle systems, shadows) Important to realize what is a special effect Rendering quality controls Texture filtering, perspective correction, blend functions, multi-texturing, antialiasing

Building scalable 3D apps OpenGL ES standardizes the API and behavior ES does not attempt to standardize performance Two out of three ain t bad Differences between SW/HW configurations Trade-off between flexibility and performance Synchronization issues

Building scalable 3D apps Scale upwards, not downwards Bad experiences of retro-fitting HW titles to SW Test during development on lowest-end platform Both programmers and artists need education Artists can deal with almost anything as long as they know the rules... And when they don t, just force them (automatic checking in art pipeline)

Reducing state changes Don t mix 2D and 3D calls!!! Situation may become better in the future, though... Unnecessary state changes root of all evil Avoid changes affecting the vertex pipeline Avoid changes to the pixel pipeline Avoid changing textures

Shaders Combine state changes into blocks ( shaders ) Minimize number of shaders per frame Typical application needs only 3-10 pixel shaders Different 3-10 shaders in every application Enforce this in artists tool chain Sort objects by shaders every frame Split objects based on shaders

Complexity of shaders Software rendering: Important to keep shaders as simple as possible Do even if introduces additional state changes Example: turn off fog & depth buffering when rendering overlays Hardware rendering: Usually more important to keep number of changes small

Of models and stripping Use buffer objects of ES 1.1 Only models changed manually every frame need vertex pointers Many LOD schemes can be done just by changing index buffers Keep data formats short and simple Better cache coherence, less memory used

Triangle data (1/2) Minimize number of rendering calls Trade-off between the number of render calls & culling efficiency Combine strips using degenerate triangles Understanding vertex caching Automatically optimize vertex access order Triangle lists better than their reputation

Triangle data (2/2) Optimize data in your art pipeline (exporters) Welding vertices with same attributes (with tolerance) Vertices/triangle ratio in good data 0.7-1.0 Give artists plenty of automatic feedback

Transformations and matrices Minimize matrix changes (demo) Changing a matrix may involve many hidden costs Combine simple objects with same transformation Flatten and cache transformation hierarchies ES 1.1: Skinning using matrix palettes (demo) CPU doesn t have to touch vertex data Characters, natural motion: grass, trees, waves

Point sprites ES 1.1: Point sprites (demo) Smoke, fire, explosions, water flow, stars, weather effects Scale controls through PointSizeArray, PointSizeAttenuation Expensive to do in ES 1.0 Drawback: can t rotate sprites or textures, fixed texture coordinates

Lighting and materials Fixed-function lighting pipelines are so 1990s Drivers implemented badly even in desktop space In practice only single directional light fast OpenGL s attenuation model difficult to use Spot cutoff and specular model cause aliasing No secondary specular color

Lighting: the fast way While we re waiting for OpenGL ES 2.0... Pre-computed vertex illumination good if slow T&L Illumination using texturing Light mapping ES 1.1: dot3 bump mapping + texture combine Less tessellation required Color material tracking for changing materials Flat shading is for flat models!

Illumination using multitexturing

Textures Mipmaps always a Good Thing Improved cache coherence and visual quality ES 1.1 supports auto mipmap generation Different strategies for texture filtering SW: Perspective correction not always needed Avoid modifying texture data Keep textures right size, use compressed textures

Textures Multitexturing Needed for texture-based lighting Always faster than doing multiple rendering passes ES 1.1: support at least two texturing units ES 1.1: TexEnvCombine neat toy Combine multiple textures into single larger one Reduce texture state changes (for fonts, animations, light maps)

Textures and shots from Kesmai s Air Warrior 4 (never published)

The high-level pipeline High-level optimizations equally important Setup: organize objects hierarchically Triangles organized into spatially coherent objects Conservative bounding volumes (spheres, boxes) computed for each object

Four-step program for fast rendering 1. Render background and very distance objects Sky cubes, impostors (use sky box to clear the background) 2. Cull objects not contributing to final image 3. Apply level of detail computations Cull-away sub-pixel-size objects (contribution culling) 4. Sort remaining objects into optimal order

Culling Occlusion culling Potentially Visible Sets and Portals are good low-cost solutions ES 1.1 provides user clip planes to help with portals Hierarchical view frustum culling Back-face culling Are we inside our outside the object? Terrains and indoors don t cull well

Object ordering Sort objects into optimal rendering order Minimize shader changes Keep objects in front-to-back order Improves Z-buffering efficiency Satisfying both goals: bucketize objects by shader, sort buckets by Z

Thank you! Any questions?