[HN Gopher] Dithering - Part 1
___________________________________________________________________
Dithering - Part 1
Author : Bogdanp
Score : 148 points
Date : 2025-10-29 18:21 UTC (4 hours ago)
(HTM) web link (visualrambling.space)
(TXT) w3m dump (visualrambling.space)
| hackncheese wrote:
| Somehow my first time seeing Visual Rambling, absolutely
| beautiful site
| seemaze wrote:
| While I enjoyed the whole presentation, my favorite part after
| progressing through the entire deck was pressing my back button
| _once_ and landing right back here on HN :)
| kridsdale1 wrote:
| Same! I dreaded my history being filled.
| ChrisArchitect wrote:
| There's a weird subset of graphic design grifters on social media
| obsessed with dithering right now.
|
| Submission from the dev earlier
| https://news.ycombinator.com/item?id=45694750
| dbushell wrote:
| those dithering perverts how dare they try to educate us with
| their fancy graphics!
| Modified3019 wrote:
| Why do you think the term "grifter" applies here?
| ChrisArchitect wrote:
| not here as in HN, out on social posts.... some unhinged
| claims about inventing dithering trends and a lot of
| startup/techbro types putting the 'aesthetic' forward as the
| goto way to success. shrug.
| Fraterkes wrote:
| (For those who are confused, a few days ago on twitter some
| random graphic designer / webdev claimed that they started
| the trend of using dithering in modern graphic design.
| People made of fun of that person. All of that is unrelated
| to this post)
| hunter2_ wrote:
| I don't think GP meant "here" the way you are interpreting
| "here" (i.e., this site / that site). Rather, I think they
| meant "here" to mean "in the sentence you wrote."
|
| Put another way, I think GP was asking why you think the
| term "grifter" has anything to do with graphic designers
| who are obsessed with dithering right now. Basically, you
| aren't asserting that they're obtaining value illicitly
| (i.e., swindling, conning), as would need to be the
| situation for a grift to occur. If they're convincing
| customers that their dithering product is a must-buy
| because dithering is the best thing ever, and the customer
| hands over their money upon being convinced, that really
| isn't a grift unless the product somehow ends up not doing
| the thing.
|
| If I lie on a website, and the subsequent wave of
| additional readers leads me to collect tons of ad revenue,
| the readers have not been grifted (they still have their
| money) and the ad network was not grifted (I gave them
| legitimate traffic). If I lie to a reader in order to take
| the reader's money, then at that point yes, the reader was
| grifted.
| hatthew wrote:
| I don't think it's a negative thing, but I find it kinda funny
| that there's a new dithering article on HN at least once a
| month
| lampiaio wrote:
| Few things brighten my browsing day as much as a virtual ode to
| dithering.
| jarjar2 wrote:
| Two videos from Daniel Shiffman's Coding Train:
|
| Turning Images into Dots: The Magic of Dithering
| https://www.youtube.com/watch?v=0L2n8Tg2FwI
|
| Coding Challenge 181: Weighted Voronoi Stippling
| https://www.youtube.com/watch?v=Bxdt6T_1qgc
| anteloper wrote:
| Good lord this is a beautiful web experience
| estebank wrote:
| Obligatory link to the in-progress forum post about the
| development of The Return of the Obra Dinn's dithering effect:
| https://forums.tigsource.com/index.php?topic=40832.msg136374...
|
| The difficulty for dithering on an interactive 3d scene is in
| making the dithering stable on camera rotation, otherwise you get
| a twinkling stars effect, not dissimilar to the "fireflies" in
| reflections in ray-traced games.
| m12k wrote:
| And here's a couple videos about a technique that was inspired
| by the Obra Dinn's dither, but making it surface stable:
|
| https://www.youtube.com/watch?v=HPqGaIMVuLs (explanation)
|
| https://www.youtube.com/watch?v=EzjWBmhO_1E (demo)
| glimshe wrote:
| We had another dithering post a few days ago and nobody answered
| my question... I'm reposting in case someone who comes here knows
| the answer:
|
| "Does anyone know of any application/tool that can perform
| palette dithering? The idea is "here is a n-color palette
| specified in their RGB values, here is the full-color RGB image,
| give me the best possible dithered image using the provided
| palette". The tools that I've used were underwhelming and
| produced results full of banding and artifacts.
|
| Basically, great dithering in color instead of B/W."
|
| EDIT: Thank you for the answers! I'll check all links.
| gyomu wrote:
| That's going to be a tricky problem full of compromises, and
| entirely up to how you formalize your definition for "the best
| possible dithered image".
|
| Do you care about preserving relative brightness, contrast,
| edges,... etc.
|
| Human color perception is tricky, and in the outline you give
| it's entirely possible that the provided n-color palette (also,
| what order of magnitude n are we talking about here?) would be
| inadequate for a satisfactory rendering of the provided full
| color image.
| glimshe wrote:
| I'd just like a subjectively "good" result that beats the
| manual approaches using image manipulation programs.
|
| n would be less than 4096, but usually much smaller values
| (256, 16)
| tfinch wrote:
| I'm using this for making some quake inspired textures - it's a
| bit clunky but works for me https://captain4lk.itch.io/slk-
| img2pixel
| kevinsync wrote:
| I left a comment [0] on the other thread, and this is
| irrelevant if you aren't using Photoshop, but there's a plugin
| called DITHERTONE Pro that gives you a lot of control over the
| dither algorithm used + color grade. For actual _design_ , I
| tend to use this since I'm already in PS cobbling together an
| image, and you can tweak the results in realtime to dial it in
| how you want.
|
| I also have used didder [1] a couple times for dithering via
| CLI / script. Its results can be pretty good too, just more for
| repeatable batch operations and you need to make sure your
| palettes and chosen algorithms will produce what you're
| actually looking for.
|
| [0] https://news.ycombinator.com/item?id=45726845
|
| [1] https://github.com/makew0rld/didder
| shrinks99 wrote:
| Cole (the author of didder) also has a GUI version called
| Dithertime: https://makew0rld.itch.io/dithertime
| rikroots wrote:
| I responded in that post (though not to you, and probably not
| what you're after) with a link to my JS canvas library's
| "reduce palette" filter. It includes both supplying an array of
| colors to act as the palette, and setting the required number
| of colors for which the filter can calculate a "commonest
| colors" palette, calculating color distances in the OKLAB color
| space - https://scrawl-v8.rikweb.org.uk/demo/filters-027.html
|
| If anyone wants to see the filter code, it in the GitHub repo
| here: https://github.com/KaliedaRik/Scrawl-
| canvas/blob/064469928a3...
| K0IN wrote:
| Hei, if someone wants to implement this, feel free to contribute
| this to my Phomemo M02 (a cheap < 15$) black and white thermal
| printer, web app.
|
| https://github.com/K0IN/Phomemo-M02-Web
| agarv wrote:
| Since I see you're using Vue, I created an MIT licensed
| dithering web app with Vue. I've never tried to embed it in
| anything, but you're welcome to give it a shot.
|
| https://github.com/allen-garvey/dithermark
| joefourier wrote:
| Beautiful demo, but I'm not sure it's accurate to call dithering
| an "illusion" of more shades than is available?
|
| If you apply a low pass filter to a dithered image, and compare
| it to a low passed filtered thresholded, you'll see that the
| "illusory" shades are really there in the dithered version,
| they're just represented differently in the full resolution
| image.
|
| Similarly, a class D amplifier emits purely off/on pulses before
| a low pass filter is applied, but no one would call the output an
| auditory "illusion". In the case of image dithering, isn't the
| low pass filter your own vision + the distance to the screen?
| hatthew wrote:
| I would call it an illusion because if you pay attention you
| can clearly see that the color you perceive isn't actually
| present. You can see white on an RBG computer screen since your
| eyes simply don't have the resolution to discern the subpixel
| colors. However, in a dithered image with only black and white,
| you perceive gray, but you can also tell what the reality is
| without much effort. Personally, I think that fits the
| definition of an illusion.
| dsamarin wrote:
| Do you consider the color yellow on your RGB monitor an
| illusion? (I do)
| zamadatix wrote:
| Same. A fun fact about this is as you increase the bit
| depth, the percentage of faked outputs actually increases
| as well. With just 8 bits, you have more 9's than AWS this
| year!
| TuxSH wrote:
| You can also add a temporal dimension (-> temporal
| dithering, also known as FRC).
|
| For example if you alternate blue and red every frame at
| 60~120 FPS, the only thing you'll see is purple.
| hunter2_ wrote:
| This is halftone (i.e., an apparent palette with more colors than
| the actual palette, by ensuring that you aren't just rounding the
| same way everywhere) but it isn't dithering in my opinion. To me,
| dithering means fading away the banding that occurs when the
| palette (or the apparent palette achieved via halftone) isn't
| large enough to avoid banding on its own.
|
| The halftone technique demonstrated here takes a palette of 2
| colors and increases it to something on the order of 20 apparent
| colors, but even with 20 there are extremely obvious bands.
|
| That banding can be virtually eliminated by having way more
| colors (say, 256 if grayscale, 256^3 if RGB) or it can be
| virtually eliminated via dithering. I suspect the "error
| diffusion" technique (which is teased at the end of this demo)
| does what I'm talking about.
|
| Noise is the key to dithering, and I don't see any noise in this
| demo. Everything is deterministic.
|
| But the presentation is spectacular!
| monitron wrote:
| You made me curious. It looks like dithering is still an
| accepted name for this kind of technique:
| https://en.wikipedia.org/wiki/Ordered_dithering
| jzacharia wrote:
| I've been working on an implementation of this in Rust actually,
| weird timing. Cool article.
| shrinks99 wrote:
| A friend of mine wrote one for Go with the goal of creating the
| best and most complete dithering library out there and I think
| he did a decent job. Worth a look if you're looking for
| reference implementations!
|
| Here's his: https://github.com/makew0rld/dither
___________________________________________________________________
(page generated 2025-10-29 23:00 UTC)