Skip to content

WIP: Stochastic transparency render mode + global render settings #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

aras-p
Copy link
Owner

@aras-p aras-p commented Apr 15, 2025

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.

Sorted + Blended (current method) Stochastic, no filtering Stochastic, stupid unfinished temporal filter
ShotSortedBlender ShotStochastic ShotStochasticFiltered

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.

SplatSettings

Performance

TODO: gather some numbers

aras-p added 8 commits April 12, 2025 17:49
…r component

These are: Render Mode, Point Display Size, SH Only, Sort Nth Frame.

If GaussianSplatRenderOptions script exists in scene, this is used,
otherwise defaults are used.

Do shader/compute referencing via that object too, using Resources.Load
since there's no good other way that is also not an overkill.
Existing one is SortedBlended now; new one is random and does not need
a sort
@aras-p aras-p marked this pull request as draft April 15, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant