filters in progress

Post unfinished work here for feedback and advise.
Lazur
Posts: 4644
Joined: Tue Jun 14, 2016 10:38 am

Re: filters in progress

Postby Lazur » Tue Oct 31, 2017 11:26 am

halftone filtering template

-click to download the svg-

Image

As easy as that sounds.
This is the filter I was using in the response video here.

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

Re: filters in progress

Postby Moini » Wed Nov 01, 2017 1:41 am

For confusing people less, I'd make the file's background color white transparent, and change the order of the steps, so that tracing is done after moving the bitmap copy somewhere else and removing the filter - else it looks like it's going to be applied twice, once fixed in the bitmap, and once via layer - and while we know that trace bitmap ignores that, it may confuse users.

Yet, a nice and simple - and absolutely functional - tutorial :) Thanks, Lazur, for preparing that with instructions!
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: 4644
Joined: Tue Jun 14, 2016 10:38 am

Re: filters in progress

Postby Lazur » Wed Nov 01, 2017 3:11 am

Thank's for the feedback!

Points taken:
Image


However kept a toned down checkerboard so that transparency is less confusing.
And, with this process it may still be, since the original raster image filtered is rendered below the path.
Maybe invert selection (!)
delete raster image (Del)
select all (Ctrl+A) should be added in before the 3. mentioned step?

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

Re: filters in progress

Postby Moini » Wed Nov 01, 2017 3:41 am

One could add to move it manually, perhaps? 'Grab raster copy and move to the side' or something like that? Or use a fully opaque white background.
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)

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: filters in progress

Postby Raspi » Wed Nov 01, 2017 6:31 am

Is it possible to use this template with other patterns ?

It seems to me, the stripes are made of a gradient.

What about the classic halftone dot pattern ?

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

Re: filters in progress

Postby Lazur » Wed Nov 01, 2017 8:28 am

Raspi wrote:Is it possible to use this template with other patterns ?

It seems to me, the stripes are made of a gradient.

What about the classic halftone dot pattern ?


This template was dedicated to that particular diagonal "hatching" pattern.
To be as "fool proof" as possible.

BUT the basic concept can be used in many other ways.
Not just like zebratrace, but as "liontrace".

The process is the following:
filtered object is broken down to luminance levels,
a base pattern is pulled in which then is modified to represent different lightness values by component transferring
and each of the generated tones are composited with the levels of the original filtered object.

Using a simple gradient is the easiest of all, and without artifacts.
As with the process, the levels of the filtered object doesn't exactly match with the pattern pulled in -resulting in half filled dots and deformed shapes after tracing in a dot pattern -like in this image.

To avoid this, the levels of the filtered object would need to be "re-sampled" to the same raster as the pulled in image.
Haven't quite figured it out myself yet, how to downsample an image with a pixellate filter. My best bet would be zooming in and than out again with displacement map filter primitives.

Another problem with the dot pattern would be some gamma correction of the luminance levels.
Meaning, the linear gradient pulled in into the filter covers each luminance level with the same area. Unlike a radial gradient.

Will try to make a proper dotty halftone sometime.

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: filters in progress

Postby Raspi » Thu Nov 02, 2017 2:45 am

^
This is all over my head, but when you make a duplicate of the diagonal stripes gradient, flip it and set the mode to 'Difference', then apply a Blur and some sort of Levels/Curves, you will get dots, right.

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

Re: filters in progress

Postby Lazur » Thu Nov 02, 2017 10:28 am

Can generate dots but can't ensure the result will be perfect circle shaped dots unless resampling the image to the same raster as the halftone pattern.
Like it's more evident on this image:
Image
Notice how the bottom left edge of the apple cuts in half the halftone pattern.

Found this example for a pixelate filter. Other examples also use the tile filter primitive which doesn't work at the moment.
(Once it will, then making seamless patterns will also be possible.)
Found this post By Tavmjong mentioning it wasn't working in 2015. Maybe worth a bug report if there isn't one already. Developers are probably well avare of the problem.


Edit:
tried to make one pixelate filter manually with no tile filter primitive with not much outcome.

Concept was to pull in a "mask" with the image filter primitive and composite in every third pixels of the filtered object,
then offsetting the result by 1 px in each direction to have 4 variants and compositing them atop eachother.
Repeat the process with 1 px offsetting of the pulled in image and average the four results into one.

"Sort of" works:
Image
Image

-except when the zoom level is not at 100%, rendering gap issues appear of anti-aliasing

Other notes.
The pulled in "mask" image cannot be a pattern filled object of poor rendering performance. As that pattern would be 2/2 px, it blacks out.
Therefore using two repeating gradient filled objects instead.
With the mentioned process a 1/1 px grid can be downsampled to 2/2 px.
For the 4/4, another mask is necessary on an already processed image and basically repeating the same steps.
Had gone 1 step forward than what's in the screenshot but there was a problem of offsetting somewhere and it is unmanageable to find and correct any errors.

One processing could also work, like, pulling in a mask image with a grid of 5/5 px, with only 1 px opaque out of the 25 and using that for compositing but it takes way more effort and is very error-prone.


