SlideShare a Scribd company logo
Embarrassingly
Parallel Computation
for Visibility
Jasin Bushnaief
Umbra Software
Who are we?
• The only occlusion culling middleware
  company in the world
• Founded in 2006
• Based in Helsinki
• 12 people
• Customers: Bungie (Halo), Guerrilla (Killzone),
  Remedy (Alan Wake), Bioware (Mass Effect),
  CD Projekt (Witcher), ArenaNet (Guild Wars)
  and many more
We’re going to talk about
• The past
  – Brief introduction to occlusion culling
  – Traditional methods of visibility computation
• The present
  – Umbra’s visibility computation algorithm
  – How it can be distributed
• The future
  – Challenges of modern games and engines
The Past:

SO, WHAT’S OCCLUSION CULLING
ANYWAY?
Graphics in games
• Game development process:
  – Artists create content
  – Engine runtime renders it
• Rendering
  – Content consists of objects
  – Which consist of triangles
  – Which get rendered by the GPU
• Our business: rendering optimization
Occlusion culling explained
• ”Culling is the process of removing breeding
  animals from a group based on specific criteria.”
  (Wikipedia)
• Hidden surface removal: ”Which surfaces do not
  contribute to the final rendered image on the
  screen?”
• Some popular HSR methods:
  – Frustum culling
  – Backface culling
  – Occlusion culling
Occlusion culling explained
• Occlusion culling: ”Which surfaces are blocked
  (occluded) by other surfaces?”
• Depth buffering is one way to do OC
  – Very accurate (i.e. pixel level)
  – Ubiquitous on hardware, easy problem to solve
  – Occurs very late in the pipeline
Occlusion culling explained
• Higher-level methods complement depth-
  buffering nicely
• These cull entire objects, groups of objects or
  entire sections of the scene
  – Not easy!
• The earlier, the better
Occlusion culling




Only the objects visible to
the camera are rendered
”Traditional” way to do OC
• Preprocess:
  – Divide scene into cells
  – Compute visibility between cells
     • Results in a visibility matrix (PVS)
• Runtime:
  – Locate the camera
  – Do a lookup into the PVS matrix
Simple example
Split scene into cells

 A            B


 C            D
Compute visibility (sampling)

     A            B
                             A B   C   D
                         A 1   1   1   0
                         B
                         C
                         D

     C            D
Compute visibility

A           B
                         A B     C   D
                     A 1     1   1   0
                     B   1   1   0   1
                     C
                     D

C           D
Compute visibility

A           B
                         A B     C   D
                     A 1     1   1   0
                     B   1   1   0   1
                     C   1   0   1   1
                     D

C           D
Compute visibility

A           B
                         A B     C   D
                     A 1     1   1   0
                     B   1   1   0   1
                     C   1   0   1   1
                     D 0     1   1   1

C           D
Runtime PVS culling

A           B
                          A B     C   D
                      A 1     1   1   0
                      B   1   1   0   1
                      C   1   0   1   1
                      D 0     1   1   1

C           D
Problem?
• Solving visibility between cells is very difficult
   – E.g. Solving analytically is actually O(n4)
• Global operation by nature
• Doesn’t play well with dynamic scenes
   – Worst case: a change in one cell requires
     recomputation of the entire matrix
The Present

UMBRA DOES IT BETTER
Welcome to the 2010s
• Modern game worlds are huge
• So it’d be cool if you didn’t need the entire
  scene in memory, ever
• It’d be even cooler if the heavy lifting could be
  distributed. Or sent to the Cloud™
• Buildings collapse. Things change.
The Umbra approach
• Don’t actually compute visibility for the entire
  scene
• Instead, process geometry to create a
  datastructure to solve visibility in the runtime
• Portal culling in the runtime
Data generation
• Data = portal graph
• Generate local graphs individually reasonably-
  sized geometry chunks (tiles), in parallel
• Combine the results into a global portal graph
  that can be quickly traversed
• Solve visibility quickly in the runtime using this
  graph
Will this work?
• Portal generation
  – Is very hard, but possible to do automatically
  – Only local geometry needed
  →Pretty much an embarrassingly parallel problem
• Runtime
  – Not as simple as a PVS lookup, but still quite fast
