Search Unity

Iterative baking of Occlusion and NavMeshes

November 30, 2012 in Technology | 1 min. read
Placeholder image Unity 2
Placeholder image Unity 2
Share

A lot of cool stuff was developed during Ninja Camp VII. One of the projects targetted the baking of NavMeshes and Occlusion data.

Wouldn't it be cool if the navmesh and occlusion data was just computed automatically, in the background when the level is edited - giving almost instantaneous visual feedback? A bake has the unfortunate property that the time it takes is proportional to the size of the loaded scene, even if the last change is tiny and localised. This can seriously hurt turnaround time (and the trips to the coffee shop whilst waiting for a bake).

Incremental baking addresses this issue by breaking the world up into tiles and recomputing tile data on the fly, utilising idle cores in your workstation. The system continuously monitors the loaded objects and computes unique hashes for them. As soon as a hash changes - due to, say, a transformation change - the tiles that are affected are recomputed asynchronously on a low priority thread - and once finished - the new results are integrated seamlessly. Even on larger levels like AngryBots this leads to interactive editing of NavMeshes allowing you to carefully tweak the positions of objects and getting near instant visual feedback of the layout of the navigation mesh.

On top of this, the hashed data will be added to the cache server such that when you load up a level edited by a team member the baked tile data can be instantly pulled from the server. Take a look!

Ninjas: Jakob Hunsballe, Joachim Ante & Jesper Mortensen

November 30, 2012 in Technology | 1 min. read