1

My goal is to have a shader-setup where i can control a Halftonepattern with an Image/ graphic as a greyscale input. Do I miss something?

enter image description here

3 Answers3

2

I don't know if this is what you mean you can use a Math node and set it to 'Less than' then connect the Voronoi texture, and then with the value you can adjust the dot sizes

enter image description here

Edit 1

Thanks, Gordon Brinkmann for correcting me here is a halftone pattern:

enter image description here

enter image description here

Edit 2

This one works But it turns your Image into grayscale:

enter image description here

Right one enter image description here

Left one enter image description here

Faris
  • 149
  • 3
  • 1
    Now you only need to control the size for the dots individually with a greyscale texture instead of uniformly for all, because that's what the question is about, how to get the greyscale information to the dots. – Gordon Brinkmann Mar 26 '24 at 21:01
  • Thanks, I can see the question better now – Faris Mar 26 '24 at 23:22
  • Hm, okay I hoped you had a better idea about how to create a real halftone shader... I can't find one either. This one looks okay with a gradient, but not with a real greyscale image. The problem is, a real halftone image has only circular dots, varying in size. In dark areas they may become so large that they are overlapping neighbouring dots. With a greyscale image these dots might become irregular and not strictly circular anymore or, when you rasterize the image according to the dot size, the larger dots will simply be cropped. – Gordon Brinkmann Mar 27 '24 at 11:24
  • I'm not good at English does he mean to have his Image turned into halftone dots or what? something like a halftone filter? – Faris Mar 27 '24 at 13:35
  • Yes, that's what he is basically asking - that's why he says "halftonepattern" in his question. – Gordon Brinkmann Mar 27 '24 at 13:39
  • Ok i will try to do it – Faris Mar 27 '24 at 13:42
  • I made it! It's a halftone effect now – Faris Mar 27 '24 at 14:57
  • No. A halftone pattern would it be if the greyscale value of the image would determine the size of a completely black dot. Like you had before with the gradient, only that this gives no clean circular dot results with a greyscale image. – Gordon Brinkmann Mar 27 '24 at 15:30
  • I don't understand what you guys trying to do :\ – Faris Mar 27 '24 at 16:06
2

The 'Screen' Blend Mode in digital color mixing is so called because it simulates the old litho film half-toning technique. It inverts both input colors (image & screen), multiplies them, and inverts the output. In this case, the halftone screen is provided by the 'Distance' output of regular Voronoi cells.

The 'Screen' output can be put through a threshold as shown here, to simulate greys where only black ink is available:

enter image description here

Adjusting the Greater Than threshold is analogous to a brightness control, Adjusting the Mix factor, roughly speaking, contrast.

Two options are shown for the Vector input of the image.The 'Position' output of the Voronoi will sample the image exactly at the center of each dot, unlike the old printing process. It results in perfectly circular dots. Sampling the image at every shading-point results in irregularly shaped dots:

enter image description here

Regular dots may be better for cleaner typography, irregular for 'newsprint' greyscale:

enter image description here


Edit: in response to commentary

Using the hex-tiling group discussed and downloadable here you can get a hexagonally tiled screen:

enter image description here

  • Sampling at hexagon centers gets you circular dots.
  • Sampling at all UV gets you broken circular dots.
  • Using inverted distance-from-edge as your gradient-per-cell gets you hexagonal dots.

Robin Betts
  • 76,260
  • 8
  • 77
  • 190
  • I would really like a way to get the perfect circular dots. I'm not on a PC to check your version... can you get overlapping dots with a radius greater than half the distance between the dots or are they cropped? – Gordon Brinkmann Mar 27 '24 at 19:19
  • 1
    Hello, @GordonBrinkmann Spotted! They are, indeed, clipped to their square tiles. The only way I can think of to get round that would be to overlay offset checkerboard grids. Or, at least, a hexagonal grid would pack. The physical halftone screens I worked with hhrmph years ago for monochrome were hex-packed, and AFAIR, with slightly elliptical dots .. something to do with a better mapping of contrast, taking the behaviour of ink into account. – Robin Betts Mar 28 '24 at 05:22
  • Actually I do not care if it's like ink, I just try to somehow get circular dots :D I've been experimenting with this for a while, the best way to get what I want is instantiating scaled circles on a grid in Geometry Nodes which can overlap, and although the control of sizing etc. is very good it is not very practical as a texture... the irregular Voronoi dots look at least realistic if one wants "ink" and of course due to irregularity the original image becomes a bit clearer. The cropped dots look the worst. Or I have to keep them small enough, then it's the closest I get to the GN result. – Gordon Brinkmann Mar 28 '24 at 09:15
  • Here are my experiments so far... the Photoshop result is just an example where it uses the overlapping dots in dark areas. There are horizontal and vertical lines visible, but that's because I disabled the default grid rotations per channel. Of course it was not possible to match everything to look totally similar, therefore the methods are too different. I've intentionally kept it at a lower resolution so that the rasterizing dots are better visible rather than trying get a good looking image. halftone experiments – Gordon Brinkmann Mar 28 '24 at 09:24
  • @GordonBrinkmann I'll edit into this,.. no harm in a more comprehensive answer. – Robin Betts Mar 28 '24 at 11:44
  • Changing the Mix mode to screen helps a lot to achieve what I wanted, with some extra tweeks I even get it mostly to work in a hexagonalshape, but that got me into new additional issue. See my own answer. Maybe you now how to fix that aswell? – vp.gestaltung Mar 29 '24 at 13:28
0

I may have found a mostly working way to make it into an hexagonal shape. I combine the comments here and a video about how to make a simple vector based-Hexagonal pattern, to get there.

I still get a random artifact per cell in the corners, maybe someone knows how to fix it? Scaling, Clamping, shifting the white via colour-ramp doesn't do the trick, maybe I miss something or the correct parameter?

Small sidenotes: I need to invert the image so it works correct. For easy copying my steps the value besides 0.5 is sqrt(3)/2

HexShape

HexShape artifact

  • Hi there.. I'm not sure if this is a self-answer, or extension to your question. If the latter, it shouldn't really be in the answer section of an SE page, perhaps you can edit your original post to make that clear. I will extend my own answer to demonstrate hex-halftonong. Do you want circular dots or hexagonal dots? – Robin Betts Mar 29 '24 at 15:21
  • (Still learning how to use the forum correctly), I would say its some followup to both; a next step as extension to my question, but at the same time a answer on what I got from the Answers/ comments here.

    I want circular dots, but in a hexagonal pattern.

    – vp.gestaltung Mar 29 '24 at 15:54
  • 1
    OK, done. See edit to my post. – Robin Betts Mar 29 '24 at 16:16