Physics Parallelization. Erwin Coumans SCEA

Size: px
Start display at page:

Download "Physics Parallelization. Erwin Coumans SCEA"

Transcription

1 Physics Parallelization A B C Erwin Coumans SCEA

2 Takeaway Multi-threading the physics pipeline collision detection and constraint solver Refactoring algorithms and data for SPUs Maintain unified multi-platform codebase SPU task maps well to multi-core thread

3 Parallelism and SPUs Both data and code needs to fit in 256kb DMA transfer to upload code and data Similar to GPU shader and texture upload Hide latency using double buffering Upload next batch while processing current Patterns for Parallel Programming [TM2005]

4 Broadphase N-Body Find potential overlapping pairs O (n2) number of pairs in theory But O (n) in practice

5 Broadphase Methods Uniform Grid Octree, BSP tree Spatial Hashing Multi-resolution Sweep and Prune Incremental Full sort (radix/quicksort)

6 Uniform Grid Can be parallelized on GPU What cell size to use?

7 Voxelize objects Performance versus Precision

8 Sweep and Prune (SAP) Incremental version has data dependencies Sometimes, the best serial algorithm has poor parallel scalability [Intel07]

9 Parallel sorted SAP Array-based sorting [CE2005] Split each axis array into segments Sort segments in parallel and merge Traverse array to find all overlapping pairs

10 Parallel sorted SAP Need method to check overlap on other axis Perform full AABB check Compare array-indices instead of begin/endpoint values

11 Pair management Broadphase either: 1) Rebuild all pairs from scratch 2) Incrementally add/remove pairs

12 Adding/removing pairs 1) Use hash map to find existing pairs 2) Index into uniform grid (GPU) 3) Avoid random access find

13 Sort and cull pairs sort check overlap, remove duplicates next frame: sort 0 Perform AABB overlap check during traversal Mark non-overlapping pairs zero Look forward for duplicates

14 Pairwise Collision Dispatch Collision pairs are independent: embarrassingly parallel More culling needed for complex objects: AABB trees Output: contact points

15 Load balancing collision detection Broadphase is producer, mid/narrowphase multiple consumers Evenly distribute work, avoid synchronization Consume pairs while they are produced

16 Exceptions Deal with user callbacks Collision filter callback (needs collision yes/no?) Serial fallback for unhandled cases (PPU)

17 Concave Shapes: AABB trees Make big tree fit cache/spu Avoid random access due to recursion Output can go to narrow phase collision detector

18 Tree to array mapping Streaming large trees in parts Stackless traversal [EG2007]

19 Recursive versus Stackless void recursetree(node* node, Aabb* aabb) { if (testoverlap(node,aabb)) { if (isleafnode(node)) donarrowphase(node); else { recursetree (node->leftchildnode); recursetree (node->rightchildnode); } } } void iteratetree(node* node, Aabb* aabb) { int curindex=0; while (curindex < endnodeindex) { aabboverlap = testoverlap(node,aabb); if (aabboverlap ) { if (isleafnode(node)) donarrowphase(node); } if (aabboverlap isleafnode(node)) node++; curindex++; else { node += node->escapeindex; curindex += node->escapeindex; } } } }

20 Narrowphase collision algorithms Code size can become an issue for SPUs Can load/unload code using overlays or SPU Shaders [MA2008] Or use compact general purpose algorithms

21 Convex: GJK and EPA

22 GJK and EPA on SPUs See Gino van den Bergen s book [Ber2003] Virtual methods like getsupportingvertex Refactor into switch statement EPA polytope expansion can exceed memory Use PPU fallback or other solution like SAT or Minkowski sampling

23 Contact Point Allocation Incremental or from scratch each frame Memory pre/de/re/allocation can be a big deal We preallocate fixed-size cache (4 points) for each pair

24 SPU & Contact Point Caching Contact cache is input and output Find/update existing points Perform contact reduction (to 4 points) on SPU

25 Solver parallelization Constraint solving methods using large matrices won t fit Use iterative methods [Catto2005] Sequental Impulse or Projected Gauss Seidel Constraints share rigidbodies: not embarrassingly parallel

26 Each island in parallel Works well, islands are independent Doesn t parallelize large islands, load imbalance Overhead for small, single body islands

27 Grouping based on spatial hash 1D Array of Cells (N=NUM_BUCKETS) getcellindex (x,y,z) N1 Calculate cell dependency table Process cells in parallel, using table to avoid conflicts

28 Spatial hash function //compute hash bucket index in [0,NUM_BUCKETS-1] int32 getcellindex (int32 cellpos_x,int32 cellpos_y, int32 cellpos_z) { const int32 h1 = 0x8da6b343; //Large primes const int32 h2 = 0xd ; const int32 h3 = 0xcb1ab31f; int32 n = h1*cellpos_x + h2*cellpos_y + h3*cellpos_z; n = n%num_buckets; if (n<0) n+=num_buckets; return n; } //Example from Christer Ericson s book Real-time collision detection.

