Live data from Hacker News

Why do we need dithering?

typefully.com

31–40 of 115 posts

Re: Why do we need dithering?

#31

> Before we all mute the word 'dithering' Is this a reply to something?

Yes, it's referencing a tweet which briefly made the rounds a few weeks ago:

https://x.com/TukiFromKL/status/1981024017390731293

Many people believed that the author was claiming to have invented a particular illustration style which involved dithering.

Re: Why do we need dithering?

#32
The figures in this article are really great. How where they made? If I was to try and recreate them I might render things individually and then lay it out in Illustrator to get that 3D isomorphic look, but I assume there's a better way.

Re: Why do we need dithering?

#34
post #14
post #10

Earlier quoted context omitted.

It would be nice if you had some examples.

Acerola recently made a video about how Silk Song has banding with dark colors due to poor dithering (and how to fix it): https://www.youtube.com/watch?v=au9pce-xg5s Highly recommend for any graphics programmer that might think dithering is unnecessary or simply a "aesthetic choice".

To lend more credibility, the devs added more dithering in the next patch.

Re: Why do we need dithering?

#35
We've had a couple of other recent discussions on dithering: https://news.ycombinator.com/item?id=45750954 and https://news.ycombinator.com/item?id=45698323. I commented specifically about the history of blue-noise dithering at https://news.ycombinator.com/item?id=45728231.

The article points out that, historically, RAM limitations were a major incentive for dithering on computer hardware. (It's the reason Heckbert discussed in his dissertation, too.) Palettizing your framebuffer is clearly one solution to this problem, but I wonder if chroma subsampling hardware might have been a better idea?

The ZX Spectrum did something vaguely like this: the screen was 256×192 pixels, and you could set the pixels independently to foreground and background colors, but the colors were provided by "attribute bytes" which each provided the color pairs for an 8×8 region http://www.breakintoprogram.co.uk/hardware/computers/zx-spec.... This gave you a pretty decent simulation of a 16-color gaming experience while using only 1.125 bits per pixel instead of the 4 you would need on an EGA. So you got a near-EGA-color experience on half the RAM budget of a CGA, and you could move things around the screen much faster than on even the CGA. (The EGA, however, had a customizable palette, so the ZX Spectrum game colors tend to be a lot more garish. The EGA also had 4.6× as many pixels.)

Occasionally in ZX Spectrum game videos like https://www.youtube.com/watch?v=Nx_RJLpWu98 you will see color-bleeding artifacts where two sprites overlap or a sprite crosses a boundary between two background colors. For applications like CAD the problem would have been significantly worse, and for reproducing photos it would have been awful.

The Nintendo did something similar, but I think had four colors per tile instead of two.

So, suppose it was 01987 and your hardware budget permitted 8 bits per pixel. The common approach at the time was to set a palette and dither to it. But suppose that, instead, you statically allocated five of those bits to brightness (a Y channel providing 32 levels of grayscale before dithering) and the other three to a 4:2:0 subsampled chroma (https://www.rtings.com/tv/learn/chroma-subsampling has nice illustrations). Each 2×2 4-pixel block on the display would have one sample of chroma, which could be a 12-bit sample: 6 bits of U and 6 bits of V. Moreover, you can interpolate the U and V values from one 2×2 block to the next. As long as you're careful to avoid drawing text on backgrounds that differ only in chroma (as in the examples in that web page) you'd get full resolution for antialiased text and near-photo-quality images.

That wouldn't liberate you completely from the need for dithering, but I think you could have produced much higher quality images that way than we in fact did with MCGA and VGA GIFs.

Re: Why do we need dithering?

#36
post #22
post #15

This is going to be an odd comment, but I immediately recognised the parrot in the test images. It's the scarlet macaw from 2004 which is often used in many Wikipedia articles about colour graphics. I think this is the original, photographed and contributed by Adrian Pingstone: https://commons.wikimedia.org/wiki/File:Parrot.red.macaw.1.a... But this particular derivative is the one that appears most often in the Wiki…

This also used to be a really common test image: https://en.wikipedia.org/wiki/Lenna But its apparently a cropped centerfold from Playboy

And a poster of Lenna is on the wall of the Richard Hendricks character in the Silicon Valley series. Which makes sense as he's working on a compression algorithm.

Re: Why do we need dithering?

#37
We really don't anymore.

Back in the late 90s maybe. Gifs and other paletted image formats were popular.

I even experimented with them. I designed various formats for The Palace. The most popular was 20-bit (6,6,6,2:RGBA, also 5,5,5,5; but the lack of color was intense, 15 bits versus 18 is quite a difference). This allowed fairly high color with anti-aliasing -edges that were semi transparent.

Re: Why do we need dithering?

#38
post #25
post #22

Earlier quoted context omitted.

This also used to be a really common test image: https://en.wikipedia.org/wiki/Lenna But its apparently a cropped centerfold from Playboy

The original Lenna is controversial, but I'm delighted to share the "ethically sourced Lenna": https://mortenhannemose.github.io/lena/

This feels better than the original anyway. I never liked the yellow color that one had. Maybe it was an artistic choice, but to me it just looked degraded, like when white plastic is left exposed to the sun.

Re: Why do we need dithering?

#39
post #25
post #22

Earlier quoted context omitted.

This also used to be a really common test image: https://en.wikipedia.org/wiki/Lenna But its apparently a cropped centerfold from Playboy

The original Lenna is controversial, but I'm delighted to share the "ethically sourced Lenna": https://mortenhannemose.github.io/lena/

Oh my goodness that is delightful

Re: Why do we need dithering?

#40
post #30

Earlier quoted context omitted.

8 bits for each of R G and B. So a grey-scale gradient indeed has only 256 colors available. Any gradient also will have about that many at most .

In most gradients, the transitions in R, G, and B are at different places.

True. Also, in most gradients, the full range of R G and B is not used.

In rgb(50, 60, 70) to rgb(150, 130, 120), there are only 200 total transitions.

Post reply on HN