Simple example revisited
Split geometry into tiles
Dispatch tiles to worker nodes


 Tile 0   Tile 1   Tile 2   Tile 3
Generate portals


Tile 0     Tile 1   Tile 2   Tile 3
Combine portal graph
Runtime query: traverse portals
What did we do here?
 • Essentially a map-reduce
        – Split scene into distributable tiles
        – Generate local portal graph for each tile
        – Combine results, link global portal graph
                                                                   Runtime
Scene                Tile 0   Portals 0            Global portal             Visible
                                                   graph                     objects


                                          Reduce
                     Tile 1   Portals 1




                                                                   Query
               Map




                        ...      ...

                     Tile n   Portals n
The Future

THE NEXT GENERATION
Turns out...
• Even the initial ”map” is too much for large
  game worlds
• A global graph of a vast world is too expensive
  in the runtime
• You need to support multiple versions of some
  chunks for dynamic content
  – Quite a combinatorial problem
→ Next-gen games require an even better
solution!
So we did something like this
                               Runtime
          Tile 0   Portals 0             Graph A           Visible
                                                           objects




                               Combine




                                                   Query
          Tile 1   Portals 1

          Tile 2   Portals 2

          Tile 3   Portals 3             Graph B           Visible



                               Combine
                                                           objects




                                                   Query
...          ...      ...

          Tile n   Portals n
Got rid of ”map”
                               Runtime
      Tile 0       Portals 0             Graph A           Visible
                                                           objects




                               Combine




                                                   Query
      Tile 1       Portals 1

      Tile 2       Portals 2

      Tile 3       Portals 3             Graph B           Visible



                               Combine
                                                           objects




                                                   Query
...      ...          ...

      Tile n       Portals n
Split up ”reduce”, moved to runtime
                           Runtime
      Tile 0   Portals 0             Graph A           Visible
                                                       objects




                           Combine




                                               Query
      Tile 1   Portals 1

      Tile 2   Portals 2

      Tile 3   Portals 3             Graph B           Visible



                           Combine
                                                       objects




                                               Query
...      ...      ...

      Tile n   Portals n
Questions?




jasin@umbrasoftware.com

More Related Content

Similar to Embarrassingly Parallel Computation for Occlusion Culling

Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
Marakana Inc.
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks Age
Lorenzo Alberton
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Mary Chan
 
December 4, Project
December 4, ProjectDecember 4, Project
05 cubetech
05 cubetech05 cubetech
05 cubetech
Stellafilen
 
Designing an Objective-C Framework about 3D
Designing an Objective-C Framework about 3DDesigning an Objective-C Framework about 3D
Designing an Objective-C Framework about 3D
rsebbe
 
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
BeMyApp
 
Bigdata roundtable-storm
Bigdata roundtable-stormBigdata roundtable-storm
Bigdata roundtable-storm
Tobias Schlottke
 
CS 354 Procedural Methods
CS 354 Procedural MethodsCS 354 Procedural Methods
CS 354 Procedural Methods
Mark Kilgard
 
Workflows for developing next gen 3D browser games
Workflows for developing next gen 3D browser gamesWorkflows for developing next gen 3D browser games
Workflows for developing next gen 3D browser games
Michael Plank
 
CG simple openGL point & line-course 2
CG simple openGL point & line-course 2CG simple openGL point & line-course 2
CG simple openGL point & line-course 2
fungfung Chen
 
Pitfalls of object_oriented_programming_gcap_09
Pitfalls of object_oriented_programming_gcap_09Pitfalls of object_oriented_programming_gcap_09
Pitfalls of object_oriented_programming_gcap_09
Royce Lu
 
Automatically Defined Functions for Learning Classifier Systems
Automatically Defined Functions for Learning Classifier SystemsAutomatically Defined Functions for Learning Classifier Systems
Automatically Defined Functions for Learning Classifier Systems
Daniele Loiacono
 
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
Matthew Lease
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
fungfung Chen
 
WOOster: A Map-Reduce based Platform for Graph Mining
WOOster: A Map-Reduce based Platform for Graph MiningWOOster: A Map-Reduce based Platform for Graph Mining
WOOster: A Map-Reduce based Platform for Graph Mining
aravindan_raghu
 
