drawing swirly damask patterns

General discussions about Inkscape.
Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 2:13 am

This problem might overlap with this topic:
viewtopic.php?f=22&t=31582

I watched this tutorial for Illustrator for live painting damask patterns:
https://www.youtube.com/watch?v=itreHFx0Xy4

and convinced that Inkscape has similar functionalities, like Spiro, Smoothing and Shape from Clipboard instead of brushes, wanted to try.

Here are the problems i encountered when i painted a "tapered ellipse pattern"/"a leaf shape", copied to the clipboard, with the Pencil Tool:

- the pattern always starts at Width: 0,265 in the Pap menu. Why does it not start at Width 1 ? Is this a bug ?

- although i used a smoothing of 70, the path still has many nodes. Adjusting the Smoothing with the LPE based Simplify option ticked, does not reduce the number of nodes....

- even after i found a Smoothing that produces a good looking path, i have to do this again for every new path....

- How can i optimise my pattern ? Depending on the corepath, sometimes the pattern gets distorted in an ugly way, instead of being just smooth. Is adding more nodes a good strategy ? Or convert the paths into curves ?

Whatever i do, i cant get even close to the performance of Illustrator. I have to tweak every single path i draw painstakingly, instead of just painting away as in the video.
Am i doing something wrong or does Inkscape need more develoment in that field ?

Im attaching the tapered ellipse and leaf shape pattern.
Attachments
swirly Patterns.svg
(161.41 KiB) Downloaded 38 times

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

Re: drawing swirly damask patterns

Postby Lazur » Sat Feb 11, 2017 2:33 am

Hi.

Usually the workflow is connected to 1 px. Like assigning markers to an 1 px wide stroke in their true scale.
0,265 mm is 1 px at 96 dpi.

Distortion gets ugly on the inner side of the core curves, whenever the width of the pattern is too large.

Personally I'd go by the "tweaked solution".
However you can get way better results by freehand/pencil tool if you set smoothing to 30, using spiro mode and the pattern from clipboard.
Also note the artist in the linked video has a quite good motor skill, and maybe he is using a tablet as well.

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 2:45 am

I dont understand.

Lazur wrote:Usually the workflow is connected to 1 px. Like assigning markers to an 1 px wide stroke in their true scale.
0,265 mm is 1 px at 96 dpi.

Even when i change all the entries in the document properties to pixels, Pap Width is still at 0,265.
Shouldnt the Pattern Height = 1 ?

Personally I'd go by the "tweaked solution".

Thats would forfeit the workflow of the video as the goal i want to match.

However you can get way better results by freehand/pencil tool if you set smoothing to 30, using spiro mode and the pattern from clipboard.
Also note the artist in the linked video has a quite good motor skill, and maybe he is using a tablet as well.

Well i set the Smoothing to 70, used Spiro Mode with the Pattern from Clipboard. That should give me smoother results than 30. Or not ?

Yes, the artist of the video is using a tablet i think. Not necessarily easier. Or do you think pressure-sensitivity is playing a role here ?

I still like to know how to optimize the pattern. Is there a way ?

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

Re: drawing swirly damask patterns

Postby Lazur » Sat Feb 11, 2017 2:59 am

Yes the values are bit confusing, I guess there are related bugs. Like how the opacity is lways displayed at 0% if you don't alter the settings.

Too much smoothing is no good either. Some of your tweaked results were good on the number of nodes used. You need to set a smoothing that can track about that many nodes.

But in general a steady hand is the best tool.

Here is what I could scribble in a few strokes with a mouse.

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 3:05 am

Thanks !

Im afraid the conclusion is: Inkscape cant compete with Illustrator here.

Especially the distortion is a big issue.

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

Re: drawing swirly damask patterns

Postby Lazur » Sat Feb 11, 2017 3:09 am

Wouldn't say that, I bet the author could pull the same swirls with inkscape as well.
Distortion is related to the pattern's width -if you scale the original pattern before pasting it to clipboard, or draw strokes more zoomed out they should look better.
That's plain geometry, illustrator can't do magic either.

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 4:35 am

Lazur wrote:Wouldn't say that, I bet the author could pull the same swirls with inkscape as well.
Distortion is related to the pattern's width -if you scale the original pattern before pasting it to clipboard, or draw strokes more zoomed out they should look better.
That's plain geometry, illustrator can't do magic either.

What do you mean scale ?
Up or down ?

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

Re: drawing swirly damask patterns

Postby Lazur » Sat Feb 11, 2017 5:17 am

It's related to the ratio between the (half) width of the pattern and the bending radius of the core curve. The smaller ratio it is, the better -so scale down vertically.

