Halftone effect with filters

General discussions about Inkscape.
Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Halftone effect with filters

Postby Lazur » Tue Jun 07, 2016 8:03 am

split from this topic:
viewtopic.php?f=6&t=27931

Espermaschine wrote:
Lazur URH wrote:May worth mentioning the same look can be reproduced by filtering too.

Similarly as described in the hatch/crosshatch topic.

Hmmm, i had a look at that thread again. No idea how do it with a filter, and especially with dots...

Show us please !



It is on my list...


Though it is a bit complicated starting it off.

So as in the topic mentioned the idea was breaking down the original image source to tone levels.

For that, you can make a "threshold filter".
With a colormatrix, convert luminance to alfa
then you need inverting it
so two flood fills with black and white and
two compositing in "in" and "over" modes
then another colormatrix with luminance to alpha.

After that, with a component transfer, on the alpha values you can adjust the slider for the amount of threshold.

That is one basic part of it.


The second one, is pulling in another source for the "hatching pattern" -if you don't want to use turbulence to generate something random.
So draw an object with a dotted pattern/square pattern fill,
then generate different variants of it for the tone levels.
Darker tone=larger covered area=expand the image.
With the dots you can use blurring and tone adjustment, for squares, the dilate option can work.



Now, if you want to break the effect down to twelve tone levels for example, that would mean
generating 12 different version of the image pattern and defining 12 tone levels of the original image source, then
compositing each of the pattern in the different tone levels,
atop eachother,
within the same filter...


With the current editor, that is not an easy one yet possible.

Like, this one uses 10 tones and 10 flood fills for a gradient map effect.
If you change each flood fills to a variant of the same pattern, it would work just as described.
Maybe only difference is that it would need more tone adjustment for each tone to avoid fading.

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Halftone effect with filters

Postby Espermaschine » Tue Jun 07, 2016 8:07 am

I do gt the basic concept, but it sounds awfully complicated.

How do you prevent halftone shapes from getting partially cut off by the masking ?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Halftone effect with filters

Postby Lazur » Tue Jun 07, 2016 8:49 am

By adding more tone levels you can make it finer.

Or by adding a blur filter on top of it all and a component transfer to eliminate the fading, you can smooth out the result.

The idea is then you can make a bitmap copy of the shape and trace bitmap if a vector object is necessary, which would also get rid of some cluttered parts.

Well that was a good question, have to admit didn't really think of that.
But with the dots I guess you can make it right with the mentioned blur method.
Needs testing.

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Halftone effect with filters

Postby Espermaschine » Tue Jun 07, 2016 8:57 am

Looking forward to what you come up with !

This is way beyond my capabilites.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Halftone effect with filters

Postby Lazur » Wed Dec 07, 2016 5:14 am

If anyone interested, made a "newsprint" filter for the hatching challenge.
With sources of a dotted pattern it can be used for a halftone effect on the lightness levels.
-It was easier not splitting the rgb values and component transfering each level because it is too complicated to edit it right now as it is, without other 100+ new filter primitives in the chain.-

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Halftone effect with filters

Postby Lazur » Wed Dec 07, 2016 7:39 am

Image

Image

Image

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Halftone effect with filters

Postby Lazur » Wed Dec 07, 2016 10:05 am

Image



Image



Image


Just to clarify these are based on 16 tone levels and in the filter used there are 157 primitives rigged together.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Halftone effect with filters

Postby v1nce » Wed Dec 07, 2016 10:27 pm

157 primitives ?
Filter is custom made (plain text edition) or through inkscape ? (I almost gave up filter design in inkscape because of all the bugs and limitations)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Halftone effect with filters

Postby Moini » Thu Dec 08, 2016 1:05 am

These are awesome :) How long did it take you to make just one of them, Lazur?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Halftone effect with filters

Postby Lazur » Thu Dec 08, 2016 2:13 am

v1nce wrote:157 primitives ?
Filter is custom made (plain text edition) or through inkscape ? (I almost gave up filter design in inkscape because of all the bugs and limitations)


Through inkscape, haven't looked into how they are made with a notepad.
Have used notepad++ before at some point of these to replace "discrete" with "table" but other than that, seems the references for each primitive is almost impossible to track in such a filter.

The biggest issue for me in the editor is that the navigation is painfully slow. New primitives are added at the bottom and the panning can take even minutes.


Moini wrote:These are awesome :) How long did it take you to make just one of them, Lazur?


Not sure how long. Probably the rigging takes the most time, making variants are just a few click away.


Return to “General Discussions”