How to convert a bitmap line to textured vector line?

Post questions on how to use or achieve an effect in Inkscape.
etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

How to convert a bitmap line to textured vector line?

Postby etrader » Thu Jul 23, 2015 10:05 pm

This question is indeed the second part of my previous question (http://www.inkscapeforum.com/viewtopic.php?f=5&t=19114), as I concluded it is very difficult to stimulate pen-on-paper texture by computer. As an alternative, I am thinking, what if we can a real texture of pen drawing on paper, then playing with it in Inkscape.

The attached file is a simple line drawn by pen on paper; scanned and transformed to vector by bitmap trace. However, the result is a set of numerous nodes creating the texture of pen drawing on paper.

Maybe my idea is crazy, but is there a way to keep the texture and turn the line into a vector line? I want to bend the line like a smile vector line drawn by freehand tool.

I mean, we have a line with natural text, can we build different shapes with this line and its texture?

For example, can we bend the attached line to form a circle while preserving the line texture?
Attachments
test1.svg
(95.02 KiB) Downloaded 178 times

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

Re: How to convert a bitmap line to textured vector line?

Postby Espermaschine » Thu Jul 23, 2015 10:46 pm

etrader wrote:This question is indeed the second part of my previous question (http://www.inkscapeforum.com/viewtopic.php?f=5&t=19114), as I concluded it is very difficult to stimulate pen-on-paper texture by computer.

It is indeed quite difficult and i think you would be better advised to try this in Gimp.

You could create the path in Inkscape, import it into Gimp and then a stroke the path with a brush.
This is the part where Gimp is superior to IS, because you can install hundreds of different brushes, which will look more like the real thing you want to achive.
If necessary you could apply a texture via a layermask on top of that, as already recommended in your previous thread (a layermsk is more or less the same as masking in IS).

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

Re: How to convert a bitmap line to textured vector line?

Postby Lazur » Thu Jul 23, 2015 11:27 pm

In that previous topic I linked similar topics. The first one had some examples on how to make it as vectors.

The problem is that you need exponentially more data for such than with raster images/filtering.

Still, would you scale it up that large it matters?





And is it for forgery by the way?

etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

Re: How to convert a bitmap line to textured vector line?

Postby etrader » Fri Jul 24, 2015 12:07 am

Lazur URH wrote:In that previous topic I linked similar topics. The first one had some examples on how to make it as vectors.

The problem is that you need exponentially more data for such than with raster images/filtering.

Still, would you scale it up that large it matters?

And is it for forgery by the way?


Yes, it should be scaled up.

Forgery of what? Isn't it a purpose of graphic programs to draw realistic objects?

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

Re: How to convert a bitmap line to textured vector line?

Postby v1nce » Fri Jul 24, 2015 12:26 am

What's wrong with the filter I provided in your previous post ?

etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

Re: How to convert a bitmap line to textured vector line?

Postby etrader » Fri Jul 24, 2015 1:00 am

v1nce wrote:What's wrong with the filter I provided in your previous post ?


The filter you introduced is very random. It creates random empty spaces throughout the line. When writing with pen on paper, two imperfections happens:

1. extra ink at pressure points such as starting point of a line (which creates thicker lines).

2. Change in the line thickness depending on the pressure and speed.

In the second case, the middle of line is always solid, the empty gaps happen only at the line borders. The filter you introduced applies through out the line width, without considering the fact that middle of a line is always solid because of enough ink.

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

Re: How to convert a bitmap line to textured vector line?

Postby v1nce » Fri Jul 24, 2015 10:01 am

For thickness control use :tool_calligraphic: instead of :tool_pencil:

I don't agree when you say the middle of line is always solid (it's true in your new image much less in the old one)

If you don't like the holes then start with the chalk and sponge filter (Filters/distort/chalk and sponge)
and go into the filter editor (Filters/filter editor) to tweak the settings
in the filter dialog click chalk and sponge go to the
turbulence effect : to change the base frequency to change the "frequency" of bumps/spikes
displacement map : to change the scale to change the distance of bumps/spikes from the center of your line
(or simpler filters/distort/roughen click live preview and tweak te settings)

etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

Re: How to convert a bitmap line to textured vector line?

Postby etrader » Fri Jul 24, 2015 8:16 pm

v1nce wrote:For thickness control use :tool_calligraphic: instead of :tool_pencil:

I don't agree when you say the middle of line is always solid (it's true in your new image much less in the old one)

If you don't like the holes then start with the chalk and sponge filter (Filters/distort/chalk and sponge)
and go into the filter editor (Filters/filter editor) to tweak the settings
in the filter dialog click chalk and sponge go to the
turbulence effect : to change the base frequency to change the "frequency" of bumps/spikes
displacement map : to change the scale to change the distance of bumps/spikes from the center of your line
(or simpler filters/distort/roughen click live preview and tweak te settings)