Think of the process how the pattern is stretched.
Along the core curve at each point a perpendicular array is constructed, and each of them are used as an axis where the y coordinates are depicted of the base pattern (relative to its centerline).
If half of the pattern's width is equal to the radius, then you will get an intersection point from what supposed to be a continuous curve.
Even worse when the pattern is wider, you will end up with an opposite curvature as a result.

Works the same as how strokes are handled. If they are set too wide you will get "self intersections".

strk.svg
(16.84 KiB) Downloaded 38 times

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

Re: drawing swirly damask patterns

Postby brynn » Sat Feb 11, 2017 7:52 am

Raspi wrote:Im afraid the conclusion is: Inkscape cant compete with Illustrator here.


Disagree.

Creating a pattern for a swirl like that can be a bit tricky. I would always start with a triangle (lying on its side) as a pattern, or elongated diamond shape, and then tweak here and there as needed. Tweaks should only be a pixel or less up or down, or else you get these odd bumps in the swirl.

Here's a swirl I made a while ago, with the pattern.

sw.png
sw.png (10.17 KiB) Viewed 2325 times

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 3:47 pm

Disagree.

Have you even watched the video or ever touched Illustrator ? Obviously not.

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 4:09 pm

Lazur wrote:It's related to the ratio between the (half) width of the pattern and the bending radius of the core curve. The smaller ratio it is, the better -so scale down vertically.

Think of the process how the pattern is stretched.
Along the core curve at each point a perpendicular array is constructed, and each of them are used as an axis where the y coordinates are depicted of the base pattern (relative to its centerline).
If half of the pattern's width is equal to the radius, then you will get an intersection point from what supposed to be a continuous curve.
Even worse when the pattern is wider, you will end up with an opposite curvature as a result.

I think i understand the theory behind your thinking, so i tried to cut the tapered ellipse in half.
That way the inner side of the pattern is just a straight line, while the outer half is curved and thus longer, but it didnt seem to make a difference.

I dont see how the height of the pattern makes any difference when i have to change the width in the Pap LPE menu anyway.
Attachments
SwirlHalfpattern.png
SwirlHalfpattern.png (21.82 KiB) Viewed 2285 times
swirlhalfpattern.svg
(10.99 KiB) Downloaded 30 times

Polygon
Posts: 298
Joined: Thu Dec 19, 2013 3:27 am

Re: drawing swirly damask patterns

Postby Polygon » Sat Feb 11, 2017 7:34 pm

You´re using way too much points for the spiro spline in my opinion.
Mirrored (vertically+horizontally) alligned copies are easy achievable via clones; right example on screenshot.

Cheers
P.

Patterns.png
Patterns.png (180.08 KiB) Viewed 2253 times

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 7:41 pm

Polygon wrote:You´re using way too much points for the spiro spline in my opinion.

But how do i get less points ?

I used a higher smoothing (70), then Lazur told me thats too high.

How do i get the best results by freehanddrawing with the Pencil Tool and without too much tweaking as in the video ?
Last edited by Raspi on Sat Feb 11, 2017 8:03 pm, edited 1 time in total.

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

Re: drawing swirly damask patterns

Postby Lazur » Sat Feb 11, 2017 7:46 pm

My original comment on lovering the width wasn't exactly on reducing the size to its half that way, although that can work as well with a bit of a trick:

swirlhalfpattern2.svg
(61.36 KiB) Downloaded 43 times



The pattern is pulled in so that its centerline is aligned on the core path with the default 0 offset. So if you don't want it to render at the inner side you need to "hide" it.
Achieved that by duplicating the path, mirroring it, duplicating the mirrored one, reversing its path direction and combining the three of them together.

Yes, you are having too many nodes on the core path, maybe you can add a bit more smoothing to the freehand tool.
You need to have three nodes for a single curve, so even about 5 nodes could be enough for a simple swirl.

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 7:55 pm

Lazur wrote:My original comment on lovering the width wasn't exactly on reducing the size to its half that way

Im aware of that, but as i said, how does the size of the pattern matter when i have to adjust the Width in the Pap Menu anyway ??
With the split pattern i was trying to have diferent lengths on the in and outside.

Yes, you are having too many nodes on the core path, maybe you can add a bit more smoothing to the freehand tool.

So whats the ideal level of smoothing then ?
40 seems to give good results. But apparently it also depends how quickly i draw the path.

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

Re: drawing swirly damask patterns

Postby Raspi » Sat Feb 11, 2017 8:02 pm

