Finer control over multi-threaded visibility queries

All Posts

A while ago, I wrote about splitting Umbra’s visibility query into multiple jobs. Specifying the number of jobs is typically perfectly sufficient, but there are cases where this yields suboptimal load balancing. So it’s good to understand what Umbra does internally and how you can tweak the behavior.

So how does Umbra actually allocate work between the jobs then? The obvious answer is that it simply divides the view frustum into a number of tiles and runs the query separately for each tile. So if numJobs == 4 and jobIndex == 2, Umbra selects the third tile out of a total of four in the view frustum and runs the query on that subfrustum. Once all jobs have been run, the user combines the results.

Sometimes it may appear that some jobs tend to be systematically heavier than others. This happens for instance when certain parts of the view frustum consistently have longer view distances than others, yielding a higher runtime cost. In such cases, the user may want to explicitly define the way the frustum is divided. For this purpose, we introduce the gridWidth parameter, of which, if specified, numJobs needs to be an exact multiple.

For instance, when numJobs == 4 and gridWidth == 4, the view frustum is split into four pillars, which is a fairly typical scenario. On the other hand, using the same number of jobs, but specifying a grid width of 1 will yield four wide tiles stacked on top of each other. Finally, setting gridWidth to 2 would result in a 2×2 grid and so forth. By default, when gridWidth is not given, Umbra will attempt to create something close to a uniform grid.





Evaluate Umbra SDK




More from the Umbra blog

Bring your passion to us!

Elina Nygård / August 10, 2017
We are seeking seasoned veterans, propeller hat scientists and enthusiastic students to join us and…
Read more

Overview on Popular Occlusion Culling Techniques

Umbra / December 15, 2016
This article was featured in gamesindustry.biz   The occlusion culling experts at Umbra share…
Read more

Getting It Just Right – Benchmarking On HoloLens

Karlos Zafra / October 21, 2016
"Ahhh, this porridge is just right," – Goldilocks Finding the exact balance in any recipe is…
Read more

Popular Posts