You are quite right. The chalk and sponge filter gives good effects, but its needs careful tweak to achieve something natural. I am playing with it.

However, calligraphic tool is not good for thickness at all, because it has a constant angle, which resembles the calligraphic pen, but changes in thickness because of pen pressure can be in any direction.

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

Re: How to convert a bitmap line to textured vector line?

Postby Lazur » Fri Jul 24, 2015 9:24 pm

etrader wrote:Yes, it should be scaled up.

Forgery of what? Isn't it a purpose of graphic programs to draw realistic objects?



These two are the complete opposites.
Forgery, as in the sence you want to copy someone else's signature, and use it on whatever documents. Faking identity, for permissions or worse.
Drawing in original scale -using a high resolution scanned raster image will always be the closest match.

If you scale it up, even if just by ten times, it won't look any realistic. You don't have a pen that large, nor giant's hands to use it by nature.
A brush texture may look better in large scale.


What exactly the scale you need it in? Where, and how will it appear in final stage?

A bit confused about this.


On the calligraphic pen, you can change the angle fixation setting to 0,
and use a tablet which can track the pressure of the pen.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to convert a bitmap line to textured vector line?

Postby brynn » Sat Jul 25, 2015 12:16 am

As an alternative, I am thinking, what if we can a real texture of pen drawing on paper, then playing with it in Inkscape


Yes, that's possible. But if you look at your original image of a signature (zoomed in), you can see that there are different patterns in different areas of the pen stroke. If you want to duplicate that signature precisely, you would have to find a way to apply the precise pattern at the precise place in the....design (pen stroke). This will be a little less work than the other topic, but still a lot of work.

For the idea of forgery though, I'm not sure this level of detail can really be used for such a purpose. If the owner of the original signature uses a different kind of pen, the patterns produced will be much different. For example, you would need an example of this person's signature using all kinds of different pens, and all kind of different surfaces underneath the paper, and all kinds of different paper. And then you have to consider his mood. If he's a bit upset, he might press harder with the pen; or if he feels sick, maybe he presses much lighter. Besides all that though, the determination of whether signatures come from the same person depends on entirely different things -- how the loop is made, where there is more pressure or less, etc. You might be able to create an identical signature with a vector editor, after a LOT of work. But using that signature in more than 1 place would start to attract unwanted attention from authorities.

The reason we are curious about your ultimate goal, is so that we can offer suggestions for reaching your goal. It's just that I think most of us can't imagine what your ultimate goal might be.....other than sheer curiosity. In that case, vector graphics probably isn't quite right. Maybe a combination of raster and vector graphics would work -- although I don't have enough skills with raster graphics to offer tips. Espermaschine is probably the best person for that (or Lazur and v1nce have skills too).

etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

Re: How to convert a bitmap line to textured vector line?

Postby etrader » Sat Jul 25, 2015 1:16 am

Lazur URH wrote:What exactly the scale you need it in? Where, and how will it appear in final stage?


It is intended for a poster presentation. It is not a signature, but a handwriting and some drawings. The image I showed was a typical pen lines I randomly downloaded from the internet to explain my requirement.

The main audience of a poster are looking at it from distance, but because it is accessible, its close-up view should be realistic too. These days, people are ready to mock a graphic artwork that it is a cheap photoshop.

etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

Re: How to convert a bitmap line to textured vector line?

Postby etrader » Sat Jul 25, 2015 1:22 am

brynn wrote:
If you want to duplicate that signature precisely


I do not duplicate anything. It will be an original writing/drawing, but I want it to look like a real pen-on-paper writing/drawing. Duplicating something is easy in Inkscape. There are not much details, I can add numerous nodes to replicate the original shape.

Why I do not scan what I want then transform it to vector?

1. I want to have flexibility in mixing writings and drawing.

2. The purpose of advanced software programs is to avoid old-fashioned approaches.

etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

Re: How to convert a bitmap line to textured vector line?

Postby etrader » Sat Jul 25, 2015 1:26 am

Lazur URH wrote:On the calligraphic pen, you can change the angle fixation setting to 0,
and use a tablet which can track the pressure of the pen.


I believe this is the ultimate solution, I was looking for. It should work perfectly. The only issue is that a calligraphic tool draws two lines along each other. Thus, it is not easy to bend a line as drawn by freehand tool. To my knowledge, the only solution is to select multiple nodes in both lines to move the drawn line.

The main problem is tablets are not good for heavy graphic tasks, and I doubt if Inkscape is available for Android.

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

Re: How to convert a bitmap line to textured vector line?

Postby v1nce » Sat Jul 25, 2015 7:42 am

etrader wrote:The main problem is tablets are not good for heavy graphic tasks, and I doubt if Inkscape is available for Android.


By tablet he means a specialized input device for pc such as Top


Return to “Help with using Inkscape”