3 Meshes. Strips, Fans, Indexed Face Sets. Display Lists, Vertex Buffer Objects, Vertex Cache

Size: px
Start display at page:

Download "3 Meshes. Strips, Fans, Indexed Face Sets. Display Lists, Vertex Buffer Objects, Vertex Cache"

Transcription

1 3 Meshes Strips, Fans, Indexed Face Sets Display Lists, Vertex Buffer Objects, Vertex Cache

2 Intro generate geometry triangles, lines, points glbegin(mode) starts primitive then stream of vertices with glvertex( ) vertices interpreted according to mode mode can be:

3 Intro primitive assembly: how to interpret stream of incident vertices? glbegin(gl_triangles); glvertex(0,0,0); glvertex(1,0,0); glvertex(1,1,0); glend(); vertex shader vertex stream primitive assembly vertex stream geometry shader rasterizer pixel stream

4 Triangle meshes isolated triangles: glbegin(gl_triangles); glvertex(v1); tri 1 glvertex(v2); glvertex(v3); glvertex(v4); glvertex(v5); glvertex(v6); glend(); tri 2 v1 v6 v3 v2 3n vertices for n triangles 3n vertices processed by geometry stage v5 v4

5 Triangle meshes triangle fans glbegin(gl_triangle_fan); glvertex(v1); glvertex(v2); glvertex(v3); glvertex(v4); glvertex(v5); glvertex(v6); glvertex(v2); glend(); v2 v6 v1 v3 v5 v4 n+2 vertices for n triangles three times less work for geometry stage!

6 Triangle meshes triangle strips v2 v4 v6 v8 v10 v1 v3 v5 glbegin(gl_triangle_strip); glvertex(v1); glvertex(v2); tri 1 glvertex(v3); tri 2 glvertex(v4); tri 3 glvertex(v5); for n triangles, n+2 vertices must pass geometry stage v7 v9 v11

7 Triangle meshes triangle strips v2 v4 v6 v8 v10 v1 v3 v5 v7 v9 v11 in OpenGL: vertices v1, v2, v3... triangles: (v1,v2,v3), (v2,v3,v4), (v3,v4,v5),...

8 Triangle meshes general triangle strips v9 v10 v2 v4 v6 v8 v1 v3 v5 v7 triangles:... (v6,v7,v8), (v6,v8,v9), (v8,v9,v10)... not directly supported by OpenGL

9 Triangle meshes v9 v10 general triangle strips v2 v4 v6 v8 conversion: v1,v2,v3,v4,v5,v6,v7,v6,v8,v9,v10 delivers:...(v5,v6,v7), (v6,v7,v6), (v7,v6,v8), (v6,v8,v9),... v1 dummy triangle v3 v5 v7

10 Triangle meshes indexed face sets in OpenGL provide vertex data in an array float pos[n] = { x1,y1,z1, x2,y2,z2,...}; glvertexpointer(pos); also normal, texture coordinates, color arrays possible: float norm[n] = { nx1,ny1,nz1, nx2,ny2,nz2,...}; glnormalpointer(norm); draw entire stream by providing index list int index[m] = {0,1,2, 1,2,3, 1,3,5,...}; gldrawelements(gl_triangles,m,index);

11 Vertex Buffer Objects (VBOs) remaining problem with glvertexpointer(): data still on client side (main memory) must be transfered to video memory for rendering (in fast streaming mode) Vertex Buffer Object: abstraction for access to video memory can hold vertex data (vertex array with position, normal, ) can hold triangle indices (element array) as fast as display lists memory manager: if data does not entirely fit to video memory swap in and out transparently

12 Vertex Buffer Objects glgenbuffer() generate Vertex Buffer Object returns ID for new object glbindbuffer() from now on, all calls to glvertexpointer(), glxxxpointer() refer to buffer pointers are now relative to this buffer, i.e. they start with 0 glbufferdata() load data into currently bound VBO glmapbuffer(), glunmapbuffer() map VBO to main memory CPU can access data via normal pointer unmap maps changes back to video memory

13 Vertex Buffer Objects example (from NeHe tutorials) // Generate And Bind The Vertex Buffer // Get A Valid Name glgenbuffersarb( 1, &m_nvbovertices ); // Bind The Buffer glbindbufferarb( GL_ARRAY_BUFFER_ARB, m_nvbovertices ); // Load The Data glbufferdataarb( GL_ARRAY_BUFFER_ARB, m_nvertexcount*3*sizeof(float), m_pvertices, GL_STATIC_DRAW_ARB ); // bind buffer glbindbufferarb( GL_ARRAY_BUFFER_ARB, m_nvbovertices); // Set The Vertex Pointer To The Vertex Buffer glvertexpointer( 3, GL_FLOAT, 0, (char *) NULL );

14 Batches sending a complete mesh via glvertex is very expensive due to the large number of function calls display lists are better best way to go nowadays: vertex buffer objects remaining bottle neck: batch number (= number of gldrawelements calls) we can submit about batches per second (CPU bound) 10 or triangles per batch makes no real difference see: Batch, Batch, Batch: What Does It Really Mean

15 Triangle meshes acceleration techniques Stripification: convert mesh to triangle strips Vertex Cache: cache for processed vertices

