Skip to content

Conversation

@slimbuck
Copy link
Member

@slimbuck slimbuck commented Mar 24, 2025

This PR updates the gsplat sorter when rendering compressed data:

  • send the compressed chunk min/max bound to sort worker
  • use chunk bounds to calculate a per-frame histogram of chunks based on distance-to-camera
  • use the histogram to allocate counting sort key bits

This results in much more stable rendering of our most challenging (especially MCMC) scenes, but also (unexpectedly) better rendering on many others.

The uncompressed sort is sped up slightly, but otherwise remains unchanged.

Cost:

  • cpu sort seems to be around 20% slower
  • additional memory storage requires 6 x float32 per 256 gaussians (which practically very small)

Before:

Screen.Recording.2025-03-24.at.15.25.27.mov

After:

Screen.Recording.2025-03-24.at.15.26.33.mov

Before:

Screen.Recording.2025-03-24.at.15.33.47.mov

After:

Screen.Recording.2025-03-24.at.15.34.45.mov

Before:

Screen.Recording.2025-03-24.at.15.35.59.mov

After:

Screen.Recording.2025-03-24.at.15.36.54.mov

Notes

  • default histogram size is arbitrarily set to 32. More buckets just seem to result in more stable sorting, but cost more CPU time.
  • would be nice to support this approach for uncompressed format, but without chunks it would probably run twice as slowly

Fixes #6817

@slimbuck slimbuck added area: graphics Graphics related issue enhancement labels Mar 24, 2025
@slimbuck slimbuck requested a review from a team March 24, 2025 15:43
@slimbuck slimbuck self-assigned this Mar 24, 2025
@slimbuck slimbuck changed the title Sort update Gsplat sorting update Mar 24, 2025
@slimbuck slimbuck merged commit 2345b96 into playcanvas:main Mar 25, 2025
7 checks passed
@slimbuck slimbuck deleted the sort-dev branch March 25, 2025 09:31
mvaligursky pushed a commit that referenced this pull request Mar 25, 2025
@slimbuck slimbuck mentioned this pull request Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] 3D Gaussian Splatting MCMC support

2 participants