It is currently Tue Jul 02, 2024 3:32 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Path: reduce the number of nodes while keeping the shape
PostPosted: Fri Dec 20, 2019 5:30 am  (#1) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1792
Location: France
GIMP Version: 2.10.14
Operating System: Windows
GIMP Experience: New User



:wvy
I cut a flower and then alpha to selection and edit / selection to path.
Then I want to act on the path, then I appear the nodes and there it is the horror because lots of nodes overlap.
How to have the same path with a minimum of nodes, without being obliged to delete the nodes 1 by 1 with ctrl + shift?
Example:
Image

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.14 (Samj),2.10.21 (Samj) and 2.10.23(Samj) OS Windows 10 Home 64 bits


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Fri Dec 20, 2019 6:19 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
Nothing that I know of in Gimp. You should really start creating paths by hand. It gets easier with experience and practice.

However, you can use Inkscape.
Export the path from Gimp as an svg then open that svg in Inkscape.

Attachment:
01-path.jpg
01-path.jpg [ 134.69 KiB | Viewed 5157 times ]


Simplify the path in Inkscape, one keypress ctrl-L, and then save the resultant svg

Attachment:
02-path.jpg
02-path.jpg [ 133.64 KiB | Viewed 5157 times ]


Import the Inkscape svg back into Gimp.

Attachment:
03-path.jpg
03-path.jpg [ 103 KiB | Viewed 5157 times ]

_________________
Image


Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Fri Dec 20, 2019 6:59 am  (#3) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1792
Location: France
rich2005, :wvy
Not used Inkscape for several months .. (and I only learned a few basics) so by opening the way in Inkscape, I found only the solution to remove 1 by 1 the nodes ...So I'm putting off studying paths with Inkscape until later.
rich2005 wrote:
You should really start creating paths by hand. It gets easier with experience and practice.

I started a long time ago, :) I just asked this question here because I asked myself it by testing the parameters of certain Gimp tools, which I have never used.

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.14 (Samj),2.10.21 (Samj) and 2.10.23(Samj) OS Windows 10 Home 64 bits


Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Fri Dec 20, 2019 8:11 am  (#4) 
Offline
GimpChat Member

Joined: Sep 23, 2016
Posts: 316
level_0 wrote:
rich2005, :wvy
so by opening the way in Inkscape, I found only the solution to remove 1 by 1 the nodes


In Inkscape use Path > Simplify (or Ctrl-L). No more than that required.


Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Fri Dec 20, 2019 8:34 am  (#5) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
level_0 wrote:
there it is the horror because lots of nodes overlap.

The nodes do not overlap. The control points are just displayed as overly big.


rich2005 wrote:
Simplify the path in Inkscape, one keypress ctrl-L, and then save the resultant svg

This is not really advisable.
To get a good reduction of nodes, you have to apply Simplify more than once, but this also results in reduction of resolution.
Meaning the path will loose its shape with each step.

Its even worse when you hit CTRL + L several times in a quick fashion, because that makes Inkscape apply the simplification in a more aggressive way.

http://tavmjong.free.fr/INKSCAPE/MANUAL ... iting.html
(bottom of page)

Attachment:
toosimplify.jpg
toosimplify.jpg [ 62.34 KiB | Viewed 5127 times ]


Last edited by Konstantin on Fri Dec 20, 2019 10:01 am, edited 1 time in total.

Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Fri Dec 20, 2019 8:46 am  (#6) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
level_0 wrote:
GIMP Version: 2.10.14
Operating System: Windows
GIMP Experience: New User



:wvy
I cut a flower and then alpha to selection and edit / selection to path.
Then I want to act on the path, then I appear the nodes and there it is the horror because lots of nodes overlap.
How to have the same path with a minimum of nodes, without being obliged to delete the nodes 1 by 1 with ctrl + shift?
Example:
[ Image ]


Nodes don't overlap, there are just many :) which is expected if you have a complex shape.

You can possibly get a simpler path by blurring slightly (a copy of) the layer before doing "Alpha to selection+Select to path" (in other words, simplify the shape before getting a path from it).

When the shape has sharp corners, "Select>To path" sometimes creates sub-pixel tangents that can be a nuisance when stroking the path. My ofn-remove-tangents script can fix these.

_________________
Image


Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Sat Dec 21, 2019 1:30 pm  (#7) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1792
Location: France
Thank rich2005
Thank you Konstantin, I put the link in a folder "Inkscape tutorials" in my bookmarks.
Thanks ofnuts, I tried the first method with the blur and it is a little better. I downloaded your plugin "remove" but not yet tested. :)

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.14 (Samj),2.10.21 (Samj) and 2.10.23(Samj) OS Windows 10 Home 64 bits


Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Sat Dec 21, 2019 1:56 pm  (#8) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
level_0 wrote:
Thank you Konstantin, I put the link in a folder "Inkscape tutorials" in my bookmarks.

Its not a tutorial, just the Inkscape manual.
Was meant for rich2005, the busiest man in gimp world. :hehe


Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Sat Dec 21, 2019 3:03 pm  (#9) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
@Konstantin
Not that busy, what is the hee-hee for

Quote:
To get a good reduction of nodes, you have to apply Simplify more than once


I did not say apply more than once, the example I showed used Simplify Path applied once, of course repeated use will destroy anything and that applies to most things.

Quote:
http://tavmjong.free.fr/INKSCAPE/MANUAL_v15/html/Paths-Editing.html


No need to point me to that, I do know about it. I also know that manual has not changed since Inkscape 0.48 (2010)

Going back to the example I posted, the simplified path is a good fit to the Image in Gimp. It is always up to the user to keep or reject.

I did recommend right at the beginning to get used to tracing a path by hand.

_________________
Image


Top
 Post subject: Re: Path: reduce the number of nodes while keeping the shape
PostPosted: Sat Dec 21, 2019 3:42 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
Yes, tracing by hand is always the best strategy going forward. You can't expect a stupid computer to read your thoughts...........


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts So GEGL was made for nodes editing...

3

No new posts Attachment(s) Reduce denisity in Filters > Noise

2

No new posts BRUSH SIZE REDUCE AND ENLARGE (Solved)

7

No new posts Attachment(s) Adding Larger Custom Fonts (Trial Number 2)

6

No new posts Attachment(s) i struggle with the option to copy the path - the path where a file i

3



* Login  



Powered by phpBB3 © phpBB Group