16 Stripification we need mesh as Indexed Face Set with Neighborhood vertex list per vertex: (x,y,z) coordinate triangle list per triangle: vertex indices, neighbor indices example: vertex list v1...v5 triangle list: T1: v1,v3,v5; T2,NIL,T3 T2: v3,v4,v5; NIL,T1,NIL T3: v1,v2,v3; NIL,T1,NIL v2 v4 v3 T2 T3 T1 v5 v1

17 Stripification goal: search optimal decomposition into triangle strips reduced work for vertex unit memory efficient way to store topology (1+ε indices / triangle) increase cache coherence complexity: NP complete, i.e. generally not doable for typical meshes with thousands of vertices

18 Stripification most simple approach 1. random select of unused triangle 2. start a triangle strip along one edge until the boundary or a used triangle is reached 3. continue triangle strip in opposite direction 4. continue with step 1, until all triangles are used

19 Stripification SGI approach (from SGI demo): more intelligent selection of start triangle: search triangle with least unused neighbors if not unique: select triangle whose neighbors have the least unused neighbors motivation: triangles with few neighbors can quickly get isolated and then result in bad strips of lenght 1

20 Stripification Example: selection first triangle all boundary triangles have two neighbors

21 Stripification Example: Selection first triangle all boundary triangles have two neighbors four of them have neighbors with also only two neighbors

22 Stripification Example: Selection first triangle all boundary triangles have two neighbors four of them have neighbors with also only two neighbors select one of them

23 Stripification Example: Selection first triangle all boundary triangles have two neighbors four of them have neighbors with also only two neighbors select one of them

24 Stripification Example: Selection second triangle select on of the four candidates

25 Stripification Example: Selection second triangle select on of the four candidates continue strip

26 Stripification Example: selection third triangle continue strip

27 Vertex Cache indexed face sets in OpenGL provide vertex data in an array float pos[n] = { x1,y1,z1, x2,y2,z2,...}; glvertexpointer(pos); also normal, texture coordinates, color arrays possible: float norm[n] = { nx1,ny1,nz1, nx2,ny2,nz2,...}; glnormalpointer(norm); draw entire stream by providing index list int index[m] = {0,1,2, 1,2,3, 1,3,5,...}; gldrawelements(gl_triangles,m,index);

28 Vertex Cache graphics stores the vertex program result of the last n vertices reuse cached results if possible typical vertex cache size: 24 Example: Indizes 0,1,2, 3,2,5, 1,3,4, 4,2,3, 6,7,8,... Misses & Hits: 0,1,2, 3,2,5, 1,3,4, 4,2,3, 6,7,8