09_Practical Multicore programming
09_Practical Multicore programming09_Practical Multicore programming
09_Practical Multicore programming
noerror
 
TomTom for Business Process Managment (TomTom4BPM)
TomTom for Business Process Managment (TomTom4BPM)TomTom for Business Process Managment (TomTom4BPM)
TomTom for Business Process Managment (TomTom4BPM)
Wil van der Aalst
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
npinto
 

Similar to Embarrassingly Parallel Computation for Occlusion Culling (19)

Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
 
Graphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks AgeGraphs in the Database: Rdbms In The Social Networks Age
Graphs in the Database: Rdbms In The Social Networks Age
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
 
December 4, Project
December 4, ProjectDecember 4, Project
December 4, Project
 
05 cubetech
05 cubetech05 cubetech
05 cubetech
 
Designing an Objective-C Framework about 3D
Designing an Objective-C Framework about 3DDesigning an Objective-C Framework about 3D
Designing an Objective-C Framework about 3D
 
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
[HTML5 BUG] 2,5D RTS Game in HTML5 by Dawid Lijewski
 
Bigdata roundtable-storm
Bigdata roundtable-stormBigdata roundtable-storm
Bigdata roundtable-storm
 
CS 354 Procedural Methods
CS 354 Procedural MethodsCS 354 Procedural Methods
CS 354 Procedural Methods
 
Workflows for developing next gen 3D browser games
Workflows for developing next gen 3D browser gamesWorkflows for developing next gen 3D browser games
Workflows for developing next gen 3D browser games
 
CG simple openGL point & line-course 2
CG simple openGL point & line-course 2CG simple openGL point & line-course 2
CG simple openGL point & line-course 2
 
Pitfalls of object_oriented_programming_gcap_09
Pitfalls of object_oriented_programming_gcap_09Pitfalls of object_oriented_programming_gcap_09
Pitfalls of object_oriented_programming_gcap_09
 
Automatically Defined Functions for Learning Classifier Systems
Automatically Defined Functions for Learning Classifier SystemsAutomatically Defined Functions for Learning Classifier Systems
Automatically Defined Functions for Learning Classifier Systems
 
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
Lecture 2: Data-Intensive Computing for Text Analysis (Fall 2011)
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
WOOster: A Map-Reduce based Platform for Graph Mining
WOOster: A Map-Reduce based Platform for Graph MiningWOOster: A Map-Reduce based Platform for Graph Mining
WOOster: A Map-Reduce based Platform for Graph Mining
 
09_Practical Multicore programming
09_Practical Multicore programming09_Practical Multicore programming
09_Practical Multicore programming
 
TomTom for Business Process Managment (TomTom4BPM)
TomTom for Business Process Managment (TomTom4BPM)TomTom for Business Process Managment (TomTom4BPM)
TomTom for Business Process Managment (TomTom4BPM)
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
 

Recently uploaded

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 

Recently uploaded (20)

Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 

