heinn's Avatar

heinn

@heinn.dev

🍤 lowpoly shrimp 🍤 heinn.dev 🍤 @filet.group 🍤 Dread Delusion (lovelyhellplace.bsky.social) 🍤

4,311
Followers
140
Following
159
Posts
28.12.2023
Joined
Posts Following

Latest posts by heinn @heinn.dev

(but also, dithering "1 dimensionally" in each dimension of a color space is probably good enough for 99% of cases, but I wanted to find something that dithered to a SPECIFIC palette, not just a per-dimension quantization

actually rambling............

05.02.2026 19:02 👍 7 🔁 0 💬 0 📌 0
Preview
GitHub - dalpil/structure-aware-dithering: Experiments with structure-aware, error diffusion dithering algorithms, and other ways to improve beyond Floyd-Steinberg. Experiments with structure-aware, error diffusion dithering algorithms, and other ways to improve beyond Floyd-Steinberg. - dalpil/structure-aware-dithering

There's probably some search keywords I'm missing, but I'm not sure anyone cares about color dithering anymore....

I wonder if one could just adapt the error coming from stuff like this to a 3d vector however...
github.com/dalpil/struc...

05.02.2026 18:59 👍 8 🔁 1 💬 1 📌 0

Instead, you can find these skewed triangles, pick a point (like the circumcenter) and place a new palette point there to try to break up the triangle. The ACTUAL palette color of that point would be the closest color to it, not the actual color space position.

05.02.2026 18:59 👍 1 🔁 0 💬 1 📌 0

If you actually visualize some palettes triangulations, you'll notice some really long triangles, and those are gonna "capture" a lot of colors nearby. I think the actual correct weights would come from a 3d version of the natural neighbor interpolation, but that's hard to compute

05.02.2026 18:59 👍 1 🔁 0 💬 1 📌 0

this is so the dithering goes dark -> light
And that's you're nearest (in that space), dithered color. If you also imagine squishing the space in the ab dimension, it basically means you have more chroma choices for the next step of the gradient.

this however is not the "true" weight, because...

05.02.2026 18:59 👍 1 🔁 0 💬 1 📌 0

You then find the enclosing tetrahedron, and get the barycentric weights of the target pixel. Those weights represent how much of each palette color the pixel should get. Normalize the weights into a 0 to 1 segment, sort by luminance, and use the dither value at that pixel to pick a sorted color

05.02.2026 18:59 👍 1 🔁 0 💬 1 📌 0

I didn't look too hard but I didn't find anything that was about specifically this. But the idea is : you get a palette, convert it into oklab points. You then uh tetrahedralize those points. When you want to dither a target pixel from an image, you convert it to oklab, and put it in the space.

05.02.2026 18:59 👍 3 🔁 0 💬 1 📌 0

another cool thing is squeezing oklab along the ab dimensions before the dithering, makes things quite TASTY

05.02.2026 17:12 👍 88 🔁 10 💬 1 📌 0
Post image

is everything ok? you've barely triangulated your color space...

05.02.2026 16:58 👍 29 🔁 0 💬 1 📌 0
Post image Post image

which led to discovering funny things like "natural neighbor interpolation". In the end sprinkling some additional fake palette points and just dithering towards the 4 vertices of the enclosing tetrahedron of a target color ended up being more than enough

actually rambling like a mad man

05.02.2026 16:58 👍 25 🔁 0 💬 1 📌 0
Post image Post image

messing with dithering and palettizing again, the main idea being applying the dither to not just a linear ramp, but to all dimensions of the colorspace at once

05.02.2026 16:58 👍 81 🔁 6 💬 2 📌 1

uhhyuuhhuhghuoouhh

31.01.2026 12:45 👍 3 🔁 0 💬 1 📌 0
Post image

happy new uuuuhhh horse year

30.01.2026 17:34 👍 33 🔁 5 💬 0 📌 1

hello? my png?

30.01.2026 17:32 👍 1 🔁 0 💬 0 📌 0
Post image Post image

bonus fog

07.01.2026 18:03 👍 59 🔁 7 💬 0 📌 0

:roe:

07.01.2026 16:25 👍 1 🔁 0 💬 0 📌 0
Post image Post image Post image

bonus cats

07.01.2026 14:36 👍 45 🔁 4 💬 0 📌 0
Post image Post image Post image Post image

good harvest today

07.01.2026 14:34 👍 210 🔁 56 💬 3 📌 0

the most fun part of this has actually been figuring out l-systems and watch them grow

a more fun game could be just writing bacteria dna and watch them grow and compete.......

16.12.2025 15:02 👍 58 🔁 3 💬 2 📌 0
Preview
Tricteria by heinn A microscopic match-3 game

heinn.itch.io/tricteria

16.12.2025 15:01 👍 2 🔁 0 💬 0 📌 0
Video thumbnail

made a little jam game

16.12.2025 15:01 👍 36 🔁 3 💬 2 📌 1

lamés spotted?

07.12.2025 11:34 👍 1 🔁 0 💬 1 📌 0
Post image

bonus bonus shot

03.12.2025 17:21 👍 99 🔁 4 💬 1 📌 0
Post image

bonus shot

02.12.2025 16:08 👍 26 🔁 2 💬 0 📌 0

🥴

02.12.2025 15:54 👍 0 🔁 0 💬 0 📌 0
Post image

why did it rotate the coolest pic...

02.12.2025 15:45 👍 32 🔁 1 💬 1 📌 0
Post image Post image Post image Post image

I simply love squishing buildings

02.12.2025 15:44 👍 42 🔁 5 💬 0 📌 0
02.12.2025 15:44 👍 9 🔁 0 💬 1 📌 0
Post image Post image Post image Post image

I had an intense grass-touching session that's gonna end soon, picked up a camera in the last few days and it's the most fun I've had in a while

02.12.2025 15:43 👍 46 🔁 1 💬 1 📌 1
Post image
30.09.2025 14:13 👍 44 🔁 2 💬 0 📌 0