WIP: Stochastic transparency render mode + global render settings #174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP!
Stochastic Transparency
Primarily this is about adding stochastic transparency, as a way of avoiding splat sorting (and also, improving the situation when multiple splat objects are in the same scene, and overlapping each other).
I played around with it back in 2023 Oct (d1c04ca) but never finished. Other people have experimented with these approaches in 2024 Jan (see comments under #43). Well, now in 2025 Mar a whole paper came out (StochasticSplats) which reminded me to maybe play with it again.
So, as an alternative to sorting splats by their distance to camera and blending them back to front, this implements stochastic transparency: randomly decide whether to render a fully opaque splat pixel, or completely skip it, based on a random value and transparency of the splat pixel.
Sorting and blending looks nice, except multiple separate splat point clouds (there are four in this scene: the whole bicycle scene, plus three statues) do not "compose" nicely with each other.
Stochastic by itself looks very noisy.
With some sort of temporal filtering, noise is reduced quite a bit. Splats "compose" with each other correctly.
Note: my current implementation of temporal filtering is really bad. It is similar to what temporal anti-aliasing (TAA) would do, except I do not do any "motion vectors" (nor camera motion) stuff at all. So moving the camera around means a ton of ghosting. That I should improve at some point, yes.
Global Render Options
In order to achieve above, I needed a "global" place for splat rendering options, instead of them being specified for each splat point cloud object. So now various things that are "logically global", like transparency mode, or debug visualizations, are in a separate
GaussianSplatSettings
component. If you do not have one in your scene, defaults are used, but if you have one, you can specify settings there.Performance
TODO: gather some numbers