Efficient Map, Road, Terrain, Text and POI Rendering on OpenGL-ES

Similar documents
Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

OpenGL Performance Tuning

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

Introduction to Computer Graphics

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Computer Graphics Hardware An Overview

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

GPU Architecture. Michael Doggett ATI

Graphics Cards and Graphics Processing Units. Ben Johnstone Russ Martin November 15, 2011

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

Optimizing Unity Games for Mobile Platforms. Angelo Theodorou Software Engineer Unite 2013, 28 th -30 th August

DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

Modern Graphics Engine Design. Sim Dietrich NVIDIA Corporation

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Advanced Rendering for Engineering & Styling

L20: GPU Architecture and Models

Advanced Visual Effects with Direct3D

INTRODUCTION TO RENDERING TECHNIQUES

How To Teach Computer Graphics

Performance Optimization and Debug Tools for mobile games with PlayCanvas

Image Synthesis. Transparency. computer graphics & visualization

Overview Motivation and applications Challenges. Dynamic Volume Computation and Visualization on the GPU. GPU feature requests Conclusions

Lecture Notes, CEng 477

Touchstone -A Fresh Approach to Multimedia for the PC

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

Water Flow in. Alex Vlachos, Valve July 28, 2010

Lezione 4: Grafica 3D*(II)

NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA

Radeon HD 2900 and Geometry Generation. Michael Doggett

Optimizing AAA Games for Mobile Platforms

OpenEXR Image Viewing Software

Low power GPUs a view from the industry. Edvard Sørgård

1. Definition of the project. 2. Initial version (simplified texture) 3. Second version (full textures) 5. Modelling and inserting 3D objects

3D Stereoscopic Game Development. How to Make Your Game Look

Real-Time Realistic Rendering. Michael Doggett Docent Department of Computer Science Lund university

A Short Introduction to Computer Graphics

Workstation Applications for Windows. NVIDIA MAXtreme User s Guide

3D Interactive Information Visualization: Guidelines from experience and analysis of applications

Autodesk Revit Architecture 2011 Professional Massmodeling Rendering Video Tutorial

Hardware design for ray tracing

Introduction GPU Hardware GPU Computing Today GPU Computing Example Outlook Summary. GPU Computing. Numerical Simulation - from Models to Software

The Flat Shape Everything around us is shaped

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

Scan-Line Fill. Scan-Line Algorithm. Sort by scan line Fill each span vertex order generated by vertex list

Faculty of Computer Science Computer Graphics Group. Final Diploma Examination

GPU Christmas Tree Rendering. Evan Hart

Beyond 2D Monitor NVIDIA 3D Stereo

GPGPU Computing. Yong Cao

3D Computer Games History and Technology

NVIDIA GeForce GTX 580 GPU Datasheet

Optimization for DirectX9 Graphics. Ashu Rege

So, you want to make a photo-realistic rendering of the Earth from orbit, eh? And you want it to look just like what astronauts see from the shuttle

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

What s New V 11. Preferences: Parameters: Layout/ Modifications: Reverse mouse scroll wheel zoom direction

ANDROID DEVELOPER TOOLS TRAINING GTC Sébastien Dominé, NVIDIA

GPU Point List Generation through Histogram Pyramids

Software Virtual Textures

Self-Positioning Handheld 3D Scanner

Beginning Android 4. Games Development. Mario Zechner. Robert Green

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

NVIDIA workstation 3D graphics card upgrade options deliver productivity improvements and superior image quality

GPUs Under the Hood. Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology

ClarisWorks 5.0. Graphics

How To Draw In Autocad

Making natural looking Volumetric Clouds In Blender 2.48a

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

CSE 167: Lecture 13: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

NVIDIA IndeX Enabling Interactive and Scalable Visualization for Large Data Marc Nienhaus, NVIDIA IndeX Engineering Manager and Chief Architect

Introduction to GPGPU. Tiziano Diamanti

Web Based 3D Visualization for COMSOL Multiphysics

Dynamic Resolution Rendering

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

The In and Out: Making Games Play Right with Stereoscopic 3D Technologies. Samuel Gateau

Introduction to GP-GPUs. Advanced Computer Architectures, Cristina Silvano, Politecnico di Milano 1

Computer Graphics on Mobile Devices VL SS ECTS

Cortona3D Viewer. User's Guide. Copyright ParallelGraphics

GPU Shading and Rendering: Introduction & Graphics Hardware

Texture Cache Approximation on GPUs

MGL Avionics. MapMaker 2. User guide

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

3D Drawing. Single Point Perspective with Diminishing Spaces

How To Understand The Power Of Unity 3D (Pro) And The Power Behind It (Pro/Pro)

Consolidated Visualization of Enormous 3D Scan Point Clouds with Scanopy

3-D Object recognition from point clouds


Introduction to GPU Programming Languages

SAPPHIRE TOXIC R9 270X 2GB GDDR5 WITH BOOST

