Fast and Precise: GPU Techniques for 2D

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

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

Image Synthesis. Transparency. computer graphics & visualization

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

Interactive Information Visualization using Graphics Hardware Študentská vedecká konferencia 2006

Visualizing Data: Scalable Interactivity

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

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

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

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

Dynamic Resolution Rendering

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

Equalizer. Parallel OpenGL Application Framework. Stefan Eilemann, Eyescale Software GmbH

GPU Architecture. Michael Doggett ATI

Performance Optimization and Debug Tools for mobile games with PlayCanvas

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

How To Make A Texture Map Work Better On A Computer Graphics Card (Or Mac)

Introduction to Computer Graphics

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

INTRODUCTION TO RENDERING TECHNIQUES

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

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

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

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Optimizing AAA Games for Mobile Platforms

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

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

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

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

Modern Graphics Engine Design. Sim Dietrich NVIDIA Corporation

Radeon HD 2900 and Geometry Generation. Michael Doggett

Advanced Visual Effects with Direct3D

GPU Christmas Tree Rendering. Evan Hart

OpenGL Performance Tuning

Computer Graphics Hardware An Overview

Advanced Graphics and Animations for ios Apps

Introduction to GPGPU. Tiziano Diamanti

Advanced Rendering for Engineering & Styling

Interactive Level-Set Deformation On the GPU

L20: GPU Architecture and Models


_ LUCIADRIA PRODUCT DATA SHEET

Computer Graphics. Anders Hast

Lecture Notes, CEng 477

GPU-Driven Rendering Pipelines

Petascale Visualization: Approaches and Initial Results

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

Interactive Level-Set Segmentation on the GPU

A NEW METHOD OF STORAGE AND VISUALIZATION FOR MASSIVE POINT CLOUD DATASET

Creating 2D Drawings from 3D AutoCAD Models

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

NVIDIA GeForce GTX 580 GPU Datasheet

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

Web Based 3D Visualization for COMSOL Multiphysics

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

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Volume Rendering on Mobile Devices. Mika Pesonen

Lezione 4: Grafica 3D*(II)

Software Virtual Textures

Real-Time BC6H Compression on GPU. Krzysztof Narkowicz Lead Engine Programmer Flying Wild Hog

(Refer Slide Time: 1:42)

SOFTWARE DEVELOPMENT ASPECTS OF OUT-OF-CORE DATA MANAGEMENT FOR PLANETARY TERRAIN

Blender addons ESRI Shapefile import/export and georeferenced raster import

Geometric Modelling & Curves

What is GPUOpen? Currently, we have divided console & PC development Black box libraries go against the philosophy of game development Game

_ LUCIADRIA PRODUCT DATA SHEET

PREPRINT PREPRINT PREPRINT PREPRINT To appear TOG Feature Adaptive GPU Rendering of Catmull-Clark Subdivision Surfaces

AutoCAD New Icon Quick Reference

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

3D Computer Games History and Technology

2013 Getting Started Guide

Technical Drawing Specifications Resource A guide to support VCE Visual Communication Design study design

GPU Point List Generation through Histogram Pyramids

Outline. srgb DX9, DX10, XBox 360. Tone Mapping. Motion Blur

The Future Of Animation Is Games

Parallel Simplification of Large Meshes on PC Clusters

Optimization for DirectX9 Graphics. Ashu Rege

Multi-GPU Load Balancing for Simulation and Rendering

This high level land planning and design system will replace the land

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

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

Far Cry and DirectX. Carsten Wenzel

Introduction to GPU Programming Languages

Hardware design for ray tracing

Working With Animation: Introduction to Flash

Performance Testing in Virtualized Environments. Emily Apsey Product Engineer

Using CAD Data in ArcGIS

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

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

To draw a line. To create a construction line by specifying two points

GPU Shading and Rendering: Introduction & Graphics Hardware

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

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

Deferred Shading & Screen Space Effects

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

CAD/CAM DESIGN TOOLS. Software supplied with all new and upgraded Boxford Lathes, Mills and Routers

Consolidated Visualization of Enormous 3D Scan Point Clouds with Scanopy

Datum > Curve KIM,ME,NIU

Vision based Vehicle Tracking using a high angle camera

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

Transcription:

Fast and Precise: GPU Techniques for 2D Sean James Carnegie Mellon University AutoCAD Product Line, Autodesk Inc. Ravi Krishnaswamy Sr. Software Architect AutoCAD Product Line, Autodesk Inc.

Agenda Goals Analytical Curves Line styles (linetypes) Draw order Performance Conclusion

Background: Project Goal Improve visual quality and performance of 2D curve rendering, particularly for AutoCAD Move from performance OR quality to performance AND quality through better use of the GPU

2D: Engineering Documentation

Some Stats

Background: Product Usage Many 2D users Many DX9 and DX10 feature level users Drawing data size typically.5-1mb Number of 2D entities in the 1000s to 100000s

Considerations Productivity: fast open, zoom, pan, etc. Standards: ISO/ANSI patterns. Industry and Company standards and conventions Visual quality: smooth curves

Analytical Curves

Analytical Curves: High level technique Typically curves are tessellated line segments Our solution: Render envelope geometry around curve Solve curve equation in pixel shader

