Close
Asset

CMYK Halftone Dot Filter

I am currently creating the promotional artwork for an event (called "Bottomless Brunch") with a concept based around old magazines. For this, I wanted to apply a CMYK half-tone filter to the images used for promotional text, both with very high dot resolution to add a realistic print-like texture and very low resolution for a more Roy Lichtenstein-style painterly effect. Each of C, M, Y and K dots are at different rotations, which is currently not configurable. This is historically how real print was handled. Dots can overlap with one another, which is inaccurate to how halftone works in print but can provide more pleasing results visually.

Possible future extensions would include allowing colour sets other than CMYK, for better emulation of Lichtenstein for flat colours and for other creative effects. While the filter was prototyped using a TouchDesigner node graph, it has been optimised to just be a GLSL shader (see my ShaderToy port here) and so we can have more than 4 channels since it is not limited by the max channels in a texture.

Explanation of parameters

  • Frequency - The resolution of dots.
  • Frequency Axis - Whether Frequency refers to Y axis or X axis, with the other being calculated with the image's aspect ratio.
  • Lum vs Maxrgb - Whether black levels (K) are calculated from luminance or the maximum of R, G, and B. The latter gives more consistent and accurate results, whereas the former can give more creative control, especially when using other controls to desaturate the image.
  • Balance - The individual multiplier for C, M, Y and K dot sizes respectively.
  • Angles - The angles that each of the dot grids are rotated at.
  • Offset - The distance that each layer is moved, applied before rotation so each colour separates from one another subtly.
  • Dot size - The maximum possible diameter of dots. For most realistic results, this should be set to sqrt(2) / 2, which is the default.
  • Saturation - The multiplier for saturation. Low-saturation dots are made smaller in order to make a more visually-appealing effect of bleaching to white, setting this value higher makes this effect weaker.
  • Alpha Saturation - Increase how quickly dot size reduces for coloured dots when compared to K (black) dots. This can prevent artifacts around soft edges for some images, or it can just provide a more pleasing-looking drop shadow.
  • Exponent - The power to which dot size is raised by when doing final dot size calculations. Essentially making this higher increases contrast, while lowering it decreases contrast.
  • Alpha Exponent - Dot size will be multiplied by alpha raised to this power.
  • Reduce Color - The threshold at which coloured dots appear. Dots above the threshold will be scaled from the range threshold..1 to 0..1.
  • Lightness - Same as Reduce Color but for K dots
  • Luminance Multiplier - Multiply the inverse of the value for K by this amount, essentially this corresponds to brightness, but unlike using a Luma Level TOP it will not affect calculation of C, M and Y dot sizes, only the size of K dots.
  • Darkness Saturation - Lowering this will desaturate areas with high K more, which can reduce artifacts where very dark areas can have bright coloured pixels around the black dots. For most cases this can be left at 1.
  • Noise - Adds a noisiness to the borders of dots for extra texture. This is useful when trying to emulate the effect of dots being printed onto paper.
  • Background Threshold - The alpha threshold at which the background will appear. While you can set this to greater than 1 in order to remove the background, the more effective way to do so is to use the separated dot/background outputs, outputs 2 and 3. Dots can still spill out over the edge of the background, which is useful for things like drop shadows.
  • Background Softness - The amount by which alpha values between 0 and the threshold are turned into fuzzy edges for the white background.

Asset Downloads

cmyk.tox (13.5 KB)

Comments