hatch, crosshatch, rendering challenge
hatch, crosshatch, rendering challenge
Idea came from this topic.
Let's try rendering shades in monochrome shapes.
Wether it's in the style of a pencil crosshatch, or an engraved print, or something pointillistic, anything goes.
For example:
Admittedly in the mentioned topic a solution was requested, it's more of a personal try-and-error and personal taste related, so decided to start this topic here, and not at the tips and tricks section, so others can join in.
Let's try rendering shades in monochrome shapes.
Wether it's in the style of a pencil crosshatch, or an engraved print, or something pointillistic, anything goes.
For example:
Admittedly in the mentioned topic a solution was requested, it's more of a personal try-and-error and personal taste related, so decided to start this topic here, and not at the tips and tricks section, so others can join in.
Re: hatch, crosshatch, rendering challenge
A general idea about the implementation*:
It is the light background that can represent the lightest tone,
and a solid fill of the used material (ink, charcoal, graphite...) is representing the darkest tone.
Each shade in between is represented by both the background and the "strokes".
The human eye -and also computer rendering- averages the black and white amount in each ideally small area.
Thus, there are two thing necessary:
breaking down the image to tone levels and
creating different methods of separate tones.
*(by captain obvious)
To get the tone levels right, reducing the saturation of a reference image/making it greyscale is a good start.
There are alot of ways of doing the etching, as for the tones seen can be represented in countless ways.
Which can also have automated solutions.
For example, these look pretty good:
using blender's shaders to generate hatching
http://alshonours.blogspot.hu/2012/11/another-cross-hatching-test.html
opengl hatching shader
http://www.yaldex.com/open-gl/ch18lev1sec1.html
While, on the other hand, manual work and practicing can have that extraordinary look:
http://keithwitmer.com/styles/pen-and-ink-crosshatch-illustrations/
It is the light background that can represent the lightest tone,
and a solid fill of the used material (ink, charcoal, graphite...) is representing the darkest tone.
Each shade in between is represented by both the background and the "strokes".
The human eye -and also computer rendering- averages the black and white amount in each ideally small area.
Thus, there are two thing necessary:
breaking down the image to tone levels and
creating different methods of separate tones.
*(by captain obvious)
To get the tone levels right, reducing the saturation of a reference image/making it greyscale is a good start.
There are alot of ways of doing the etching, as for the tones seen can be represented in countless ways.
Which can also have automated solutions.
For example, these look pretty good:
using blender's shaders to generate hatching
http://alshonours.blogspot.hu/2012/11/another-cross-hatching-test.html
opengl hatching shader
http://www.yaldex.com/open-gl/ch18lev1sec1.html
While, on the other hand, manual work and practicing can have that extraordinary look:
http://keithwitmer.com/styles/pen-and-ink-crosshatch-illustrations/
Re: hatch, crosshatch, rendering challenge
Hi Lazur.
Quote;
Have been watching the "original" topic - eagerly waiting for a description on how to do this,
"sometime" has come.
PLEASE share!!
RGDS
Ragnar
Quote;
Idea came from this topic.
Will try to finetune the technic a bit and share the details sometime.
Have been watching the "original" topic - eagerly waiting for a description on how to do this,
"sometime" has come.
PLEASE share!!
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: hatch, crosshatch, rendering challenge
ragstian wrote:"sometime" has come.
To start it off, I will use this image:
http://www.publicdomainpictures.net/view-image.php?image=382&picture=borovi-cone&large=1
The strokes will be all parallel ones (as much as possible), and their width will vary.
Thicker strokes --->dark shades;
thinner strokes --->highlights.
The limitation is, that by no means there will be infinite number of different stroke widths as this process is just semi-automated.
To "fine tune" the image in the last stage, I will use the auto-trace function -which will make smoother transitions out of any too obvious jaggedness.
That means, to make distances between the strokes at least about 15 pixels.
To generate something close to parallel lines that can cover the whole raster image, I'm using the stitch subpaths live path effect, and adjusting the number of subpaths in the lpe tab so that with a 20 px stroke width it will result in an almost solid fill.
Other solution can be to use a hatching live path effect, but that cannot provide a solid fill (there are parts more dense than others).
For the example, five shades will be used --->five duplicants of the (preferably clipped) path to make, with stroke widths of 20 px, 15 px, 10 px, 5 px and 1 px.
More shades could make it smoother, but at some point it wouldn't show up when auto-tracing the result.
Then, these will be stacked upon eachother later on.
Which means, unnecessary parts will need to be either masked or clipped out.
In this example there are five duplicans of the result of the autotrace, and paths are recolourised to have one shade white and the rest black.
After that, they are applied as masks over the right tones drawn previously.
Which needs a bit more attention, or you will end up with inverted colours.
Then the rest is aligning all five masked paths above eachother, adding a solid white filled rectangle to the bottom,
maybe adjusting -surely needs some, the stroke widths could have been better chosen to match the actual tones of the raster image- the stroke widths a bit.
Grouping objects together, creating a bitmap copy and auto-tracing with one scan.
Here is the svg result, with all the stages kept inside:
https://openclipart.org/detail/210881/semi-automatic-hatching-by-lazur-urh-210881
Hope it does make sense.
Re: hatch, crosshatch, rendering challenge
Hi.
Wow, easy and complicated at the same time!
Have to try this asap!
Thanks a lot, really appreciated!
Merry Christmas to you and all of "Inkscapers!"
RGDS
Ragnar
Wow, easy and complicated at the same time!
Have to try this asap!
Thanks a lot, really appreciated!
Merry Christmas to you and all of "Inkscapers!"
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: hatch, crosshatch, rendering challenge
Merry Christmas!
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: hatch, crosshatch, rendering challenge
i tried it
its quite fiddly to clip five different hatches with five stacks of the trace
i ended up using five layers
took me a second round to realize its best to start with one basic hatch, and then duplicate and thicken the stroke-width increasingly
its quite fiddly to clip five different hatches with five stacks of the trace
i ended up using five layers
took me a second round to realize its best to start with one basic hatch, and then duplicate and thicken the stroke-width increasingly
Re: hatch, crosshatch, rendering challenge
Thanks Lazur!
Already downloaded, digging in, and trying to understand.
It looks like the short version is that the 5 paths from the autotrace are used to clip/mask the Stitch Sub-paths paths. But when I release the masks, it seems like a group was used to mask, and I don't know how that can happen. I thought only 1 path could be used to clip or mask. Or is it the other way around? Could the sub-paths path be used to clip the auto-traced group? That doesn't seem right either, though.
Oh wow -- you CAN use a group as a mask!
But why? Why not just clip 1 set of subpaths with 1 autotrace path? And do that with each of the 5 traces? Why use a group and mask?
Thanks
Already downloaded, digging in, and trying to understand.
It looks like the short version is that the 5 paths from the autotrace are used to clip/mask the Stitch Sub-paths paths. But when I release the masks, it seems like a group was used to mask, and I don't know how that can happen. I thought only 1 path could be used to clip or mask. Or is it the other way around? Could the sub-paths path be used to clip the auto-traced group? That doesn't seem right either, though.
Oh wow -- you CAN use a group as a mask!
But why? Why not just clip 1 set of subpaths with 1 autotrace path? And do that with each of the 5 traces? Why use a group and mask?
Thanks
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: hatch, crosshatch, rendering challenge
Should we discard the image at the very end or not = should it be vector only ?
If not here's my contribution (using filter only, no trace or extension)
Why can't we upload image to this thread ? (I had to hijack the initial thread to host my file)
This is weird for a show it off thread
EDIT: oops. Didn't see the monochromatic limitation. Will upload another verion
If not here's my contribution (using filter only, no trace or extension)
Why can't we upload image to this thread ? (I had to hijack the initial thread to host my file)
This is weird for a show it off thread
EDIT: oops. Didn't see the monochromatic limitation. Will upload another verion
Re: hatch, crosshatch, rendering challenge
As I've posted many, many times, over the years, only a few boards on this site allow attachments. I guess Lazur did call this a challenge, but like other drawing challenges/contests that we've posted (in this board called "Competitions" even though they aren't really competitions) you have to embed the image into your message (i.e. find your own host).
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: hatch, crosshatch, rendering challenge
brynn wrote:Thanks Lazur!
Already downloaded, digging in, and trying to understand.
It looks like the short version is that the 5 paths from the autotrace are used to clip/mask the Stitch Sub-paths paths. But when I release the masks, it seems like a group was used to mask, and I don't know how that can happen. I thought only 1 path could be used to clip or mask. Or is it the other way around? Could the sub-paths path be used to clip the auto-traced group? That doesn't seem right either, though.
Oh wow -- you CAN use a group as a mask!
But why? Why not just clip 1 set of subpaths with 1 autotrace path? And do that with each of the 5 traces? Why use a group and mask?
Thanks
The autotrace stacks each colour scan above eachother by default, thus it would take some combining to produce paths to be used for clipping.
Maybe there is an option I slipped over; thus it seemed the fastest solution.
Namely to use those group of paths for masking, after setting black and white fill colours inside.
Almost anything can be used for masking.
My previous workaround was to use the autotrace only at the final step.
That was something like using a raster extension to remove saturation of the raster image,
and grouping it with a rectangle atop covering it.
The rectangle had either a solid white or black fill, and the object's opacity was lowered in duplicants of the group to create tone variants of the original image.
Which all were used for masking the pre-drawn "texture" objects, just as with the previous method.
This way, when the masked objects are stacked upon eachother, the alpha values adds together, and the final auto-trace can make it look right.
Espermaschine wrote:i tried it
its quite fiddly to clip five different hatches with five stacks of the trace
That previous example image I made had 21 different stroke widths; yes, it can be repetitive and needs way too much resource to provide the effect this way.
For the general look, probably a steady hand, a tablet and the calligraphy tool with tracing the background option set is the best.
Espermaschine wrote:
Looks good! The only thing that I found a bit distracting is the moire pattern inside the wavy lines.
v1nce wrote:Should we discard the image at the very end or not = should it be vector only ?
If not here's my contribution (using filter only, no trace or extension)
Why can't we upload image to this thread ? (I had to hijack the initial thread to host my file)
This is weird for a show it off thread
EDIT: oops. Didn't see the monochromatic limitation. Will upload another verion
It's not a vector only problem;
for that matter, with parallel lines, gimp can provide a good representation with it's distort newspaper filter on a greyscale image, with angles set to the same value for the channels.
Can't help the attachment setting though, but felt it was more appropriate to post it here.
No worry about attaching to the other topic where it emerged from, will put link in there for future times.
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: hatch, crosshatch, rendering challenge
Made this from 21 shades over that core svg (manual traced):
https://openclipart.org/detail/210985/hatching-core-by-lazur-urh-210985
https://openclipart.org/detail/211000/
It does have more contrast as the lightest shade of the photo is represented by "white" and the darkest colour by "black".
Probably it would take less time and effort if instead of auto-tracing, filters would be used on the raster image to generate the mask objects.
https://openclipart.org/detail/210985/hatching-core-by-lazur-urh-210985
https://openclipart.org/detail/211000/
It does have more contrast as the lightest shade of the photo is represented by "white" and the darkest colour by "black".
Probably it would take less time and effort if instead of auto-tracing, filters would be used on the raster image to generate the mask objects.
Re: hatch, crosshatch, rendering challenge
Hello
My drawing
[ Direct Link ]
I will try to attach the svg, but it very big i don know why. But it will be later
Greetings
My drawing
[ Direct Link ]
I will try to attach the svg, but it very big i don know why. But it will be later
Greetings
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: hatch, crosshatch, rendering challenge
With another filter:
This one uses image filter primitive and is applied on a raster image to produce look thus it's a no-go at ocal.
Also there are 6 tones generated upon that 1 image filter primitive, so it's a bit hard adjusting their tones every once the source for that is changed (using a rectangle with a hatch lpe).
Probably it is easier using separate image filter primitives for each tone level.
This one uses image filter primitive and is applied on a raster image to produce look thus it's a no-go at ocal.
Also there are 6 tones generated upon that 1 image filter primitive, so it's a bit hard adjusting their tones every once the source for that is changed (using a rectangle with a hatch lpe).
Probably it is easier using separate image filter primitives for each tone level.
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: hatch, crosshatch, rendering challenge
Lazur URH wrote:Another hatch filter made from scratch
When i open the file in IS, it looks very pixelated.
Re: hatch, crosshatch, rendering challenge
Was sort of intetional. Could be fiddled with the bottom blur and component transfer settings but for practical use -printing- it doesn't really matter.
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: hatch, crosshatch, rendering challenge
Im afraid i do not get what this is all about.
I noticed you posted some interesting "tones" (whatever that means) on openclipart.
https://openclipart.org/detail/247526/tones-2
https://openclipart.org/detail/247527/tones-3
Can you post them with some notes or explanations, please ?!
I noticed you posted some interesting "tones" (whatever that means) on openclipart.
https://openclipart.org/detail/247526/tones-2
https://openclipart.org/detail/247527/tones-3
Can you post them with some notes or explanations, please ?!
Re: hatch, crosshatch, rendering challenge
Espermaschine wrote:Im afraid i do not get what this is all about.
This is all about reproducing this method with filters.
That way you don't need bitmap tracing for every single tone at least -generating mask/clip objects.
If turbulence is used to generate parallel lines as in that example it takes even less work.
I noticed you posted some interesting "tones" (whatever that means) on openclipart.
Can you post them with some notes or explanations, please ?!
The idea of tone comes of a percent coverage in an area.
If a smooth fade is broken down to small steps, each area is having a flat fill with a coverage percent related to the distance between the start-end points of the gradient.
To cover these small steps, using an even height rectangle, just as if it was filled up with pen strokes.
In the original image these strokes were in even distance to eachother.
Smooth as it could be yet for practical reasons it doesn't work: the white rectangles would need to be lined up so you could use one stroke to go over alot of steps not just one.
The second image you linked does that. Each of the steps has another "stroke" added, yet "banding" is present. On a vertical scale it looks ok, if you scale it down vertically and repeat it one above it looks smother, but in a diagonal direction tones look "stepped" of fewer steps.
The third one was made with the align and distribute's panel random option, then aligned the strokes on the left edge and in right distances to each.
I would prefer a positioned dither effect not that totally random pattern.
Didn't come up with one working solution yet.