CATIA Functional Tolerancing & Annotation TABLE OF CONTENTS

Remote Graphical Visualization of Large Interactive Spatial Data

Welcome to CorelDRAW, a comprehensive vector-based drawing and graphic-design program for the graphics professional.

Intel Graphics Media Accelerator 900

Parallel Simplification of Large Meshes on PC Clusters

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

Materials in NX Render

QUICK REFERENCE: ADOBE ILLUSTRATOR CS2 AND CS3 SECTION 1: CS3 TOOL BOX: PAGE 2 SECTION 2: CS2 TOOL BOX: PAGE 11

Transcription:

Efficient Map, Road, Terrain, Text and POI Rendering on OpenGL-ES Tom McReynolds, NVIDIA

Mapping is Different Embedded platform: weak CPU with small cache, slow bus Need consistent latency, must be smooth all the time Similar to Vis-Sim apps Constant frame rate, similar techniques But lots of annotations: text, icons, landmarks, etc. Different graphics culture

Mapping Elements Scrolling landscape Terrain geometry, land use and roads Terrain and roads have level-of-detail control Multiple icons/text/landscape features Must be clear and uncluttered Scene realism features Sky/fog, lighting, bump mapping

Rendering Architecture On Disk Map DBase System Memory Map Tiles Video Memory Textures + VBOs Terrain DBase Terrain Tiles VBOs

Strategy Use good graphics programming practice Performance tune application Solve mapping problems Use tricky OpenGL-ES techniques Stay within application constraints

Good OpenGL-ES Practice VBOs vs. vertex arrays Optimize rendering thread Start rendering early in the frame Maximize pipelining; keep input fifo full State sorting Minimize state changes Primitive grouping Combine primitives where possible, reuse verts, textures

Performance Tuning Benchmark to find bottlenecks, don t assume you know! Look for performance that varies as well Look for latency as well as bandwidth problems Can wait for bus, disk, context switch, etc. Having some kernel and user tracing tools essential

Extensive Benchmarking 2D Performance Improvement in fps 60 55 50 45 Baseline R6 Baseline 08.03.07 Baseline 08-10-07 Baseline.21DB 08.22.07 Baseline.21DB 08.27.07 Baseline.21DB 45.46 45.525 44.265 FPS 40 35 30 25 20 15 10 5 33.52 31.2 14.775 10.965 10.045 10.395 27.78 23.235 8.69 7.685 7.02 19.095 20.15 17.355 17.585 17.59 15.515 15.995 15.73 16.89 13.425 12.07 11.785 12.375 11.025 8.725 9.15 7.21 7.555 7.45 7.745 5.46 4.765 3.84 4.04 25.9 24.005 22.285 22.82 11.65 12.145 39.705 38.63 37.34 18.76 15.79 7.265 36.68 29.65 28.345 28.695 27.53 27.12 26.17 19 13.995 12.785 8.86 9.24 17.78 16.06 16.5 7.905 5.285 5.43 31.715 31.07 29.425 29.915 17.31 14.985 41.54 29.275 27.13730769 26.31 25.09576923 21.30961538 17.41038462 11.79153846 10.76576923 0 5000 10000 20000 50000 100000 200000 500000 1000000 2000000 5000000 10000000 20000000 50000000 Average Zoom Level

Tracing to find timing delays

Visualizing your Data: PerfHUD

Measuring Data

Mapping Requirements Roads and land usage POI collision detection Terrain scrolling 3D terrain generation Bump mapping Sky and fog Color correction

Roads High quality AA is expected Better than what FSAA can routinely achieve Roads complex to draw Fancy joins and ends Road segments have multiple elements Straightforward implementation too slow Low bus bandwidth from CPU to GPU

Road Techniques Use textures on tri-strips Texture with alpha + alpha blend: high quality AA edges Simplifies geometry: reduces CPU and bus bandwidth requirements Works around slow wide lines on GPU

AA Roads using Textures Create bullseye texture May need multiple resolutions to achieve good texel sampling at different zoom levels. Stretch texture over tri-strip road segments S coords 0 at one end, 1 at other,.5 at line end transition. T coords span width of line

AA Roads using Texture Road detail textures, different resolutions (if needed) 0,0 0,1 Tri-strip with texture coordinates.5,0.5,1 Road texture stretched onto tri-strip.5,0.5,1 1,0 1,1

AA Roads using Texture (cont). Not limited to line ends Can also do joins (curves) and intersections Use finer tessellation of base strip to get smooth curves Discontinuous texture coordinates possible by doubling vertices

Land Use Features Same technique as roads Expand to general polygons Wrap polygons with textured tri-strips Alternatively you can surround polygons with AA lines

POI, Text Collision Detection POI = Points of Interest Think road signs: food, gas, lodging, etc. Usually round or square 2D: a point on map, stays upright 3D: billboard floating over point on terrain Text City, county, country, names etc. Sometimes aligned to stay upright