29 Vertex Cache Properties: optimal ratio triangles / vertices is 2, i.e. from n vertices, 2n triangles are generated! only possible with indexed face sets find cache entries by index comparison optimization for vertex cache tricky Demo NVTriStrips (

30 Cache Oblivious Mesh Layout more general way to improve cache coherence Yoon et al., Siggraph 2005 (see webpage: following slides from this website given is arbitrary triangle mesh as indexed face set search optimal order for indices that minimizes cache misses general idea: metric for cache coherent vertex order of meshes optimize vertex order

31 Cache Oblivious Mesh Layout overview vb va vc vd Input graph Multilevel optimization va vb vd vc Cache-oblivious metric Local permutations Result 1D layout

32 Cache Oblivious Mesh Layout Undirected graph, G = (V, E) Represents access patterns of applications Vertex can be mesh triangle or can be mesh vertex Edge Connects two vertices if they are likely to be accessed sequentially if vertices are mesh triangles: sort triangle list cache friendly if vertices are mesh vertices: sort vertex list cache friendly vb va vc vd

33 Cache Oblivious Mesh Layout Vertex layout of G = (V, E) One to one mapping of vertices to indices in the 1D layout ϕ : { 1,..., V } V vb va vd va vb vd vc vc ϕ Compute a that minimizes the expected number of cache misses

34 Cache Oblivious Mesh Layout Optimization by swapping vertex orders Vertex layout here: v_c is used in triangle abc, so it should be close to a and b swapping 4th and 5th vertex (v_c and v_e) decreases probability of cache misses

35 Cache Oblivious Mesh Layout How can we formalize this? edge span of (va, vb) = ϕ( v ) ϕ( v ) a b ϕ( v ) = a 1 Layout mapping ϕ( v ) ϕ( v ) = a c 4 ϕ( v ) = c 5

36 Cache Oblivious Mesh Layout E i Set of edges having edge span i in the layout 44 ( v, v ) E a c 4

37 Cache Oblivious Mesh Layout Edge span distribution Ei where i is in [1, n] E 1 = E 1 2 = E 1 3 = E 4 = Number of edges Edge span 1

38 Cache Oblivious Mesh Layout Probability of a cache miss for a given edge span i Cache miss ratio = Probability to have a cache miss 1 0 p i i Edge span 1 n-1

39 Cache Oblivious Mesh Layout Estimated by multiplying two factors Runtime edge span distribution CMRF Runtime edge span distribution CMRF ( p 2 + p 4 + p 2 ) = (2,1) (p 2,p 4 ) Edge span 2 Edge span 4 Edge span 2 1D Layout:

40 Cache Oblivious Mesh Layout Approximate runtime edge span distribution with one of the layout The number of vertices Edge span distribution of the layout n 1 i= 1 E p i i

41 Cache Oblivious Metric Decides if a local permutation reduces number of cache misses Probabilistic formulation Reduces to geometric volume computation

42 Does a Local Permutation Decrease Cache Misses? n 1 i= 1 n? E p > i i i= 1 1 ( E i +Δ E i ) p i Ei E + Δ E i i

43 Does a Local Permutation Decrease Cache Misses? n 1 i= 1 n E p > i i = i 1 1 ( E i +Δ E i ) p i n 1 i=1 Δ E p i i < 0

44 Monotonocity of CMRF, pi Assume CMRF is a monotonically increasing function of edge span Cache miss ratio 1 0 p i 1 i Edge span

45 Exact Cache Oblivious Metric n 1 i=1 Δ E p i i where All the possible cache configurations < 0 Monotonicity of CMRF 0 p p... p p 1 2 n 2 n 1 1

46 Geometric Formulation Half hyperspace n 1 Δ E p i i < 0 p 2 i=1 where 0 p 1 0 p p... p p 1 2 n 2 n 1 Closed hyperspace R n 1 1 p 2 0 p 1

47 Geometric Volume Computation Assume each CMRF to be equally likely n 1 i=1 Δ E i p i < 0 where 0 p p2... p n 2 pn 1 1 Half hyperspace (blue area) Space of CMRFs that reduce cache misses 1 p 2 0 p 1

48 Cache Oblivious Mesh Layout optimize by deciding about local permutations Exact: O(n n +1) [Lasserre and Zeron 01] Appr.: O(n 5 ) [Kannan et al. 97] practical algorithm in paper Process 70 million vertices per hour Takes 2.6 hours to lay out St. Matthew model (372 million triangles) 2.4GHz of Pentium 4 PC with 1 GB main memory

49 Cache Oblivious Mesh Layout Peak performance: 145 M tri / s on GeForce 6800 Ultra Models # of Tri. Our layout Simplification layout [Yoon et al. 04] St. Matthew 372M 106 M/s 23 M/s 4.5X Isosurface 100M 90 M/s 20 M/s Double Eagle Tanker 2.1X 82M 47 M/s 22 M/s

50 video (quicktime) Cache Oblivious Mesh Layout

CENG 477 Introduction to Computer Graphics. Graphics Hardware and OpenGL

CENG 477 Introduction to Computer Graphics. Graphics Hardware and OpenGL CENG 477 Introduction to Computer Graphics Graphics Hardware and OpenGL Introduction Until now, we focused on graphic algorithms rather than hardware and implementation details But graphics, without using

More information

Rendering Objects. Need to transform all geometry then

Rendering Objects. Need to transform all geometry then Intro to OpenGL Rendering Objects Object has internal geometry (Model) Object relative to other objects (World) Object relative to camera (View) Object relative to screen (Projection) Need to transform

More information

Level-of-Detail Techniques and Cache-Coherent Layouts

Level-of-Detail Techniques and Cache-Coherent Layouts Level-of-Detail Techniques and Cache-Coherent Layouts Sung-Eui Yoon Lawrence Livermore National Laboratory Note: this talk is not supported or sanctioned by DoE, UC, LLNL, CASC Lawrence Livermore National

More information

GLSL Overview: Creating a Program

GLSL Overview: Creating a Program 1. Create the OpenGL application GLSL Overview: Creating a Program Primarily concerned with drawing Preferred approach uses buffer objects All drawing done in terms of vertex arrays Programming style differs

More information

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

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský Real - Time Rendering Pipeline optimization Michal Červeňanský Juraj Starinský Motivation Resolution 1600x1200, at 60 fps Hw power not enough Acceleration is still necessary 3.3.2010 2 Overview Application

More information

Vertex Buffer Objects

Vertex Buffer Objects 1 Vertex Buffer Objects This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License Mike Bailey mjb@cs.oregonstate.edu VertexBuffers.pptx Vertex Buffer

More information

Vertex Buffer Objects. Vertex Buffer Objects: The Big Idea

Vertex Buffer Objects. Vertex Buffer Objects: The Big Idea 1 Vertex Buffer Objects This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License Mike Bailey mjb@cs.oregonstate.edu VertexBuffers.pptx Vertex Buffer

More information

Spring 2009 Prof. Hyesoon Kim

Spring 2009 Prof. Hyesoon Kim Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

Spring 2011 Prof. Hyesoon Kim

Spring 2011 Prof. Hyesoon Kim Spring 2011 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

Building Models. Objectives. Introduce simple data structures for building polygonal models. OpenGL vertex arrays. Vertex lists Edge lists

Building Models. Objectives. Introduce simple data structures for building polygonal models. OpenGL vertex arrays. Vertex lists Edge lists Building Models Objectives Introduce simple data structures for building polygonal models Vertex lists Edge lists OpenGL vertex arrays 2 Representing a Mesh Consider a mesh v 5 v e e e 3 v 9 8 8 v e 4

More information

Graphics Programming

Graphics Programming Graphics Programming 3 rd Week, 2011 OpenGL API (1) API (application programming interface) Interface between an application program and a graphics system Application Program OpenGL API Graphics Library

More information

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology Graphics Performance Optimisation John Spitzer Director of European Developer Technology Overview Understand the stages of the graphics pipeline Cherchez la bottleneck Once found, either eliminate or balance

More information

Building Models. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Building Models. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Building Models Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Introduce simple data structures for building polygonal

More information

Interactive Ray Tracing: Higher Memory Coherence

Interactive Ray Tracing: Higher Memory Coherence Interactive Ray Tracing: Higher Memory Coherence http://gamma.cs.unc.edu/rt Dinesh Manocha (UNC Chapel Hill) Sung-Eui Yoon (Lawrence Livermore Labs) Interactive Ray Tracing Ray tracing is naturally sub-linear

More information

CSE 4431/ M Advanced Topics in 3D Computer Graphics. TA: Margarita Vinnikov

CSE 4431/ M Advanced Topics in 3D Computer Graphics. TA: Margarita Vinnikov CSE 4431/5331.03M Advanced Topics in 3D Computer Graphics TA: Margarita Vinnikov mvinni@cse.yorku.ca Goals of any 3d application is speed. You should always limit the amount of polygons actually rendered

More information

2.11 Particle Systems

2.11 Particle Systems 2.11 Particle Systems 320491: Advanced Graphics - Chapter 2 152 Particle Systems Lagrangian method not mesh-based set of particles to model time-dependent phenomena such as snow fire smoke 320491: Advanced

More information

Introduction to OpenGL

Introduction to OpenGL Introduction to OpenGL 1995-2015 Josef Pelikán & Alexander Wilkie CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ 1 / 31 Advances in Hardware 3D acceleration is a common feature in

More information

Direct Rendering of Trimmed NURBS Surfaces

Direct Rendering of Trimmed NURBS Surfaces Direct Rendering of Trimmed NURBS Surfaces Hardware Graphics Pipeline 2/ 81 Hardware Graphics Pipeline GPU Video Memory CPU Vertex Processor Raster Unit Fragment Processor Render Target Screen Extended

More information

GPU-Based Volume Rendering of. Unstructured Grids. João L. D. Comba. Fábio F. Bernardon UFRGS

GPU-Based Volume Rendering of. Unstructured Grids. João L. D. Comba. Fábio F. Bernardon UFRGS GPU-Based Volume Rendering of João L. D. Comba Cláudio T. Silva Steven P. Callahan Unstructured Grids UFRGS University of Utah University of Utah Fábio F. Bernardon UFRGS Natal - RN - Brazil XVIII Brazilian

More information

Supplement for Real-Time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation

Supplement for Real-Time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation Supplement for Real-Time Soft Shadows in Dynamic Scenes using Spherical Harmonic Exponentiation Zhong Ren 1* Rui Wang 1* John Snyder 2 Kun Zhou 3 Xinguo Liu 3 Bo Sun 4 Peter-Pike Sloan 5 Hujun Bao 1 Qunsheng

More information

QUADRILATERAL MESHES STRIPIFICATION

QUADRILATERAL MESHES STRIPIFICATION Proceedings of ALGORITMY 2005 pp. 300 308 QUADRILATERAL MESHES STRIPIFICATION PETR VANĚČEK, RADEK SVITÁK, IVANA KOLINGEROVÁ, AND VÁCLAV SKALA CENTRE OF COMPUTER GRAPHICS AND DATA VISUALIZATION DEPARTMENT

More information

SHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming

SHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming SHADER PROGRAMMING Based on Jian Huang s lecture on Shader Programming What OpenGL 15 years ago could do http://www.neilturner.me.uk/shots/opengl-big.jpg What OpenGL can do now What s Changed? 15 years

More information

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

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload) Lecture 2: Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload) Visual Computing Systems Today Finishing up from last time Brief discussion of graphics workload metrics