Embarrassingly Parallel Computation for Occlusion Culling

  • 2. Who are we? • The only occlusion culling middleware company in the world • Founded in 2006 • Based in Helsinki • 12 people • Customers: Bungie (Halo), Guerrilla (Killzone), Remedy (Alan Wake), Bioware (Mass Effect), CD Projekt (Witcher), ArenaNet (Guild Wars) and many more
  • 3. We’re going to talk about • The past – Brief introduction to occlusion culling – Traditional methods of visibility computation • The present – Umbra’s visibility computation algorithm – How it can be distributed • The future – Challenges of modern games and engines
  • 4. The Past: SO, WHAT’S OCCLUSION CULLING ANYWAY?
  • 5. Graphics in games • Game development process: – Artists create content – Engine runtime renders it • Rendering – Content consists of objects – Which consist of triangles – Which get rendered by the GPU • Our business: rendering optimization
  • 6. Occlusion culling explained • ”Culling is the process of removing breeding animals from a group based on specific criteria.” (Wikipedia) • Hidden surface removal: ”Which surfaces do not contribute to the final rendered image on the screen?” • Some popular HSR methods: – Frustum culling – Backface culling – Occlusion culling
  • 7. Occlusion culling explained • Occlusion culling: ”Which surfaces are blocked (occluded) by other surfaces?” • Depth buffering is one way to do OC – Very accurate (i.e. pixel level) – Ubiquitous on hardware, easy problem to solve – Occurs very late in the pipeline
  • 8. Occlusion culling explained • Higher-level methods complement depth- buffering nicely • These cull entire objects, groups of objects or entire sections of the scene – Not easy! • The earlier, the better
  • 9. Occlusion culling Only the objects visible to the camera are rendered
  • 10. ”Traditional” way to do OC • Preprocess: – Divide scene into cells – Compute visibility between cells • Results in a visibility matrix (PVS) • Runtime: – Locate the camera – Do a lookup into the PVS matrix
  • 12. Split scene into cells A B C D
  • 13. Compute visibility (sampling) A B A B C D A 1 1 1 0 B C D C D
  • 14. Compute visibility A B A B C D A 1 1 1 0 B 1 1 0 1 C D C D
  • 15. Compute visibility A B A B C D A 1 1 1 0 B 1 1 0 1 C 1 0 1 1 D C D
  • 16. Compute visibility A B A B C D A 1 1 1 0 B 1 1 0 1 C 1 0 1 1 D 0 1 1 1 C D
  • 17. Runtime PVS culling A B A B C D A 1 1 1 0 B 1 1 0 1 C 1 0 1 1 D 0 1 1 1 C D
  • 18. Problem? • Solving visibility between cells is very difficult – E.g. Solving analytically is actually O(n4) • Global operation by nature • Doesn’t play well with dynamic scenes – Worst case: a change in one cell requires recomputation of the entire matrix
  • 20. Welcome to the 2010s • Modern game worlds are huge • So it’d be cool if you didn’t need the entire scene in memory, ever • It’d be even cooler if the heavy lifting could be distributed. Or sent to the Cloud™ • Buildings collapse. Things change.
  • 21. The Umbra approach • Don’t actually compute visibility for the entire scene • Instead, process geometry to create a datastructure to solve visibility in the runtime • Portal culling in the runtime
  • 22. Data generation • Data = portal graph • Generate local graphs individually reasonably- sized geometry chunks (tiles), in parallel • Combine the results into a global portal graph that can be quickly traversed • Solve visibility quickly in the runtime using this graph
  • 23. Will this work? • Portal generation – Is very hard, but possible to do automatically – Only local geometry needed →Pretty much an embarrassingly parallel problem • Runtime – Not as simple as a PVS lookup, but still quite fast
  • 26. Dispatch tiles to worker nodes Tile 0 Tile 1 Tile 2 Tile 3
  • 27. Generate portals Tile 0 Tile 1 Tile 2 Tile 3
  • 30. What did we do here? • Essentially a map-reduce – Split scene into distributable tiles – Generate local portal graph for each tile – Combine results, link global portal graph Runtime Scene Tile 0 Portals 0 Global portal Visible graph objects Reduce Tile 1 Portals 1 Query Map ... ... Tile n Portals n
  • 31. The Future THE NEXT GENERATION
  • 32. Turns out... • Even the initial ”map” is too much for large game worlds • A global graph of a vast world is too expensive in the runtime • You need to support multiple versions of some chunks for dynamic content – Quite a combinatorial problem → Next-gen games require an even better solution!
  • 33. So we did something like this Runtime Tile 0 Portals 0 Graph A Visible objects Combine Query Tile 1 Portals 1 Tile 2 Portals 2 Tile 3 Portals 3 Graph B Visible Combine objects Query ... ... ... Tile n Portals n
  • 34. Got rid of ”map” Runtime Tile 0 Portals 0 Graph A Visible objects Combine Query Tile 1 Portals 1 Tile 2 Portals 2 Tile 3 Portals 3 Graph B Visible Combine objects Query ... ... ... Tile n Portals n
  • 35. Split up ”reduce”, moved to runtime Runtime Tile 0 Portals 0 Graph A Visible objects Combine Query Tile 1 Portals 1 Tile 2 Portals 2 Tile 3 Portals 3 Graph B Visible Combine objects Query ... ... ... Tile n Portals n