HomeGamesUpdatesPricingMethodology
Steam News28 June 20242y ago

Devlog 43: Occlusion Culling

Implemented occlusion culling for vegetation. This is behind the scenes stuff that the player will never see, which is the entire purpose of it.

Full notes

Full Determinant update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

0 fixes0 additions4 changes0 removals
  • Maps
  • Performance
changedImplemented occlusion culling for vegetation. This is behind the scenes stuff that the player will never see, which is the entire purpose of it. A lot of the vegetation was being rendered even though they may be obscured by terrain. By precalculating the occlusion, all these rendering can be skipped, saving on performance. This is all based on a heavily modified Perfect Culling asset from the store.
changedThe entire world is then divided into culling cells and for each cell, six cameras are rendered, each corresponding to the cell faces. The colour info is the read back through a compute shader and the vegetation cells that are visible can then be determined. This is a very slow process, but it only needs to be done once and the subsequent runtime lookup is extremely fast, O(1) fast!
changedOnce all the occlusion culling is baked, the terrain now obscures vegetation cells. Green lines indicate visible cells, and lack of lines show that the small hill is occluding quite a lot of cells.
changedAs for the performance gain, haven't measured that yet because it will take a long time to bake the entire world. But there should be definitely some gain since there is near zero runtime cost to this.

Implemented occlusion culling for vegetation. This is behind the scenes stuff that the player will never see, which is the entire purpose of it. A lot of the vegetation was being rendered even though they may be obscured by terrain. By precalculating the occlusion, all these rendering can be skipped, saving on performance. This is all based on a heavily modified Perfect Culling asset from the store.

Vegetation is divided into cells and each cell is assigned a unique colour. This serves to identify the cell in renders.

The entire world is then divided into culling cells and for each cell, six cameras are rendered, each corresponding to the cell faces. The colour info is the read back through a compute shader and the vegetation cells that are visible can then be determined. This is a very slow process, but it only needs to be done once and the subsequent runtime lookup is extremely fast, O(1) fast!

Once all the occlusion culling is baked, the terrain now obscures vegetation cells. Green lines indicate visible cells, and lack of lines show that the small hill is occluding quite a lot of cells.

As for the performance gain, haven't measured that yet because it will take a long time to bake the entire world. But there should be definitely some gain since there is near zero runtime cost to this.

Source

Steam News / 28 June 2024

Open original post

Changelog.gg summarizes and formats this update. How we read updates.