Lazur wrote:The pattern is pulled in so that its centerline is aligned on the core path with the default 0 offset. So if you don't want it to render at the inner side you need to "hide" it.
Achieved that by duplicating the path, mirroring it, duplicating the mirrored one, reversing its path direction and combining the three of them together.

I see how the pattern has an overlay of half the pattern on top of it, but i dont understand what its supposed to do.

Is that a real solution to the problem ?
How do i apply this technique to any other pattern ??

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

Re: drawing swirly damask patterns

Postby Lazur » Sat Feb 11, 2017 9:07 pm

If you resize the pattern width after than it doesn't matter. In 0.92 it has a nice handle so it's not much of a problem.

The "overlay" is supposed to ensure the pattern laying on the core path with the drawn side. By offsetting it could be achieved as well so it's just a sort of "brute-force" solution for an exact placement.

If the pattern only appears on the outside of the curve then there is no heavy distortion by compression/self intersecting in the inside.

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

Re: drawing swirly damask patterns

Postby brynn » Sun Feb 12, 2017 12:25 am

Raspi wrote:
Disagree.

Have you even watched the video or ever touched Illustrator ? Obviously not.


No I've never used Illustrator. But I watched the video. Since I've never used Illustrator, I wasn't sure about everything that was happening. But it looked similar to how it looks in Inkscape - I mean the basic process. And the result looks....well, it looks identical to me.

I see that Illustrator has a lot of stock patterns for different shapes for the swirls, like leaf shapes, etc. And it has a lot of the process automated, so that you only need to draw a curve close enough, and AI somehow takes out the bumps and magically makes it smooth and symmetrical. I guess those are some of the "bells and whistles" that you pay for, when you buy it. (or I guess now you subscribe to it, or something)

I'm not clear if the video author is using a mouse, or stylus, or might have a graphics tablet. I suspect it's way easier to draw a swirl with a pen or stylus, than with a mouse.

But take away those (expensive) bells and whistles, and I think the basic functionality is comparable. For drawing the basic swirl, I can drag out a nice smooth swirl easily, in one go, without needing any node editing. It doesn't happen every time, because I just can't control the mouse very well. I'll try to make a short video (which I'm not very good at, but I want you to see what I see).

Ok, see if this works. https://inkscapecommunity.com/jd/vids/swirl.mp4

You can see that there's a little bump in the 2nd one, that I'd want to smooth out. And of course you need to shape the kind of path that you want - tight curl or gentle wave, for example. You could probably go with less smoothing than I use, and eliminate this part. But for my personal preference, I do better with that high smoothing value. I'm quite sure I could do a lot better with a stylus or pen/tablet.

You can get much, much closer to making the swirl exactly like you want, in one try, by using the Pen in Spiro Spline mode, because you can set the nodes where you want. It eliminates a lot of node editing.

There's another way to make the swirls too, but you have to get out the LPE dialog. You can get a taste of the power stroke by using the Ellipse shape on Pen or Pencil. (Lazur probably already said that.) It has the power stroke automatically applied, which I find easy to use in a successful way. Probably I would say the Pen tool with the power stroke and custom pattern gives the best result. But that's just me.

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

Re: drawing swirly damask patterns

Postby Raspi » Sun Feb 12, 2017 5:15 pm

I watched a few more videos by the youtuber and can confirm he is using a pressure sensitive tablet which seems to be crucial because i tried painting ornaments with the Brush in Illustrator and it looked just as bad as in Inkscape.
So Lazur was on the right track when he said the videomaker has "quite good motor skills".

There are still differences between Brushes in AI and the PaP LPE in IS, because AI has a dedicated dialogue for each brush, telling the program how to apply the pattern. For example the part of the brush pattern can be selected, where its gonna be stretched and where not.

Also AI doesnt seem to distort patterns as much as IS.

Im stil quite curious on what is the best Smoothing when using the Pencil Tool and hope that Polygon will come back to this thread.

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

Re: drawing swirly damask patterns

Postby Lazur » Sun Feb 12, 2017 9:19 pm

Best smoothing depends on your drawing style. For me it is around 30 as seen in the video.
With try and error you can adjust it.

Draw a simple arc by freehand. Is that represented by almost 3 nodes? Then you are on the right track.
If all you get is two noded straight segments, the smoothing is too much. If you get 10 or more nodes, increase the smoothing value a bit.

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

Re: drawing swirly damask patterns

Postby Raspi » Sun Feb 12, 2017 9:41 pm

Lazur wrote:Draw a simple arc by freehand. Is that represented by almost 3 nodes? Then you are on the right track.
If all you get is two noded straight segments, the smoothing is too much. If you get 10 or more nodes, increase the smoothing value a bit.

That sounds like good advice !


Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest