4x4 Ordered dithering (blend file included)

(Xard) #1

Time for another node test: I played around the idea about doing proper dithering completely inside blender just by using compositing nodes and here’s the result:

Rendered at 160x200 (honoring c64 double wide pixel aspect):

The dithering uses ordered 4x4 matrix implemented via math nodes, it’s probably the least effective way of doing this but hey, it can be done!

It would be really cool to actually fit the end result to a fixed palette but doing with plain math nodes would be a total performance killer and i’m open to alternative ways to handle it inside compositor nodes.

The compositor nodes have a switch to show external images if you want to just test the output:

And here’s a comparison image between the rendering and output:

And finally here’s the blend file: http://xard.mbnet.fi/blenderartists/b28_4x4_positional_dither.blend

2019-01-19 Update:

  • Fixed silly bug in the compositor nodes which added the glare over images.
  • Fixed last dithering brightness step which didn’t include 1.00
  • Blend file is now compressed dropping its size to half (whoops)

(yogyog) #2

Very nice… I got nice C64 vibes straight away.

I’ve looked at your nodetree, I see your dithering hue and value, but no saturation, which is interesting.

(Xard) #3

Yeah, the last test image containing comparison doesn’t yet have saturation dithering. Actually I tried to get away with static saturation as it would provide real 16 color palette, but there just wasn’t a good single value to stick.I had to fall back to dithered saturation which provides coarse 64 colors.

(yogyog) #4

There’s no direct palitisingness on Blender… I did make this for C64-ising video a little while ago (the video is the late great C64 and folk musician Ben Daglish)

(Xard) #5

Splitting tones and merging them with help of Hue from hsv. That’s actually quite clever way of approaching the problem.

Also nice work with the tribute. Bens music is quite amazing indeed.