29 Reordering constraints [Intel07] C c3 c2 A B c1 c1 c2 C c2 c3 D B c1 D c4 c3 c4 c4 A c1 c1 c3 c3 c4 c2 c2 c4

30 Insomniac vs Bullet SPU Physics SPU physics pipeline comparison presentation is available online from Insomniac Tech website [IN2008]

31 References [Intel07] High-Performance Physical Simulations on Next-Generation Architecture with Many Cores, August 2007, Intel Technology Journal, com/technology/itj/2007/v11i3/8-simulations/1-abstract.htm [EG2007] Stackless KD-Tree Traversal for High Performance GPU Ray Tracing, Proceeding of Eurographics, [MA2008] SPU Shaders, Mike Acton, Insomniac Games, Game Developers Conference 2008, com/tech [Catto2005] Erin Catto, [IN2008] Insomniac and SCEA talk SPU Physics, insomniacgames.com/tech/articles/0108/insom_and_scea_talk_spu_physics.php

32 Books [TM2005] Patterns for Parallel Programming, Timothy Mattson et.al. Addison Wesley [CE2005] Real-time Collision Detection, Christer Ericson, Morgan Kaufmann, page 336 [Ber2003] Collision detection in interactive 3D environments, Gino van den Bergen, Morgan Kaufmann [PBA2005] Physics Based Animation, Kenny Erleben et. al. Charles River Media, page 613

33 Bullet physics library An open source 3D physics engine Written in C++ Parallelized for SPU and other architectures Check out SCEA booth #5905 at GDC Expo SPU optimized Game Physics Licensed PlayStation 3 developers can request access to SPURS version

Anatomy of a Physics Engine. Erwin Coumans

Anatomy of a Physics Engine. Erwin Coumans Anatomy of a Physics Engine Erwin Coumans erwin_coumans@playstation.sony.com How it fits together» Terminology» Rigid Body Dynamics» Collision Detection» Software Design Decisions» Trip through the Physics

More information

A Different Approach for Continuous Physics. Vincent ROBERT Physics Programmer at Ubisoft

A Different Approach for Continuous Physics. Vincent ROBERT Physics Programmer at Ubisoft A Different Approach for Continuous Physics Vincent ROBERT vincent.robert@ubisoft.com Physics Programmer at Ubisoft A Different Approach for Continuous Physics Existing approaches Our method Limitations

More information

Continuous Collision Detection and Physics

Continuous Collision Detection and Physics Continuous Collision Detection and Physics Erwin Coumans, Sony Computer Entertainment August 2005, Draft revision 5 0 Overview A novel approach to Angular and Linear Continuous Collision Detection is presented.

More information

Multi Agent Navigation on GPU. Avi Bleiweiss

Multi Agent Navigation on GPU. Avi Bleiweiss Multi Agent Navigation on GPU Avi Bleiweiss Reasoning Explicit Implicit Script, storytelling State machine, serial Compute intensive Fits SIMT architecture well Navigation planning Collision avoidance

More information

What is a Rigid Body?

What is a Rigid Body? Physics on the GPU What is a Rigid Body? A rigid body is a non-deformable object that is a idealized solid Each rigid body is defined in space by its center of mass To make things simpler we assume the

More information

Lecture 16. Introduction to Game Development IAP 2007 MIT

Lecture 16. Introduction to Game Development IAP 2007 MIT 6.189 IAP 2007 Lecture 16 Introduction to Game Development Mike Acton, Insomiac Games. 6.189 IAP 2007 MIT Introduction to Game Development (on the Playstation 3 / Cell ) Mike Acton Engine Director, Insomniac

More information

GAME PROGRAMMING ON HYBRID CPU-GPU ARCHITECTURES TAKAHIRO HARADA, AMD DESTRUCTION FOR GAMES ERWIN COUMANS, AMD

GAME PROGRAMMING ON HYBRID CPU-GPU ARCHITECTURES TAKAHIRO HARADA, AMD DESTRUCTION FOR GAMES ERWIN COUMANS, AMD GAME PROGRAMMING ON HYBRID CPU-GPU ARCHITECTURES TAKAHIRO HARADA, AMD DESTRUCTION FOR GAMES ERWIN COUMANS, AMD GAME PROGRAMMING ON HYBRID CPU-GPU ARCHITECTURES Jason Yang, Takahiro Harada AMD HYBRID CPU-GPU

More information

Spatial Data Structures

Spatial Data Structures CSCI 420 Computer Graphics Lecture 17 Spatial Data Structures Jernej Barbic University of Southern California Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees [Angel Ch. 8] 1 Ray Tracing Acceleration

More information

