GH Dither

Dithering is a technique to avoid banding or moire patterns. This technique consists in a probabilistic choice of values instead of a deterministic one. Photoshop has a dithering filter called “Spatter”, while Gimp offers precise options for dithering purposes.

However, using an external image editor to reduce the range of a number of values is cumbersome and unnacurate, so I strove to get it right inside of Grasshopper. The strategy lies in creating a weighted list of (0,1) values which will be picked with a random number. One of the issues to get it right is to use a different seed in each value picking.

In this image, you see the cluster in action:

dither3

Here is the inside of the cluster:

dithercluster

Don’t forget to match the Plane domain (-10 to 10) with the Image Sample Settings, as well as selecting Colour Brightness in the channel options.

Undesired results which led to the creation of the above algorithm:

a) R domain of values; b) Banding effect

dither4dither5



All content © Copyright 2024 by Pedro de Azambuja Varela.
Subscribe to RSS Feed