Ancestors

Written by demofox on 2025-01-20 at 20:27

Quantizing an image to 2 bits per color channel (64 colors). Dithering with 8x8 bayer (top) and FAST spatiotemporal blue noise (bottom).

Randomly offsetting bayer each frame, it doesn't converge.

That is weird.

The bayer matrix averages to 0.5 so is unbiased in that regard.

I think it must be due to Bayer having 1/64th values, while the blue noise has 1/256th values.

hmm...

=> View attached media

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Toot

Written by demofox on 2025-01-20 at 20:29

Bayer totally bites it at 1 bit per pixel (8 colors), with a 2x4 matrix. FAST STBN works just fine.

(I'm working on a dithering & stippling blog post)

=> View attached media

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Descendants

Written by demofox on 2025-01-20 at 20:35

At 3 bits per color it doesn't converge either though. Still ugly banding in the sky. That's 512 values, so is 1/512. Something else must be going on.

=> View attached media

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by demofox on 2025-01-20 at 21:41

oops, 3 bits per color channel is 512 colors, but not 512 values in the bayer matrix. Each channel is treated independently, so this is just a 4x2 bayer matrix = 8 values (shades).

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by demofox on 2025-01-20 at 21:46

Yeah mystery solved... it's the quantized values used in Bayer that are causing the banding.

Here the image is dithered and quantized to 2 bits per color channel. Top is white noise limited to 4 discrete values. Bottom is white noise with full range of floating point values.

=> View attached media

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by DougMerritt (log😅 = 💧log😄) on 2025-01-20 at 20:36

@demofox

=> More informations about this toot | More toots from dougmerritt@mathstodon.xyz

Written by demofox on 2025-01-20 at 20:38

@dougmerritt I thought Mach banding was just a perceptual effect, not a real thing.

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by DougMerritt (log😅 = 💧log😄) on 2025-01-20 at 20:42

@demofox

I'm not sure it should be categorized that way. Like, is infrared a perceptual effect or real? Both.

The human eye+brain can spot the boundaries on e.g. the classic undithered 16 bit color gradual variation. They are really there, and it's a perceptual artifact, both.

With 24 bit undithered color, the boundaries may still be there, but the human eye+brain isn't sensitive enough to be there.

Are there any cases where they are perceived but not really there? Not that comes to mind, but we do have a human perception expert here if that matters to you. Not sure you should care.

=> More informations about this toot | More toots from dougmerritt@mathstodon.xyz

Written by demofox on 2025-01-20 at 20:45

@dougmerritt Check this out, mach bands are purely illusion. There's an animated gif on the page showing the effect that is pretty wild.

https://en.wikipedia.org/wiki/Mach_bands

=> View attached media

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by DougMerritt (log😅 = 💧log😄) on 2025-01-20 at 20:47

@demofox

"What's in a name? A rose by any other name would smell as sweet"

You're focusing on what to name it. You need to be focused on what will remove it from human perception.

It is Mach banding.

=> More informations about this toot | More toots from dougmerritt@mathstodon.xyz

Written by demofox on 2025-01-20 at 20:49

@dougmerritt i don't think so. I'm uniform randomly offsetting the bayer matrix each frame and integrating. It's going to converge, or it won't. It's not converging.

The blue noise converges.

Trying to figure out where the bias is coming from.

Right side is the integrated version, left side is a single representative sample in the integration.

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by demofox on 2025-01-20 at 20:53

@dougmerritt converging to the unquantized image i mean. It's converging to the wrong thing.

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by DougMerritt (log😅 = 💧log😄) on 2025-01-20 at 20:53

@demofox

Well, you know your work better than I do. Just keep an eye out.

=> More informations about this toot | More toots from dougmerritt@mathstodon.xyz

Written by demofox on 2025-01-20 at 20:56

@dougmerritt something is definitely going "wrong" somewhere!

=> More informations about this toot | More toots from demofox@mastodon.gamedev.place

Written by Tony Vladusich on 2025-01-21 at 08:23

@demofox @dougmerritt

you guys reminded me of interesting phenomenon

https://en.wikipedia.org/wiki/Gibbs_phenomenon

=> More informations about this toot | More toots from TonyVladusich@mathstodon.xyz

Written by Tariq on 2025-01-20 at 21:50

@demofox

Looks interesting - I don't fully understand it but looking forward to your post!

=> More informations about this toot | More toots from rzeta0@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113862571446355067
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
380.600166 milliseconds
Gemini-to-HTML Time
4.472035 milliseconds

This content has been proxied by September (ba2dc).