Real-Time Physics Simulation. Alan Hazelden.

Real-Time Physics Simulation. Alan Hazelden. Real-Time Physics Simulation Alan Hazelden alan@draknek.org http://www.draknek.org/ Who am I? Studied Computer Science 2005-2009 Warwick Game Design exec member 3rd and 4th year projects: physics engines

More information

Spatial Data Structures

Spatial Data Structures CSCI 480 Computer Graphics Lecture 7 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids BSP Trees [Ch. 0.] March 8, 0 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s/

More information

Intersection Acceleration

Intersection Acceleration Advanced Computer Graphics Intersection Acceleration Matthias Teschner Computer Science Department University of Freiburg Outline introduction bounding volume hierarchies uniform grids kd-trees octrees

More information

Scalable Multi Agent Simulation on the GPU. Avi Bleiweiss NVIDIA Corporation San Jose, 2009

Scalable Multi Agent Simulation on the GPU. Avi Bleiweiss NVIDIA Corporation San Jose, 2009 Scalable Multi Agent Simulation on the GPU Avi Bleiweiss NVIDIA Corporation San Jose, 2009 Reasoning Explicit State machine, serial Implicit Compute intensive Fits SIMT well Collision avoidance Motivation

More information

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday Announcements Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday 1 Spatial Data Structures Hierarchical Bounding Volumes Grids Octrees BSP Trees 11/7/02 Speeding Up Computations

More information

Developing Technology for Ratchet and Clank Future: Tools of Destruction

Developing Technology for Ratchet and Clank Future: Tools of Destruction Developing Technology for Ratchet and Clank Future: Tools of Destruction Mike Acton, Engine Director with Eric Christensen, Principal Programmer Sideline:

More information

Collision and Proximity Queries

Collision and Proximity Queries Collision and Proximity Queries Dinesh Manocha (based on slides from Ming Lin) COMP790-058 Fall 2013 Geometric Proximity Queries l Given two object, how would you check: If they intersect with each other

More information

SPU Shaders. Mike Acton Engine Director Insomniac Games

SPU Shaders. Mike Acton Engine Director Insomniac Games SPU Shaders Mike Acton Engine Director Insomniac Games State of Affairs Engine Systems on SPUs SPU Optimization Understood Remaining Systems Planned Out Still Have SPU Time to Spare PPU Still Driving The

More information

SPU Render. Arseny Zeux Kapoulkine CREAT Studios

SPU Render. Arseny Zeux Kapoulkine CREAT Studios SPU Render Arseny Zeux Kapoulkine CREAT Studios arseny.kapoulkine@gmail.com http://zeuxcg.org/ Introduction Smash Cars 2 project Static scene of moderate size Many dynamic objects Multiple render passes

More information

Insomniac Physics. Eric Christensen GDC 2009

Insomniac Physics. Eric Christensen GDC 2009 Insomniac hysics Eric Christensen GDC 2009 Overview Go over the evolution of IG physics system Shaders Library Shaders Custom event shaders Original Design Resistance: Fall of Man orted From C to S3 U

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie

More information

Rigid Body Simulation. Jeremy Ulrich Advised by David Mount Fall 2013

Rigid Body Simulation. Jeremy Ulrich Advised by David Mount Fall 2013 Rigid Body Simulation Jeremy Ulrich Advised by David Mount Fall 2013 Overview The project presented here is a real-time 3D rigid body physics engine, and is the result of an Independent Study on collision

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) March 28, 2002 [Angel 8.9] Frank Pfenning Carnegie

More information

Collision Detection based on Spatial Partitioning

Collision Detection based on Spatial Partitioning Simulation in Computer Graphics Collision Detection based on Spatial Partitioning Matthias Teschner Computer Science Department University of Freiburg Outline introduction uniform grid Octree and k-d tree

More information

Ray Tracing. Computer Graphics CMU /15-662, Fall 2016

Ray Tracing. Computer Graphics CMU /15-662, Fall 2016 Ray Tracing Computer Graphics CMU 15-462/15-662, Fall 2016 Primitive-partitioning vs. space-partitioning acceleration structures Primitive partitioning (bounding volume hierarchy): partitions node s primitives

More information

CPSC / Sonny Chan - University of Calgary. Collision Detection II

CPSC / Sonny Chan - University of Calgary. Collision Detection II CPSC 599.86 / 601.86 Sonny Chan - University of Calgary Collision Detection II Outline Broad phase collision detection: - Problem definition and motivation - Bounding volume hierarchies - Spatial partitioning

More information

Web Physics: A Hardware Accelerated Physics Engine for Web- Based Applications

