googlevr / tilt-brush-toolkit

Scripts and assets that help you use Tilt Brush data in your creative projects.
Apache License 2.0
737 stars 164 forks source link

Smoke shader in Linear colourspace is very different from in tiltbrush #41

Open mrlinds opened 4 years ago

mrlinds commented 4 years ago

with running assets in linear colourspace there's quite a large difference between what we see in tiltbrush and in unity. We ended up multiplying the alpha just by eye and landed about ~2.8x Not sure if there's a more logical way to figure what the difference is

dubois commented 4 years ago

My guess, based purely on supposition and not on looking at the sketch giving you issues, is that this is because multiple smokes are overlapping. It's possible to get scenes that use no blending to look identical between srgb and linear colorspace (and this is what we aim for the TBT_LINEAR_TARGET keyword) but once there's any blending, especially additive blending, that'll expose the differences between linear and srgb/gamma color.

Unfortunately, Tilt Brush internally uses srgb targets, which means the blending is done in srgb, which means sketches that rely heavily on additive blending -- which I know is a lot of them -- will look significantly different when blending is done in linear.

Is this what you're seeing? Or does, like, a single smoke particle on a black background look different between colorspaces?

mrlinds commented 4 years ago

Just did a test with single particles on a black background and the particles look identical, so yeah, I guess it must be the blending. I guess we'll continue to eyeball things with our Multiplier value.