Babylon.js icon indicating copy to clipboard operation
Babylon.js copied to clipboard

GS Volume Culling

Open CedricGuillemet opened this issue 1 year ago • 6 comments

This is the 1st step for performance improvements with GS. AABB Volumes used are coming from Compressed .PLY quantized chunks. It's far for being efficient. But goal here is to have everything in place to try different algorithms while not increasing complexity too much at once.

Batch of 256 splats are culled. visible ones are sorted and that subset is used for instance count. It should decrease the pressure on GPU/CPU a little.

Next:

  • Better partitioning (octree)
  • wasm sorting
  • radix sort?
  • per splat culling
  • per volume sorting of splats and volume sorting

EDIT: there should be 1 noticeable issue when camera moves fast with huge number of splats. Latency induced by sorting will make visible splat being not culled late and popping might be visible.

CedricGuillemet avatar Oct 15 '24 14:10 CedricGuillemet

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). To prevent this PR from going to the changelog marked it with the "skip changelog" label.

bjsplat avatar Oct 15 '24 14:10 bjsplat

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). To prevent this PR from going to the changelog marked it with the "skip changelog" label.

bjsplat avatar Oct 15 '24 16:10 bjsplat

Snapshot stored with reference name: refs/pull/15705/merge

Test environment: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15705/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15705/merge/index.html#WGZLGJ#4600

Links to test babylon tools with this snapshot:

https://playground.babylonjs.com/?snapshot=refs/pull/15705/merge https://sandbox.babylonjs.com/?snapshot=refs/pull/15705/merge https://gui.babylonjs.com/?snapshot=refs/pull/15705/merge https://nme.babylonjs.com/?snapshot=refs/pull/15705/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/15705/merge#BCU1XR#0

bjsplat avatar Oct 15 '24 16:10 bjsplat

WebGL2 visualization test reporter:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15705/merge/testResults/webgl2playwright/index.html

bjsplat avatar Oct 15 '24 16:10 bjsplat

Visualization tests for WebGPU (Experimental)

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15705/merge/testResults/webgpuplaywright/index.html

bjsplat avatar Oct 15 '24 16:10 bjsplat

Switching back to draft, I'm not sure CPU culling on a webworker is a good way to improve perf for high splat count.

CedricGuillemet avatar Oct 16 '24 08:10 CedricGuillemet

Culling in webworker adds too much latency in visibility. Closing.

CedricGuillemet avatar Nov 07 '24 08:11 CedricGuillemet