Web Physics: A Hardware Accelerated Physics Engine for Web- Based Applications Web Physics: A Hardware Accelerated Physics Engine for Web- Based Applications Tasneem Brutch, Bo Li, Guodong Rong, Yi Shen, Chang Shu Samsung Research America-Silicon Valley {t.brutch, robert.li, g.rong,

More information

Spatial Data Structures

Spatial Data Structures Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) [Angel 9.10] Outline Ray tracing review what rays matter? Ray tracing speedup faster

More information

Comparing Memory Systems for Chip Multiprocessors

Comparing Memory Systems for Chip Multiprocessors Comparing Memory Systems for Chip Multiprocessors Jacob Leverich Hideho Arakida, Alex Solomatnikov, Amin Firoozshahian, Mark Horowitz, Christos Kozyrakis Computer Systems Laboratory Stanford University

More information

Introduction to Parallel Programming Models

Introduction to Parallel Programming Models Introduction to Parallel Programming Models Tim Foley Stanford University Beyond Programmable Shading 1 Overview Introduce three kinds of parallelism Used in visual computing Targeting throughput architectures

More information

Dynamic Fine Grain Scheduling of Pipeline Parallelism. Presented by: Ram Manohar Oruganti and Michael TeWinkle

Dynamic Fine Grain Scheduling of Pipeline Parallelism. Presented by: Ram Manohar Oruganti and Michael TeWinkle Dynamic Fine Grain Scheduling of Pipeline Parallelism Presented by: Ram Manohar Oruganti and Michael TeWinkle Overview Introduction Motivation Scheduling Approaches GRAMPS scheduling method Evaluation

More information

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li Parallel Physically Based Path-tracing and Shading Part 3 of 2 CIS565 Fall 202 University of Pennsylvania by Yining Karl Li Jim Scott 2009 Spatial cceleration Structures: KD-Trees *Some portions of these

More information

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Simulation in Computer Graphics Space Subdivision. Matthias Teschner Simulation in Computer Graphics Space Subdivision Matthias Teschner Outline Introduction Uniform grid Octree and k-d tree BSP tree University of Freiburg Computer Science Department 2 Model Partitioning

More information

Dynamic Bounding Volume Hierarchies. Erin Catto, Blizzard Entertainment

Dynamic Bounding Volume Hierarchies. Erin Catto, Blizzard Entertainment Dynamic Bounding Volume Hierarchies Erin Catto, Blizzard Entertainment 1 This is one of my favorite Overwatch maps: BlizzardWorld. This is the spawn area inside the Hearthstone Tavern. 2 All the objects

More information

Ray Intersection Acceleration

Ray Intersection Acceleration Ray Intersection Acceleration CMPT 461/761 Image Synthesis Torsten Möller Reading Chapter 2, 3, 4 of Physically Based Rendering by Pharr&Humphreys An Introduction to Ray tracing by Glassner Topics today

More information

Acceleration Data Structures