More information

Advanced Computer Graphics

Advanced Computer Graphics Advanced Computer Graphics Lecture 2: Modeling (1): Polygon Meshes Bernhard Jung TU-BAF, Summer 2007 Overview Computer Graphics Icon: Utah teapot Polygon Meshes Subdivision Polygon Mesh Optimization high-level:

More information

Optimisation. CS7GV3 Real-time Rendering

Optimisation. CS7GV3 Real-time Rendering Optimisation CS7GV3 Real-time Rendering Introduction Talk about lower-level optimization Higher-level optimization is better algorithms Example: not using a spatial data structure vs. using one After that

More information

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key

More information

API Background. Prof. George Wolberg Dept. of Computer Science City College of New York

API Background. Prof. George Wolberg Dept. of Computer Science City College of New York API Background Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Graphics API history OpenGL API OpenGL function format Immediate Mode vs Retained Mode Examples The Programmer

More information

Display Lists. Conceptually similar to a graphics file. In client-server environment, display list is placed on server

Display Lists. Conceptually similar to a graphics file. In client-server environment, display list is placed on server Display Lists Conceptually similar to a graphics file Must define (name, create) Add contents Close In client-server environment, display list is placed on server Can be redisplayed without sending primitives

More information

Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation

Cloth Simulation on the GPU. Cyril Zeller NVIDIA Corporation Cloth Simulation on the GPU Cyril Zeller NVIDIA Corporation Overview A method to simulate cloth on any GPU supporting Shader Model 3 (Quadro FX 4500, 4400, 3400, 1400, 540, GeForce 6 and above) Takes advantage

