Git Product home page Git Product logo

Comments (6)

andybak avatar andybak commented on August 30, 2024 1

Also - it's worth noting that the Quill player varies the blue noise per frame. It increases "crawling" but at a high refresh rate it adds some temporal smoothing (I assume due to persistence of vision)

from unitygaussiansplatting.

pablodawson avatar pablodawson commented on August 30, 2024

I made some progress here, my code is a mess now, I can PR after cleaning it a bit.
Here's how it looks with 1, 4, and 8 MSAA samples respectively:

There are some other tricks to reduce noise further as shown here: https://luebke.us/publications/StochasticTransparency_I3D2010.pdf
1x MSAA2
4X MSAA2
8x MSAA2

I write to SV_Coverage the coverage mask is created as follows:

uint createStochasticMask(float alpha, float3 pos, uint idx)
{
	uint mask = 0;
	for (uint i = 0; i < 8; i++)
	{
		float3 seed = pos + (idx + 1) * (10*i + 1);
		float cutoff = saturate(hash13(seed));
		
		if (alpha > cutoff)
		{
			mask |= 1 << i;
		}
	}
	return mask;
}

I use an intermediate Render Texture with MSAA enabled then resolve it to the main one.
It doesn't seem to render well according to depth, when using no order it renders points randomly, and when using the Order buffer everything is inverted (further things render first). Any ideas why? I use:

ZWrite On
ZTest LEqual
Blend One Zero
Cull Off

from unitygaussiansplatting.

andybak avatar andybak commented on August 30, 2024

Would blue noise improve things here? It should be as simple as sampling from a pregenerated texture.

@pablodawson Is this right repo and branch? https://github.com/pablodawson/UnityGaussianSplatting

Nothing renders for me even when I try and bypass the NRE in the console.

from unitygaussiansplatting.

pablodawson avatar pablodawson commented on August 30, 2024

@andybak I updated the repo, it implements both Weighted blended OIT and Blue Noise/Hashed OIT, and you can switch between them in the inspector.

For the latter, Blue Noise seems to look worse in my opinion. Weighted blended OIT seems promising as it is less "grainy" but it might require some tweaking to get it right.

Also Noise/Hashed OIT seems to work only on sorted splats which kind of defeats the purpose, but it's a decent starting point I think.

Some comparisons:

Alpha blending:
1

Blue Noise (8x MSAA):
blue

Hashed (8x MSAA):
hashed

Weighted:
weighted

I want to try Depth Peeling next, but it might be too much overhead.

Edit: Apparently weighted blending is not good for this case since it fails on surfaces with high alpha with transparency behind it
https://therealmjp.github.io/posts/weighted-blended-oit/

from unitygaussiansplatting.

pablodawson avatar pablodawson commented on August 30, 2024

Interesting, I'll see if I can implement that. Also forgot to add alpha correction, the latest commit should look better (and not require sorting)

from unitygaussiansplatting.

pablodawson avatar pablodawson commented on August 30, 2024

Update: Fixed some things. The bike scene looks decent now imo and depth is correct with no sorting.

Hashed alpha 8x:
bike no alpha correction

Alpha blending:
alphablending

On my 3070:
Alpha blending (current): 80 FPS
Hashed alpha 8X: 98 FPS
Hashed alpha 4X: 103 FPS
Hashed alpha 2X: 198 FPS

Also @andybak do you recall using anything else to reduce noise?
Looking into TAA and Bilateral/Median Filters for example

from unitygaussiansplatting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.