Acceleration Data Structures CT4510: Computer Graphics Acceleration Data Structures BOCHANG MOON Ray Tracing Procedure for Ray Tracing: For each pixel Generate a primary ray (with depth 0) While (depth < d) { Find the closest intersection

More information

About Phoenix FD PLUGIN FOR 3DS MAX AND MAYA. SIMULATING AND RENDERING BOTH LIQUIDS AND FIRE/SMOKE. USED IN MOVIES, GAMES AND COMMERCIALS.

About Phoenix FD PLUGIN FOR 3DS MAX AND MAYA. SIMULATING AND RENDERING BOTH LIQUIDS AND FIRE/SMOKE. USED IN MOVIES, GAMES AND COMMERCIALS. About Phoenix FD PLUGIN FOR 3DS MAX AND MAYA. SIMULATING AND RENDERING BOTH LIQUIDS AND FIRE/SMOKE. USED IN MOVIES, GAMES AND COMMERCIALS. Phoenix FD core SIMULATION & RENDERING. SIMULATION CORE - GRID-BASED

More information

Computer Graphics. - Spatial Index Structures - Philipp Slusallek

Computer Graphics. - Spatial Index Structures - Philipp Slusallek Computer Graphics - Spatial Index Structures - Philipp Slusallek Overview Last lecture Overview of ray tracing Ray-primitive intersections Today Acceleration structures Bounding Volume Hierarchies (BVH)

More information

Accelerating Ray Tracing

Accelerating Ray Tracing Accelerating Ray Tracing Ray Tracing Acceleration Techniques Faster Intersections Fewer Rays Generalized Rays Faster Ray-Object Intersections Object bounding volumes Efficient intersection routines Fewer

More information

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

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development Chap. 5 Scene Management Overview Scene Management vs Rendering This chapter is about rendering

More information

Collision Detection. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

Collision Detection. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill Collision Detection These slides are mainly from Ming Lin s course notes at UNC Chapel Hill http://www.cs.unc.edu/~lin/comp259-s06/ Computer Animation ILE5030 Computer Animation and Special Effects 2 Haptic

More information

high performance medical reconstruction using stream programming paradigms

high performance medical reconstruction using stream programming paradigms high performance medical reconstruction using stream programming paradigms This Paper describes the implementation and results of CT reconstruction using Filtered Back Projection on various stream programming

More information

Collision Detection with Bounding Volume Hierarchies

Collision Detection with Bounding Volume Hierarchies Simulation in Computer Graphics Collision Detection with Bounding Volume Hierarchies Matthias Teschner Computer Science Department University of Freiburg Outline introduction bounding volumes BV hierarchies

More information

igmobybspheres jonathan garrett 3/7/08

igmobybspheres jonathan garrett 3/7/08 igmobybspheres jonathan garrett 3/7/08 introduction mobys have a bounding-sphere (bsphere) rough approximation to the extents of the character moves with the character approximation used as a faster alternative

More information

On the data structures and algorithms for contact detection in granular media (DEM) V. Ogarko, May 2010, P2C course

On the data structures and algorithms for contact detection in granular media (DEM) V. Ogarko, May 2010, P2C course On the data structures and algorithms for contact detection in granular media (DEM) V. Ogarko, May 2010, P2C course Discrete element method (DEM) Single particle Challenges: -performance O(N) (with low

More information

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y. COMP 4801 Final Year Project Ray Tracing for Computer Graphics Final Project Report FYP 15014 by Runjing Liu Advised by Dr. L.Y. Wei 1 Abstract The goal of this project was to use ray tracing in a rendering

More information

Wed, October 12, 2011

Wed, October 12, 2011 Practical Occlusion Culling in Killzone 3 Michal Valient Lead Tech, Guerrilla B.V. Talk takeaway Occlusion culling system used in Killzone 3 The reasons why to use software rasterization (Some) technical

More information

Stream Processing with CUDA TM A Case Study Using Gamebryo's Floodgate Technology

Stream Processing with CUDA TM A Case Study Using Gamebryo's Floodgate Technology Stream Processing with CUDA TM A Case Study Using Gamebryo's Floodgate Technology Dan Amerson, Technical Director, Emergent Game Technologies Purpose Why am I giving this talk? To answer this question:

More information

3D ADI Method for Fluid Simulation on Multiple GPUs. Nikolai Sakharnykh, NVIDIA Nikolay Markovskiy, NVIDIA

3D ADI Method for Fluid Simulation on Multiple GPUs. Nikolai Sakharnykh, NVIDIA Nikolay Markovskiy, NVIDIA 3D ADI Method for Fluid Simulation on Multiple GPUs Nikolai Sakharnykh, NVIDIA Nikolay Markovskiy, NVIDIA Introduction Fluid simulation using direct numerical methods Gives the most accurate result Requires

More information

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11. Chapter 11 Global Illumination Part 1 Ray Tracing Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.3 CG(U), Chap.11 Part 1:Ray Tracing 1 Can pipeline graphics renders images

More information

Collision detection. Piotr Fulma«ski. 1 grudnia

Collision detection. Piotr Fulma«ski. 1 grudnia Collision detection Piotr Fulma«ski piotr@fulmanski.pl 1 grudnia 2016 Table of contents Collision in games Algorithms to detect collision in games depend on the type of shapes that can collide (e.g. rectangle

More information

Real Time Ray Tracing

Real Time Ray Tracing Real Time Ray Tracing Programação 3D para Simulação de Jogos Vasco Costa Ray tracing? Why? How? P3DSJ Real Time Ray Tracing Vasco Costa 2 Real time ray tracing : example Source: NVIDIA P3DSJ Real Time

More information

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration Speeding Up Ray Tracing nthony Steed 1999, eline Loscos 2005, Jan Kautz 2007-2009 Optimisations Limit the number of rays Make the ray test faster for shadow rays the main drain on resources if there are

More information

Using Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects

Using Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects Part 7: Collision Detection Virtuelle Realität Wintersemester 2007/08 Prof. Bernhard Jung Overview Bounding Volumes Separating Axis Theorem Using Bounding Volume Hierarchies Efficient Collision Detection

More information

Collision detection. Piotr Fulma«ski. 19 pa¹dziernika Wydziaª Matematyki i Informatyki, Uniwersytet Šódzki, Polska

Collision detection. Piotr Fulma«ski. 19 pa¹dziernika Wydziaª Matematyki i Informatyki, Uniwersytet Šódzki, Polska Collision detection Piotr Fulma«ski Wydziaª Matematyki i Informatyki, Uniwersytet Šódzki, Polska 19 pa¹dziernika 2015 Table of contents Collision in games Algorithms to detect collision in games depend

More information

Collision Detection. Motivation - Dynamic Simulation ETH Zurich. Motivation - Path Planning ETH Zurich. Motivation - Biomedical Simulation ETH Zurich

Collision Detection. Motivation - Dynamic Simulation ETH Zurich. Motivation - Path Planning ETH Zurich. Motivation - Biomedical Simulation ETH Zurich Collision Detection Motivation - Dynamic Simulation Collision detection is an essential part of physically realistic dynamic simulations. For each time step: compute dynamics detect collisions resolve

More information

Cell Based Servers for Next-Gen Games

Cell Based Servers for Next-Gen Games Cell BE for Digital Animation and Visual F/X Cell Based Servers for Next-Gen Games Cell BE Online Game Prototype Bruce D Amora T.J. Watson Research Yorktown Heights, NY Karen Magerlein T.J. Watson Research

More information

improving raytracing speed

improving raytracing speed ray tracing II computer graphics ray tracing II 2006 fabio pellacini 1 improving raytracing speed computer graphics ray tracing II 2006 fabio pellacini 2 raytracing computational complexity ray-scene intersection

More information

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

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome! INFOGR Computer Graphics J. Bikker - April-July 2015 - Lecture 11: Acceleration Welcome! Today s Agenda: High-speed Ray Tracing Acceleration Structures The Bounding Volume Hierarchy BVH Construction BVH

More information

HARNESSING IRREGULAR PARALLELISM: A CASE STUDY ON UNSTRUCTURED MESHES. Cliff Woolley, NVIDIA

HARNESSING IRREGULAR PARALLELISM: A CASE STUDY ON UNSTRUCTURED MESHES. Cliff Woolley, NVIDIA HARNESSING IRREGULAR PARALLELISM: A CASE STUDY ON UNSTRUCTURED MESHES Cliff Woolley, NVIDIA PREFACE This talk presents a case study of extracting parallelism in the UMT2013 benchmark for 3D unstructured-mesh

More information

Production. Visual Effects. Fluids, RBD, Cloth. 2. Dynamics Simulation. 4. Compositing

Production. Visual Effects. Fluids, RBD, Cloth. 2. Dynamics Simulation. 4. Compositing Visual Effects Pr roduction on the Cell/BE Andrew Clinton, Side Effects Software Visual Effects Production 1. Animation Character, Keyframing 2. Dynamics Simulation Fluids, RBD, Cloth 3. Rendering Raytrac

More information

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp Next-Generation Graphics on Larrabee Tim Foley Intel Corp Motivation The killer app for GPGPU is graphics We ve seen Abstract models for parallel programming How those models map efficiently to Larrabee

More information

Parallel Programming for Graphics

Parallel Programming for Graphics Beyond Programmable Shading Course ACM SIGGRAPH 2010 Parallel Programming for Graphics Aaron Lefohn Advanced Rendering Technology (ART) Intel What s In This Talk? Overview of parallel programming models

More information

Ray Tracing Acceleration. CS 4620 Lecture 20

Ray Tracing Acceleration. CS 4620 Lecture 20 Ray Tracing Acceleration CS 4620 Lecture 20 2013 Steve Marschner 1 Will this be on the exam? or, Prelim 2 syllabus You can expect emphasis on topics related to the assignment (Shaders 1&2) and homework

More information

CS 311 Data Structures and Algorithms, Spring 2009 Midterm Exam Solutions. The Midterm Exam was given in class on Wednesday, March 18, 2009.

CS 311 Data Structures and Algorithms, Spring 2009 Midterm Exam Solutions. The Midterm Exam was given in class on Wednesday, March 18, 2009. CS 311 Data Structures and Algorithms, Spring 2009 Midterm Exam Solutions The Midterm Exam was given in class on Wednesday, March 18, 2009. 1. [4 pts] Parameter Passing in C++. In the table below, the

More information

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur Leonhard Grünschloß Martin Stich Sehera Nawaz Alexander Keller August 6, 2011 Principles of Accelerated Ray Tracing Hierarchical

More information

Chap. 5 Part 2. CIS*3090 Fall Fall 2016 CIS*3090 Parallel Programming 1

Chap. 5 Part 2. CIS*3090 Fall Fall 2016 CIS*3090 Parallel Programming 1 Chap. 5 Part 2 CIS*3090 Fall 2016 Fall 2016 CIS*3090 Parallel Programming 1 Static work allocation Where work distribution is predetermined, but based on what? Typical scheme Divide n size data into P

More information

Massive Model Visualization using Real-time Ray Tracing

Massive Model Visualization using Real-time Ray Tracing Massive Model Visualization using Real-time Ray Tracing Eurographics 2006 Tutorial: Real-time Interactive Massive Model Visualization Andreas Dietrich Philipp Slusallek Saarland University & intrace GmbH

More information

Patterns of Parallel Programming with.net 4. Ade Miller Microsoft patterns & practices

Patterns of Parallel Programming with.net 4. Ade Miller Microsoft patterns & practices Patterns of Parallel Programming with.net 4 Ade Miller (adem@microsoft.com) Microsoft patterns & practices Introduction Why you should care? Where to start? Patterns walkthrough Conclusions (and a quiz)

More information

Parallel Programming on Larrabee. Tim Foley Intel Corp

Parallel Programming on Larrabee. Tim Foley Intel Corp Parallel Programming on Larrabee Tim Foley Intel Corp Motivation This morning we talked about abstractions A mental model for GPU architectures Parallel programming models Particular tools and APIs This

More information

Geometry proxies (in 2D): a Convex Polygon

Geometry proxies (in 2D): a Convex Polygon Geometry proxies (in 2D): a Convex Polygon Intersection of half-planes each delimited by a line Stored as: Test: a collection of (oriented) lines a point is inside iff it is in each half-plane A very good

More information

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo Computer Graphics Bing-Yu Chen National Taiwan University The University of Tokyo Hidden-Surface Removal Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm

More information

B. Tech. Project Second Stage Report on

B. Tech. Project Second Stage Report on B. Tech. Project Second Stage Report on GPU Based Active Contours Submitted by Sumit Shekhar (05007028) Under the guidance of Prof Subhasis Chaudhuri Table of Contents 1. Introduction... 1 1.1 Graphic

More information

Efficient Tridiagonal Solvers for ADI methods and Fluid Simulation

Efficient Tridiagonal Solvers for ADI methods and Fluid Simulation Efficient Tridiagonal Solvers for ADI methods and Fluid Simulation Nikolai Sakharnykh - NVIDIA San Jose Convention Center, San Jose, CA September 21, 2010 Introduction Tridiagonal solvers very popular

More information

Lecture 6: Input Compaction and Further Studies

Lecture 6: Input Compaction and Further Studies PASI Summer School Advanced Algorithmic Techniques for GPUs Lecture 6: Input Compaction and Further Studies 1 Objective To learn the key techniques for compacting input data for reduced consumption of

More information

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016 Accelerating Geometric Queries Computer Graphics CMU 15-462/15-662, Fall 2016 Geometric modeling and geometric queries p What point on the mesh is closest to p? What point on the mesh is closest to p?

More information

Comparison of hierarchies for occlusion culling based on occlusion queries

Comparison of hierarchies for occlusion culling based on occlusion queries Comparison of hierarchies for occlusion culling based on occlusion queries V.I. Gonakhchyan pusheax@ispras.ru Ivannikov Institute for System Programming of the RAS, Moscow, Russia Efficient interactive

More information

Acceleration Data Structures. Michael Doggett Department of Computer Science Lund university

Acceleration Data Structures. Michael Doggett Department of Computer Science Lund university Acceleration Data Structures Michael Doggett Department of Computer Science Lund university Ray tracing So far ray tracing sampling object intersections Today How do we make it faster? Performance = rays

More information

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Anti-aliased and accelerated ray tracing University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell eading! equired:! Watt, sections 12.5.3 12.5.4, 14.7! Further reading:! A. Glassner.

More information

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Anti-aliased and accelerated ray tracing University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Reading Required: Watt, sections 12.5.3 12.5.4, 14.7 Further reading: A. Glassner.

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

Ray Tracing Performance

Ray Tracing Performance Ray Tracing Performance Zero to Millions in 45 Minutes Gordon Stoll, Intel Ray Tracing Performance Zero to Millions in 45 Minutes?! Gordon Stoll, Intel Goals for this talk Goals point you toward the current

More information

Overview. Collision detection. Collision detection. Brute force collision detection. Brute force collision detection. Motivation

Overview. Collision detection. Collision detection. Brute force collision detection. Brute force collision detection. Motivation Overview Collision detection Alan Liu aliu@simcen.usuhs.mil Surgical Simulation Laboratory National Capital Area Medical Simulation Center Uniformed Services University of the Health Sciences http://simcen.usuhs.mil/mmvr2002

More information

Convex Hull Generation with Quick Hull. Randy Gaul Special thanks to Stan Melax and Dirk Gregorius for contributions on this topic

Convex Hull Generation with Quick Hull. Randy Gaul Special thanks to Stan Melax and Dirk Gregorius for contributions on this topic Convex Hull Generation with Quick Hull Randy Gaul Special thanks to Stan Melax and Dirk Gregorius for contributions on this topic Overview Quick Hull (QHull) Convex Hulls Why use them Computing a Convex

More information

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial Data Structures and Speed-Up Techniques Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial data structures What is it? Data structure that organizes

More information

Lecture 15: Introduction to GPU programming. Lecture 15: Introduction to GPU programming p. 1

Lecture 15: Introduction to GPU programming. Lecture 15: Introduction to GPU programming p. 1 Lecture 15: Introduction to GPU programming Lecture 15: Introduction to GPU programming p. 1 Overview Hardware features of GPGPU Principles of GPU programming A good reference: David B. Kirk and Wen-mei

More information

Accelerated Raytracing

Accelerated Raytracing Accelerated Raytracing Why is Acceleration Important? Vanilla ray tracing is really slow! mxm pixels, kxk supersampling, n primitives, average ray path length of d, l lights, 2 recursive ray casts per

More information

Ray Tracing: Intersection

Ray Tracing: Intersection Computer Graphics as Virtual Photography Ray Tracing: Intersection Photography: real scene camera (captures light) photo processing Photographic print processing Computer Graphics: 3D models camera tone

More information

Bullet Cloth Simulation. Presented by: Justin Hensley Implemented by: Lee Howes

Bullet Cloth Simulation. Presented by: Justin Hensley Implemented by: Lee Howes Bullet Cloth Simulation Presented by: Justin Hensley Implemented by: Lee Howes Course Agenda OpenCL Review! OpenCL Development Tips! OpenGL/OpenCL Interoperability! Rigid body particle simulation!

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

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

Parallel Processing. Parallel Processing. 4 Optimization Techniques WS 2018/19

Parallel Processing. Parallel Processing. 4 Optimization Techniques WS 2018/19 Parallel Processing WS 2018/19 Universität Siegen rolanda.dwismuellera@duni-siegena.de Tel.: 0271/740-4050, Büro: H-B 8404 Stand: September 7, 2018 Betriebssysteme / verteilte Systeme Parallel Processing

More information

Warped parallel nearest neighbor searches using kd-trees

Warped parallel nearest neighbor searches using kd-trees Warped parallel nearest neighbor searches using kd-trees Roman Sokolov, Andrei Tchouprakov D4D Technologies Kd-trees Binary space partitioning tree Used for nearest-neighbor search, range search Application:

More information

On-the-fly Vertex Reuse for Massively-Parallel Software Geometry Processing

On-the-fly Vertex Reuse for Massively-Parallel Software Geometry Processing 2018 On-the-fly for Massively-Parallel Software Geometry Processing Bernhard Kerbl Wolfgang Tatzgern Elena Ivanchenko Dieter Schmalstieg Markus Steinberger 5 4 3 4 2 5 6 7 6 3 1 2 0 1 0, 0,1,7, 7,1,2,

More information

Sparse Fluid Simulation in DirectX. Alex Dunn Dev. Tech. NVIDIA

Sparse Fluid Simulation in DirectX. Alex Dunn Dev. Tech. NVIDIA Sparse Fluid Simulation in DirectX Alex Dunn Dev. Tech. NVIDIA adunn@nvidia.com Eulerian Simulation Grid based. Great for simulating gaseous fluid; smoke, flame, clouds. It just works-> Basic Algorithm

More information

SAH guided spatial split partitioning for fast BVH construction. Per Ganestam and Michael Doggett Lund University

SAH guided spatial split partitioning for fast BVH construction. Per Ganestam and Michael Doggett Lund University SAH guided spatial split partitioning for fast BVH construction Per Ganestam and Michael Doggett Lund University Opportunistic triangle splitting for higher quality BVHs Bounding Volume Hierarchies (BVH)

More information

Overview. Collision Detection. A Simple Collision Detection Algorithm. Collision Detection in a Dynamic Environment. Query Types.

Overview. Collision Detection. A Simple Collision Detection Algorithm. Collision Detection in a Dynamic Environment. Query Types. Overview Collision Detection Alan Liu aliu@usuhs.mil The Surgical Simulation Laboratory National Capital Area Medical Simulation Center Uniformed Services University http://simcen.usuhs.mil/miccai2003

More information

Data Organization and Processing

Data Organization and Processing Data Organization and Processing Spatial Join (NDBI007) David Hoksza http://siret.ms.mff.cuni.cz/hoksza Outline Spatial join basics Relational join Spatial join Spatial join definition (1) Given two sets

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

Architectures. Michael Doggett Department of Computer Science Lund University 2009 Tomas Akenine-Möller and Michael Doggett 1

Architectures. Michael Doggett Department of Computer Science Lund University 2009 Tomas Akenine-Möller and Michael Doggett 1 Architectures Michael Doggett Department of Computer Science Lund University 2009 Tomas Akenine-Möller and Michael Doggett 1 Overview of today s lecture The idea is to cover some of the existing 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 Today Finishing up from last time Brief discussion of graphics workload metrics

More information

Database Workload. from additional misses in this already memory-intensive databases? interference could be a problem) Key question:

Database Workload. from additional misses in this already memory-intensive databases? interference could be a problem) Key question: Database Workload + Low throughput (0.8 IPC on an 8-wide superscalar. 1/4 of SPEC) + Naturally threaded (and widely used) application - Already high cache miss rates on a single-threaded machine (destructive

More information