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.
https://www.youtube.com/watch?v=HPqGaIMVuLs (explanation)
"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.
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.
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.
n would be less than 4096, but usually much smaller values (256, 16)
If anyone wants to see the filter code, it in the GitHub repo here: https://github.com/KaliedaRik/Scrawl-canvas/blob/064469928a3...
When editing an image you can choose the 'Reduce palette' option to bring up a way to reduce the number of images used, and the palette reduction panel will let you optionally apply dithering or not.
The dithering algorithm is not selectable but it's worth trying to see if you like it.
Define your palette, then via the dialog spawned through image->format menu, pick your palette from the list.
I do agree it would be nice to extend gimp to do all sorts of fancy dithering, and imagine it's just that nobody has put on the work yet.
Here's his: https://github.com/makew0rld/dither