More information

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011) Lecture 4: Processing Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011) Today Key per-primitive operations (clipping, culling) Various slides credit John Owens, Kurt Akeley,

More information

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

The Application Stage. The Game Loop, Resource Management and Renderer Design 1 The Application Stage The Game Loop, Resource Management and Renderer Design Application Stage Responsibilities 2 Set up the rendering pipeline Resource Management 3D meshes Textures etc. Prepare data

More information

Rendering Grass with Instancing in DirectX* 10

Rendering Grass with Instancing in DirectX* 10 Rendering Grass with Instancing in DirectX* 10 By Anu Kalra Because of the geometric complexity, rendering realistic grass in real-time is difficult, especially on consumer graphics hardware. This article

More information

Name. EE 4702 Final Exam. Friday, 7 December 2012, 12:30-14:30 CST. Exam Total. Alias. (100 pts) Good Luck!

Name. EE 4702 Final Exam. Friday, 7 December 2012, 12:30-14:30 CST. Exam Total. Alias. (100 pts) Good Luck! Name EE 4702 Final Exam Friday, 7 December 2012, 12:30-14:30 CST Alias Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Exam Total (20 pts) (20 pts) (100 pts) Good Luck! Problem 1: [15 pts]the

More information

Tutorial 1: Your First Triangle!

Tutorial 1: Your First Triangle! Tutorial 1: Your First Triangle! Summary For your first dabble in OpenGL, you are going to create the graphics programming equivalent of Hello World - outputting a single coloured triangle. It doesn t

More information

From Brook to CUDA. GPU Technology Conference