Roads, Land Use,Text and POIs

POI/Text Collision Detection Need to decide how many POIs to show They shouldn t overlap, or crowd each other: make map too busy or unreadable More complex problem for 3D maps Need to keep POIs, rotated text from overlapping with upright text Some apps require culling, not clipping

Applying POIs and Text Can blit POIs and text to map image But this prevents fast updates Corrupts base image, limiting reuse Better to add text, POIs as textured polygons Rotation, scale invariant (within limits) Billboarding used to keep text, POIs upright Can group billboarding rotations

Collision Detection Approaches Precompute geometry extents, overlaps with CPU If objects can clip each other, depth buffering and stenciling will work Sort objects by priority; higher priority objects obscure lower priority ones Pixel picking methods to find overlap Use colors as object ids Needs fast readback, histogram

Terrain Scrolling Potentially large amount of bandwidth required Different techniques possible: best depends on hardware capabilities Render speed Blit Speed Texturing Want to minimize CPU bandwidth, maximize GPU performance

Blitting Surface larger than visible area Render a buffer around visible region Render extra in direction of travel Blit to scroll Optimal if there is not texturing h/w Uses a lot of video memory Blits may be slow, use up frame time Won t handle rotations, scales

Blitting (cont) Visible Region Extra

Re-Render Surface the same size as visible area Re-render entire scene each frame No wasted video memory No copies, handles rotation, scaling Requires scene update, render update is very fast H/W accelerated transforms VBOs or other methods to minimize triangle bandwidth

Re-Render (cont)

Wrapped Textures Texture larger than visible region Used texture coordinate wrapping Render to region in front of direction of travel Render with transformed texture coordinates to scroll No copy, handles rotation, some scaling Must have fast render-to-texture

Wrapped Textures Visible Region

3D Terrain Generation Usually store height fields, create tessellated surfaces Multiple constraints Must be fast with a slow CPU, bus Data divided into tiles with different resolutions to ease loading, save space Flat vs. mountainous terrain Near vs. far tiles Tiles must connect cleanly even when resolutions don t match

Terrain Generation

3D Terrain Representation Sophisticated algorithms like SOAR Good storage but high CPU load Simple regular grid Fast but uses large amount of storage Simplified quadtree approach Fast traversal to appropriate resolution tiles Regular at each level, fast tessellation

Adding realism to Terrain The more the map matches windshield view the better, but: Too busy = hard to understand Too much detail, map goes out of date quickly The right amount of realism: Easy for viewer to orient to map Symbolic enough to quickly find useful details

More Detail not Always Better

Appropriate Terrain Realism Terrain shape Simplified terrain ok, but can t make distinct features unrecognizable! Lighting Daytime: time of day (exact sun position) Night: modified headlight view Sky, fogging Adds realism that doesn t distract Simplifies view, eases terrain generation

Terrain rendering tricks Normal maps Less computation for CPU Per pixel lighting, high quality Fog maps OpenGL-ES fog too primitive Maps give fine control of fogging function Can change fog color with height (haze) Can combine: RGB = color A = fogging

Fog Maps

Terrain with Normal, Fog Maps 2D Map (C m ) Pass 1 goes to RenTarget Pass 2 goes to BackBuffer Terrain Diffuse Color (C Terrain ) V Fog (C Fog ) C m * dot(c n, C D ) = C MapShaded Fog map A Normal Map (C n ) V U Fog map RGB Diffuse Light (C D ) = C final

Color Correction Content designers choose specific colors Especially route colors They don t like it if your shading changes their colors! Approaches Tone mapping: adjust colors to undo shading effect Use stencil to mask out shading

Going Forward OpenGL-ES 1.X (fixed functionality) can do a lot But there s room for improvement Better map quality Better performance Newer maps need more of both Higher resolution displays More detail (with on-line updates) Driver viewpoint

Areas to Improve: Terrain Displacement mapping Use height field and flat grids as inputs Grids can be 2D and low precision coords Height field stored as mipmap Grid vertex + ds/dx, dt/dy used to mipmap to height value Fragment shader used for lighting Compute normal from height map

Going Forward: Billboarding Vertex shader can do billboard computations on GPU Can batch multiple billboards into single draw call + uniform data Can also adjust billboard height based on height field stored as a texture Billboard position/orientation info reduced to an 2D point

Areas to Improve: Buildings Minimize geometry needed to render buildings Assume simplified buildings: floorplan + constant height Reasonable for non-landmark buildings Send convex outlines of buildings Can build arbitrary buildings from these Render as fans for tops Use geometry shader to build walls

Areas to Improve: Buildings (cont) Geometry shader to build walls Send floorplans twice Use primitive restart to separate array into building pieces Geometry shader offsets per attribute height value, stitches quad array Wall id attribute can be used to choose wall texture, etc. Facet normals computed from quads

Questions?