Without the downsampling the same problem apply on the pulled in halftone pattern.
For the dots, a 1/1 px square with a radial gradient sqould be converted to a pattern fill, and such a small pattern just glitches.
Maybe if everything was scaled up many times...
Too many compromises, it doesn't fit with a working solution.

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

Re: filters in progress

Postby Lazur » Wed Nov 15, 2017 1:48 pm

An update to the halftone concept.

Image

Image

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

Re: filters in progress

Postby Lazur » Thu Nov 16, 2017 7:29 am

Just finished a sayagata/swastika pattern that can make a good use with a halftone template.
Also it was a perfect source for testing woodgrain textures.

Image

Image

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

Re: filters in progress

Postby Lazur » Tue Nov 28, 2017 3:43 am

Lazur wrote:Can generate dots but can't ensure the result will be perfect circle shaped dots unless resampling the image to the same raster as the halftone pattern.


Still no solution for the resampling.

This time, made a heart-shaped halftone screening template here. Too bad openclipart couldn't render a proper thumbnail with inkscape 0.91...

The screening pattern looks something like this:
Image
Which means a square downsampling would't be suiting either.

Anyway, here is a little something made with the template:
Image

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

Re: filters in progress

Postby Lazur » Mon Dec 04, 2017 2:50 am

"In action" shot of some of the previous packs.

Image

-This one is actually animated but it takes too much resources to render that I'm not embedding the svg for now.

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

Re: filters in progress

Postby Lazur » Sat Jan 05, 2019 10:38 am

Another chalkboard filter setup.


Image

Image


full size

detail


svg source


On a side note, what site do you use for hosting raster images hotlinked on the forum?
Deviantart seems not working as previously, inkscape.org doesn't even provide full size view at the moment. My dropbox is also full.

Edit: added in the images from deviantart.

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

Re: filters in progress

Postby Moini » Sun Jan 06, 2019 1:01 am

Lazur, can you describe the issue you have with inkscape.org? Copying the address given in the download link (the downward pointing arrow) worked for me previously.

DA works, too - right-click on the image, and select to 'copy the graphics url' (or whatever that is in Hungarian in your browser).

Commonly used image hosters are imgur.com or imgh.us (for example).
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: 4644
Joined: Tue Jun 14, 2016 10:38 am

Re: filters in progress

Postby Lazur » Sun Jan 06, 2019 1:34 am

Moini wrote:Lazur, can you describe the issue you have with inkscape.org? Copying the address given in the download link (the downward pointing arrow) worked for me previously.

DA works, too - right-click on the image, and select to 'copy the graphics url' (or whatever that is in Hungarian in your browser).

Commonly used image hosters are imgur.com or imgh.us (for example).



Deviantart previously didn't have a permanent url for the uploads as per se. Right click-copy url would end up broken.
Then there was the option to click the download button which opened the original image in a new window. There you could copy a permanent url.

That's how that japanese castle image was embedded above.

Its url was

Code: Select all

https://orig00.deviantart.net/380d/f/2017/318/a/e/japanese_castle_by_lazururh-dbtsc2y.png

Whereas the right click-on page url is

Code: Select all

https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/intermediary/f/dfb430a7-2410-42ab-9748-17ff0353bac5/dbtsc2y-29eb414d-ded8-4c8e-87b3-e0b25640392d.png



With that chalkboard letter, the "on page" url is

Code: Select all

https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/intermediary/f/dfb430a7-2410-42ab-9748-17ff0353bac5/dcw8cr4-284d6b63-d1e9-437b-9961-ea2417a7547b.png

[s]while the download page has an url of
[/s]
used to have a very loooong url containing a token number -assuming it had somekind of automation to generate a new url from time to time preventing hotlinking.

But checking today the download button now seems to work as "expected" and downloads the image locally instead opening the original image in a new window?
Strange.

Besides these they have another option to share using the "link" provided

Code: Select all

http://fav.me/dcw8cr4

which is supposedly possible to be embedded within appropriate html tags. But without a mimetype it doesn't seem to work with phpbb tags.


The issue with the inkscape gallery is on this page.
There is the magnifier glass icon below the image which opens https://media.inkscape.org/media/resources/file/L62.png,
with the message
403 Forbidden
nginx/1.12.2

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

Re: filters in progress

Postby Moini » Sun Jan 06, 2019 3:50 am

Thanks, Lazur. That's a bug. Up to now, we had it fixed on an individual basis (only seemed to affect a single picture). Seems like it will need a more general approach, though.

Would you mind reporting to https://gitlab.com/inkscape/inkscape-web/issues ?
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: 4644
Joined: Tue Jun 14, 2016 10:38 am

Re: filters in progress

Postby Lazur » Sun Jan 06, 2019 4:44 am

Moini wrote:Thanks, Lazur. That's a bug. Up to now, we had it fixed on an individual basis (only seemed to affect a single picture). Seems like it will need a more general approach, though.

Would you mind reporting to https://gitlab.com/inkscape/inkscape-web/issues ?


Done.

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

Re: filters in progress

Postby Moini » Sun Jan 06, 2019 6:29 am

Thank you, 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)


Return to “Work in progress”

Who is online

Users browsing this forum: No registered users and 0 guests