Pekka Väänänen

Pekka Väänänen

@pekkavaa.bsky.social

Avid reader, computer graphics fan and atmospheric jungle beats enjoyer. Demoscene: cce/Peisik. Blog at https://30fps.net/

1.2K followers408 following361 posts

Pinned

Some of you might know that I've been working on a book. Today I'm happy to announce Palette Programming: A Modern Guide to Color Quantization paletteprogramming.com It's a textbook on how to design palettes and represent images using them. Will be out this year. Code in Python & NumPy.

I updated the table of contents on the book website to match my current manuscript. I put more emphasis on dithering and the early access release will include most of that. I think I've found some pretty interesting stuff not presented elsewhere together :)

I'm still working on the Palette Programming book. I planned an Early Access release for October with roughly half the chapters. But the last few writing sessions I've just spent studying the differences between the impressionist and the divisionist techniques and Frank J. Reilly's palette premixing

The E3 demo in question: www.youtube.com/watch?v=8ZJ4... Naturally, the in-game shots begin with a shiny parallax mapping and Havok physics show :) Followed by Patrick Stewart hype second. Interesting how they had soft shadows in the demo but cut them from the game before release.

youtube.comThe Elder Scrolls IV: Oblivion - E3 2005 DemoOfficial demo of The Elder Scrolls IV: Oblivion by Todd Howard, first shown at E3 2005, published 18 May 2005. The Elder Scrolls IV: Oblivion release dates: - Windows PC: 20 March 2006 - Xbox 360:…

Pekka Väänänen reposted

In ~2007 when coding the ambient lighting of Splinter Cell, I had the idea of storing dynamic SH probes in Voronoi cells, where a) dynamic objects could walk/lerp the face graph, and b) static meshes "palettised" probes per vertex and lerped to give Realtime GI. It never shipped but look how pretty!

Pekka Väänänen reposted

Of all the formats for newsletters, zines and information indexes, I'd honestly have not thought people would use WinHelp format. But Vannevar K has collected hundreds of examples of WinHelp formated documents, all conveniently emulated in Windows 3.1.

I've been racking my brain over linear space dithering. Adding noise sounds simple but how much, exactly? Finally, I found a trick: scale the dither down near zero. Found from Timothy Lottes 2016 slide deck. Attached is an exaggarated example.

Pekka Väänänen reposted

While investigating #voxel rendering alternatives that don't involve generating triangles, I ran into the "Voxel GI with Nested Axis-Aligned Distance Fields" paper. github.com/cg-tuwien/NA... Super promising method, with adapted code, I can render RTAO with 1 billion voxels on an M2 Macbook Air!

Hexagonal-grid dithering looks pretty wild up close, especially the 50% case here. A crop of a figure from "Alpha stable modeling of human visual systems for digital halftoning in rectangular and hexagonal grids" by González et al. 2008.

Pekka Väänänen reposted

Ever wondered what a test card is for? TV signals are encoded in the YUV or YCbCr color spaces. A vectorscope is just the CbCr or UV part of the signal in 2D. Running a SMTPE test card through the scope gives you a zigzag pattern where it visits the center of each primary box in a specific order.

I've read that newspaper-like halftone patterns are laid out in a 45-degree angle because the human eye is less sensitive to that than to straight grid lines. But wouldn't a simpler explanation be that newspaper photos of streets and buildings have straight lines, so a rotated pattern works better?

The Mona Lisa mapped to the Commodore 64 palette by taking only pixel lightness into account. Two algorithms: N-Convex (left) always tries to dither the result while in Knoll's algorithm (right) dither strength can be tuned.

A computer history question: Why didn't VGA support a 256-color 640x400 mode even though a frame would fit in 256 KB memory? I can see a business reason (the IBM 8514/A high-end card introduced at the same time) but is there a known technical justification for not having such a mode?

Some of you might know that I've been working on a book. Today I'm happy to announce Palette Programming: A Modern Guide to Color Quantization paletteprogramming.com It's a textbook on how to design palettes and represent images using them. Will be out this year. Code in Python & NumPy.

Update: added more chapters on dithering and moved some topics out (will publish them online instead). I changed the subtitle of the book to "Invent Your Own Color Reduction Algorithm" (!) to better reflect my intent and its contents since the term "color quantization" doesn't include dithering.

The "popularity" color quantizer is one of the simplest: find the K most used unique colors in the image. That's the palette. I was surprised how well it works when K=256 and the image is reduced to 4-bits per channel before. Even transparencies look kinda OK.