From Brook to CUDA. GPU Technology Conference From Brook to CUDA GPU Technology Conference A 50 Second Tutorial on GPU Programming by Ian Buck Adding two vectors in C is pretty easy for (i=0; i

More information

Filled Area Primitives. CEng 477 Introduction to Computer Graphics METU, 2007

Filled Area Primitives. CEng 477 Introduction to Computer Graphics METU, 2007 Filled Area Primitives CEng 477 Introduction to Computer Graphics METU, 2007 Filled Area Primitives Two basic approaches to area filling on raster systems: Determine the overlap intervals for scan lines

More information

OpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL

OpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL OpenGL: Open Graphics Library Introduction to OpenGL Part II CS 351-50 Graphics API ( Application Programming Interface) Software library Layer between programmer and graphics hardware (and other software

More information

B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes

B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes B-KD rees for Hardware Accelerated Ray racing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek Saarland University, Germany Outline Previous Work B-KD ree as new Spatial Index Structure DynR

More information

Graphics Hardware. Instructor Stephen J. Guy

Graphics Hardware. Instructor Stephen J. Guy Instructor Stephen J. Guy Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability! Programming Examples Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability!

More information

GPU Programming EE Midterm Examination

GPU Programming EE Midterm Examination Name GPU Programming EE 4702- Midterm Examination Wednesday, 2 November 204 9:30 0:20 CST Alias Problem Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Exam Total (8 pts) (2 pts) (24 pts) (2 pts) (4

More information

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1 X. GPU Programming 320491: Advanced Graphics - Chapter X 1 X.1 GPU Architecture 320491: Advanced Graphics - Chapter X 2 GPU Graphics Processing Unit Parallelized SIMD Architecture 112 processing cores

More information

Shaders. Slide credit to Prof. Zwicker

Shaders. Slide credit to Prof. Zwicker Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?

More information

Drawing Fast The Graphics Pipeline

Drawing Fast The Graphics Pipeline Drawing Fast The Graphics Pipeline CS559 Fall 2016 Lectures 10 & 11 October 10th & 12th, 2016 1. Put a 3D primitive in the World Modeling 2. Figure out what color it should be 3. Position relative to the

More information

Graphics Programming. August 31, Programming of the Sierpinski gasket. Programming with OpenGL and C/C++

Graphics Programming. August 31, Programming of the Sierpinski gasket. Programming with OpenGL and C/C++ Computer Graphics Graphics Programming August 31, 2005 Contents Our Goal in This Chapter Programming of the Sierpinski gasket How To? Programming with OpenGL and C/C++ OpenGL API (Application Programmer

More information

Building Models. Prof. George Wolberg Dept. of Computer Science City College of New York

Building Models. Prof. George Wolberg Dept. of Computer Science City College of New York Building Models Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce simple data structures for building polygonal models - Vertex lists - Edge lists Deprecated

More information

UberFlow: A GPU-Based Particle Engine

UberFlow: A GPU-Based Particle Engine UberFlow: A GPU-Based Particle Engine Peter Kipfer Mark Segal Rüdiger Westermann Technische Universität München ATI Research Technische Universität München Motivation Want to create, modify and render

More information

Goal. Interactive Walkthroughs using Multiple GPUs. Boeing 777. DoubleEagle Tanker Model

Goal. Interactive Walkthroughs using Multiple GPUs. Boeing 777. DoubleEagle Tanker Model Goal Interactive Walkthroughs using Multiple GPUs Dinesh Manocha University of North Carolina- Chapel Hill http://www.cs.unc.edu/~walk SIGGRAPH COURSE #11, 2003 Interactive Walkthrough of complex 3D environments

More information

3D Graphics and OpenGl. First Steps

3D Graphics and OpenGl. First Steps 3D Graphics and OpenGl First Steps Rendering of 3D Graphics Objects defined in (virtual/mathematical) 3D space. Rendering of 3D Graphics Objects defined in (virtual/mathematical) 3D space. We see surfaces

More information

GeForce4. John Montrym Henry Moreton

GeForce4. John Montrym Henry Moreton GeForce4 John Montrym Henry Moreton 1 Architectural Drivers Programmability Parallelism Memory bandwidth 2 Recent History: GeForce 1&2 First integrated geometry engine & 4 pixels/clk Fixed-function transform,

More information

Graphics Processing Unit Architecture (GPU Arch)

Graphics Processing Unit Architecture (GPU Arch) Graphics Processing Unit Architecture (GPU Arch) With a focus on NVIDIA GeForce 6800 GPU 1 What is a GPU From Wikipedia : A specialized processor efficient at manipulating and displaying computer graphics

More information

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

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload) Lecture 2: Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload) Visual Computing Systems Analyzing a 3D Graphics Workload Where is most of the work done? Memory Vertex

More information

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL Today s Agenda Basic design of a graphics system Introduction to OpenGL Image Compositing Compositing one image over another is most common choice can think of each image drawn on a transparent plastic

More information

Technical Report. GLSL Pseudo-Instancing

Technical Report. GLSL Pseudo-Instancing Technical Report GLSL Pseudo-Instancing Abstract GLSL Pseudo-Instancing This whitepaper and corresponding SDK sample demonstrate a technique to speed up the rendering of instanced geometry with GLSL. The

More information

Could you make the XNA functions yourself?

Could you make the XNA functions yourself? 1 Could you make the XNA functions yourself? For the second and especially the third assignment, you need to globally understand what s going on inside the graphics hardware. You will write shaders, which

More information

8 Three-Dimensional Object Representations. Chapter 8. Three-Dimensional Object Representations. Department of Computer Science and Engineering 8-1

8 Three-Dimensional Object Representations. Chapter 8. Three-Dimensional Object Representations. Department of Computer Science and Engineering 8-1 Chapter 8 Three-Dimensional Object Representations 8-1 8.1 Overview The main goal of three-dimensional computer graphics is to generate two-dimensional images of a scene or of an object based on a a description

More information

Sign up for crits! Announcments

Sign up for crits! Announcments Sign up for crits! Announcments Reading for Next Week FvD 16.1-16.3 local lighting models GL 5 lighting GL 9 (skim) texture mapping Modern Game Techniques CS248 Lecture Nov 13 Andrew Adams Overview The

More information

GeForce3 OpenGL Performance. John Spitzer

GeForce3 OpenGL Performance. John Spitzer GeForce3 OpenGL Performance John Spitzer GeForce3 OpenGL Performance John Spitzer Manager, OpenGL Applications Engineering jspitzer@nvidia.com Possible Performance Bottlenecks They mirror the OpenGL pipeline

More information

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

Mobile Performance Tools and GPU Performance Tuning. Lars M. Bishop, NVIDIA Handheld DevTech Jason Allen, NVIDIA Handheld DevTools Mobile Performance Tools and GPU Performance Tuning Lars M. Bishop, NVIDIA Handheld DevTech Jason Allen, NVIDIA Handheld DevTools NVIDIA GoForce5500 Overview World-class 3D HW Geometry pipeline 16/32bpp

More information

CS475/CS675 - Computer Graphics. OpenGL Drawing

CS475/CS675 - Computer Graphics. OpenGL Drawing CS475/CS675 - Computer Graphics OpenGL Drawing What is OpenGL? Open Graphics Library API to specify geometric objects in 2D/3D and to control how they are rendered into the framebuffer. A software interface

More information

CS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1

CS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1 CS 428: Fall 2010 Introduction to Computer Graphics OpenGL primer Andrew Nealen, Rutgers, 2010 9/13/2010 1 Graphics hardware Programmable {vertex, geometry, pixel} shaders Powerful GeForce 285 GTX GeForce480

More information

Optimizing for DirectX Graphics. Richard Huddy European Developer Relations Manager

Optimizing for DirectX Graphics. Richard Huddy European Developer Relations Manager Optimizing for DirectX Graphics Richard Huddy European Developer Relations Manager Also on today from ATI... Start & End Time: 12:00pm 1:00pm Title: Precomputed Radiance Transfer and Spherical Harmonic

More information

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

Lecture 9: Deferred Shading. Visual Computing Systems CMU , Fall 2013 Lecture 9: Deferred Shading Visual Computing Systems The course so far The real-time graphics pipeline abstraction Principle graphics abstractions Algorithms and modern high performance implementations

More information

4: Polygons and pixels

4: Polygons and pixels COMP711 Computer Graphics and Image Processing 4: Polygons and pixels Toby.Howard@manchester.ac.uk 1 Introduction We ll look at Properties of polygons: convexity, winding, faces, normals Scan conversion

More information

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

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz CS 563 Advanced Topics in Computer Graphics QSplat by Matt Maziarz Outline Previous work in area Background Overview In-depth look File structure Performance Future Point Rendering To save on setup and

More information

Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware

Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware paper by Kennet E. Hoff et al. (University of North Carolina at Chapel Hill) presented by Daniel Emmenegger GDV-Seminar ETH Zürich,

More information

GPU Memory Model. Adapted from:

GPU Memory Model. Adapted from: GPU Memory Model Adapted from: Aaron Lefohn University of California, Davis With updates from slides by Suresh Venkatasubramanian, University of Pennsylvania Updates performed by Gary J. Katz, University

More information

Computer Graphics. Prof. Feng Liu. Fall /14/2016

Computer Graphics. Prof. Feng Liu. Fall /14/2016 Computer Graphics Prof. Feng Liu Fall 2016 http://www.cs.pdx.edu/~fliu/courses/cs447/ 11/14/2016 Last time Texture Mapping 2 Mid-term 3 Today Mesh and Modeling 4 The Story So Far We ve looked at images

More information

ICS RESEARCH TECHNICAL TALK DRAKE TETREAULT, ICS H197 FALL 2013

ICS RESEARCH TECHNICAL TALK DRAKE TETREAULT, ICS H197 FALL 2013 ICS RESEARCH TECHNICAL TALK DRAKE TETREAULT, ICS H197 FALL 2013 TOPIC: RESEARCH PAPER Title: Data Management for SSDs for Large-Scale Interactive Graphics Applications Authors: M. Gopi, Behzad Sajadi,

More information

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager Optimizing DirectX Graphics Richard Huddy European Developer Relations Manager Some early observations Bear in mind that graphics performance problems are both commoner and rarer than you d think The most

More information

Current Trends in Computer Graphics Hardware

Current Trends in Computer Graphics Hardware Current Trends in Computer Graphics Hardware Dirk Reiners University of Louisiana Lafayette, LA Quick Introduction Assistant Professor in Computer Science at University of Louisiana, Lafayette (since 2006)

More information

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

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 2 due tomorrow at 2pm Grading window

More information

Drawing Fast The Graphics Pipeline

Drawing Fast The Graphics Pipeline Drawing Fast The Graphics Pipeline CS559 Spring 2016 Lecture 10 February 25, 2016 1. Put a 3D primitive in the World Modeling Get triangles 2. Figure out what color it should be Do ligh/ng 3. Position

More information

DiFi: Distance Fields - Fast Computation Using Graphics Hardware

DiFi: Distance Fields - Fast Computation Using Graphics Hardware DiFi: Distance Fields - Fast Computation Using Graphics Hardware Avneesh Sud Dinesh Manocha UNC-Chapel Hill http://gamma.cs.unc.edu/difi Distance Fields Distance Function For a site a scalar function f:r

More information

Geometry Compression. By Michael Deering. Presented By Jacob Taylor

Geometry Compression. By Michael Deering. Presented By Jacob Taylor Geometry Compression By Michael Deering Presented By Jacob Taylor Why compress geometry? The main bottleneck in current (circa 95) graphics accelerators is input bandwidth and transmitting compressed geometry

More information

Performance OpenGL Programming (for whatever reason)

Performance OpenGL Programming (for whatever reason) Performance OpenGL Programming (for whatever reason) Mike Bailey Oregon State University Performance Bottlenecks In general there are four places a graphics system can become bottlenecked: 1. The computer

More information

GPU Programming EE Midterm Examination

GPU Programming EE Midterm Examination Name Solution GPU Programming EE 4702- Midterm Examination Wednesday, 2 November 204 9:30 0:20 CST Alias Phylæ has landed! Problem Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Exam Total (8 pts) (2

More information

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

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing EECE 478 Rasterization & Scenes Rasterization Learning Objectives Be able to describe the complete graphics pipeline. Describe the process of rasterization for triangles and lines. Compositing Manipulate

More information

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #2 due this Friday, October

More information

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

RSX Best Practices. Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog RSX Best Practices Mark Cerny, Cerny Games David Simpson, Naughty Dog Jon Olick, Naughty Dog RSX Best Practices About libgcm Using the SPUs with the RSX Brief overview of GCM Replay December 7 th, 2004

More information

Coding OpenGL ES 3.0 for Better Graphics Quality

Coding OpenGL ES 3.0 for Better Graphics Quality Coding OpenGL ES 3.0 for Better Graphics Quality Part 2 Hugo Osornio Rick Tewell A P R 1 1 t h 2 0 1 4 TM External Use Agenda Exercise 1: Array Structure vs Vertex Buffer Objects vs Vertex Array Objects

More information

Scalar Field Visualization I

Scalar Field Visualization I Scalar Field Visualization I What is a Scalar Field? The approximation of certain scalar function in space f(x,y,z). Image source: blimpyb.com f What is a Scalar Field? The approximation of certain scalar

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

More information

Mattan Erez. The University of Texas at Austin

Mattan Erez. The University of Texas at Austin EE382V: Principles in Computer Architecture Parallelism and Locality Fall 2008 Lecture 10 The Graphics Processing Unit Mattan Erez The University of Texas at Austin Outline What is a GPU? Why should we

More information

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

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies How to Work on Next Gen Effects Now: Bridging DX10 and DX9 Guennadi Riguer ATI Technologies Overview New pipeline and new cool things Simulating some DX10 features in DX9 Experimental techniques Why This

More information

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) ME 290-R: General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) Sara McMains Spring 2009 Performance: Bottlenecks Sources of bottlenecks CPU Transfer Processing Rasterizer

More information

Drawing Fast The Graphics Pipeline

Drawing Fast The Graphics Pipeline Drawing Fast The Graphics Pipeline CS559 Fall 2015 Lecture 9 October 1, 2015 What I was going to say last time How are the ideas we ve learned about implemented in hardware so they are fast. Important:

More information

White Paper. Solid Wireframe. February 2007 WP _v01

White Paper. Solid Wireframe. February 2007 WP _v01 White Paper Solid Wireframe February 2007 WP-03014-001_v01 White Paper Document Change History Version Date Responsible Reason for Change _v01 SG, TS Initial release Go to sdkfeedback@nvidia.com to provide

More information

Shader Programming 1. Examples. Vertex displacement mapping. Daniel Wesslén 1. Post-processing, animated procedural textures

Shader Programming 1. Examples. Vertex displacement mapping. Daniel Wesslén 1. Post-processing, animated procedural textures Shader Programming 1 Examples Daniel Wesslén, dwn@hig.se Per-pixel lighting Texture convolution filtering Post-processing, animated procedural textures Vertex displacement mapping Daniel Wesslén 1 Fragment

More information

CS451Real-time Rendering Pipeline

CS451Real-time Rendering Pipeline 1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does

More information

2D Drawing Primitives

2D Drawing Primitives THE SIERPINSKI GASKET We use as a sample problem the drawing of the Sierpinski gasket an interesting shape that has a long history and is of interest in areas such as fractal geometry. The Sierpinski gasket

More information

The Rasterization Pipeline

The Rasterization Pipeline Lecture 5: The Rasterization Pipeline (and its implementation on GPUs) Computer Graphics CMU 15-462/15-662, Fall 2015 What you know how to do (at this point in the course) y y z x (w, h) z x Position objects

More information

3/1/2010. Acceleration Techniques V1.2. Goals. Overview. Based on slides from Celine Loscos (v1.0)

3/1/2010. Acceleration Techniques V1.2. Goals. Overview. Based on slides from Celine Loscos (v1.0) Acceleration Techniques V1.2 Anthony Steed Based on slides from Celine Loscos (v1.0) Goals Although processor can now deal with many polygons (millions), the size of the models for application keeps on

More information

Efficient and Scalable Shading for Many Lights

Efficient and Scalable Shading for Many Lights Efficient and Scalable Shading for Many Lights 1. GPU Overview 2. Shading recap 3. Forward Shading 4. Deferred Shading 5. Tiled Deferred Shading 6. And more! First GPU Shaders Unified Shaders CUDA OpenCL

More information

The Graphics Pipeline

The Graphics Pipeline The Graphics Pipeline Ray Tracing: Why Slow? Basic ray tracing: 1 ray/pixel Ray Tracing: Why Slow? Basic ray tracing: 1 ray/pixel But you really want shadows, reflections, global illumination, antialiasing

More information

Introductory Seminar

Introductory Seminar EDAF80 Introduction to Computer Graphics Introductory Seminar OpenGL & C++ Michael Doggett 2017 C++ slides by Carl Johan Gribel, 2010-13 Today Lab info OpenGL C(++)rash course Labs overview 5 mandatory

More information

Cache-Oblivious Mesh Layouts

Cache-Oblivious Mesh Layouts Cache-Oblivious Mesh Layouts Sung-Eui Yoon 1 Peter Lindstrom 2 Valerio Pascucci 2 Dinesh Manocha 1 1 University of North Carolina at Chapel Hill 2 Lawrence Livermore National Laboratory http://gamma.cs.unc.edu/col

More information

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1 Markus Hadwiger, KAUST Reading Assignment #2 (until Feb. 17) Read (required): GLSL book, chapter 4 (The OpenGL Programmable

More information

Today s Agenda. DirectX 9 Features Sim Dietrich, nvidia - Multisample antialising Jason Mitchell, ATI - Shader models and coding tips

Today s Agenda. DirectX 9 Features Sim Dietrich, nvidia - Multisample antialising Jason Mitchell, ATI - Shader models and coding tips Today s Agenda DirectX 9 Features Sim Dietrich, nvidia - Multisample antialising Jason Mitchell, ATI - Shader models and coding tips Optimization for DirectX 9 Graphics Mike Burrows, Microsoft - Performance

More information

Meshing and Geometry

Meshing and Geometry Meshing and Geometry Points in OpenGL glbegin(gl_points); glvertex2fv(p0); glvertex2fv(p1); p7 p0 p1 glvertex2fv(p2); glvertex2fv(p3); p6 p2 glvertex2fv(p4); glvertex2fv(p5); p5 p3 glvertex2fv(p6); glvertex2fv(p7);

More information

GPU Programming EE Final Examination

GPU Programming EE Final Examination Name GPU Programming EE 4702-1 Final Examination Tuesday, 5 December 2017 12:30 14:30 CST Alias Problem 1 Problem 2 Problem 3 Problem 4 Exam Total (15 pts) (20 pts) (30 pts) (35 pts) (100 pts) Good Luck!

More information