Analytical Curves: Benefits DX9, OpenGL 3.2 compatibility: no geometry shader tessellation Smooth curves and antialiasing at pixel level Quality independent of amount of geometry: lower memory/pcie bandwidth requirement High-quality option for users investing in better GPUs

Analytical Curves: Instancing Drawing thousands of curves GPU instancing: One copy of base geometry GPU duplicates geometry automatically Vertex shader transforms geometry for each instance Memory/bandwidth savings and performance improvement over AutoCAD implementation Complicates envelope generation and vertex shading

Analytical Curves: Ellipses Problem: No closed form for distance from pixel to curve Correct solution: find θ such that error is minimized. Would require iterative solver in pixel shader. Approximation: to find distance d(p) from point p to curve given implicit ellipse function f. Can be implemented with ddx/ddy shader instructions. See Blinn/Loop 05 for details.

Analytical Curves: Ellipses (cont.) Problem: No closed form for arc length. Arc length needed for linetype parameterization (later). Correct solution: would need to find integral in pixel shader: Approximation: note that the term being integrated is very similar to the following, which has a simple integral.

Analytical Curves: Ellipses (cont.) Problem: Envelope generation for ellipses is non-trivial (tangent, radii depend on θ) Approximation: use envelope for a circle and scale to ellipse radii in vertex shader. Excess pixel coverage but simple, fast, works with instancing.

Analytical Curves: Performance Slow, expensive pixel shading Culling: avoid drawing geometry off screen Level of detail: balance between envelope geometry complexity and screen size Could use an acceleration structure (ex: quad-tree) or geometry shader. Currently CPU only.

Culling/LOD Compute bounding box for each instance, and either cull or choose a level of detail and copy into LOD instance buffer Copy instance buffers to GPU LOD curve based on fraction of screen covered. Avoids shading too many pixels for small objects; grows more slowly for large objects.

Culling/LOD Compute bounding box for each instance, and either cull or choose a level of detail Geometry Copy to GPU Cull LOD0 Copy LOD1 Copy LOD2 Copy LOD3 Copy LOD4 Copy

Culling/LOD: Multiple Threads Decouples render frame rate and slow LOD/culling/copy Worker threads assigned small batches of geometry for culling/lod to balance work distribution Double-buffered level of detail buffers to avoid GPU stalling Example (quad-core CPU): Swap LOD Instance Buffers Worker 0: LOD LOD LOD LOD Worker 1: LOD LOD LOD LOD Worker 2: LOD LOD LOD LOD Render: Frame Frame Frame Frame Frame Frame

Render Pipeline Possible pipeline permutations: Geometry LOD/Cull Tessellate Circles, Arcs, Lines Bézier Curves CPU (DX9+) Geometry Shader (DX10+) Compute (DX11+) CPU (DX9+) Geometry Shader (DX10+) Tesellation Shader (DX11+) Compute (DX11+) Transform Shade Blend Vertex Shader (DX9+) Geometry Shader (DX10+) Analytical Shader (High Qual.) Line Shader (Low Qual.) Pre-sort (DX9+) Order Independent (DX9+) Compute (DX11+)

Linetypes

Linetypes: Cases 1D and complex linetypes Standard and custom linetypes Polylines and composite curves Linetype scale and zoom invariance

Linetypes: Basic and Complex Lines are weighted (2H and HB pencils) Dash lengths are paper and scale specific Complex linetypes contain symbols and text

Linetypes: pattern adjustments End conditions shift the pattern or clamp Complex linetypes adjust symbol alignment

Linetypes: Approach Texture: 2D as array of 1D textures (R,G) Use (cumulative) length as parameterization Handle end conditions via Phase Shift/Clamping

Linetypes: Dots Texel Center u: G Dot or Dash : R Test pixel u distance from Cu in the shader

Demo

Draw Order and Transparency Curves are transparent: need to draw back to front for correctness Instancing: cannot interleave drawing different geometry types CPU Based: view as a graph problem: Rank Approach Consider the DAG based on overlap and order Topological sort GPU Based: No broad support. Consideration of OIT Dx11 SM 5.5 Static scenarios should consider preprocessing v/s every frame

Rank Algorithm: Topological Sort Node numbering based on depth Batch by type and node numbering Bounded by N*OPT where N = number of distinct batch types, OPT = optimal batch count

Samples and Performance : Pan full scene DataSet Applica,on #Lines #Ellip,cal Arcs #Circles # CircleArcs GPU% Average ms/ Frame Stadium Tradi+onal 301378 529 1265 8350 11.2 65 Stadium Analy+c 301378 529 1265 8350 92.5 32 Site Tradi+onal 140755 533 1956 7699 18.9 45 Site Analy+c 140755 533 1956 7699 81 19 Plan Tradi+onal 104786 540 144 1866 23.6 25 Plan Analy+c 104786 540 144 76.2 11 Synthe+c- lines- dashed Tradi+onal 125000 13.4 68 Synthe+c- lines- dashed Analy+c 125000 81.1 4 Synthe+c- circles Tradi+onal 100000 11.4 35 Synthe+c- circles Analy+c 100000 92.7 9

GPU Utilization

Milliseconds per frame

Extension of linetypes to hatch pattern

Hatch Pattern Definition

Generated as lines with linetypes

Pixel Shader: Identify closest line and linetype

Conclusions High quality with performance and capacity gains Non traditional behavior for stylization Can be implemented with lower shader model requirements

Questions?