It is currently Mon Dec 11, 2017 10:09 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Fri Sep 29, 2017 4:13 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2890
Location: Tin from Victoria BC Canada
Pegleg44 asked for a script to generate something like this with a path.
Image

I searched for SVG Path/Stroke and Gradients related to Path/Stroke and couldn't find anything that does it. I only ran into Gradients along a path (not gradient that is perpendicular to points on a path).

So the only thing left to try was to manually emulate the gradient effect by drawing multiple SVG strokes of varying width and calculated transitioning colors from one color to another color.

So here's a script that generates the above if anyone is interested.
https://www.gimplearn.net/viewtopic.php?p=10409#p10409

Script options preview:
Image

_________________
T.
Image gimplearn.net                                                                           


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: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Fri Sep 29, 2017 11:55 pm  (#2) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 3114
Just had to try it!
Attachment:
TinTran.Stroke Path Ver.3.Triangles.jpg
TinTran.Stroke Path Ver.3.Triangles.jpg [ 738.16 KiB | Viewed 724 times ]


Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Sat Sep 30, 2017 7:05 am  (#3) 
Offline
GimpChat Member

Joined: May 16, 2010
Posts: 13984
Location: USA
Image


Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Sat Sep 30, 2017 11:23 am  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2890
Location: Tin from Victoria BC Canada
Thanks Rod, we should thank Pegleg44 for the idea/suggestion.
And ofnuts for suggesting code version 4 which will work on Linux and OSX as well as Windows.

_________________
T.
Image gimplearn.net                                                                           


Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Sat Sep 30, 2017 4:37 pm  (#5) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 3114
Attachment:
TinTran.Stroke Path Ver.3.Star.jpg
TinTran.Stroke Path Ver.3.Star.jpg [ 552.81 KiB | Viewed 626 times ]

Attachment:
TinTran.Stroke Path Ver.3.Star.Gradient Map.jpg
TinTran.Stroke Path Ver.3.Star.Gradient Map.jpg [ 724.09 KiB | Viewed 626 times ]



Attachment:
TinTran.Stroke Path Ver.3.Text.Gradient Map.jpg
TinTran.Stroke Path Ver.3.Text.Gradient Map.jpg [ 317.09 KiB | Viewed 626 times ]


Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Sun Oct 01, 2017 11:10 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 188
Location: Scandinavia
Nice one, thank you! Now when do we get a plugin that uses custom gradient on a path same way?
That's something I've been trying to find out.

Image


Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Sun Oct 01, 2017 12:15 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2890
Location: Tin from Victoria BC Canada
Nidhogg wrote:
Nice one, thank you! Now when do we get a plugin that uses custom gradient on a path same way?
That's something I've been trying to find out.

[ Image ]

According to Pegleg44, you can use custom gradient fine. His method is create a black and white work with the script then use Colors > Map > Gradient Map with your custom gradient.

PS: Since you mentioned it: I added version 5 which allows you to say YES to "Use Custom Gradient" and select a Custom Gradient to use.
Image

_________________
T.
Image gimplearn.net                                                                           


Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Sun Oct 01, 2017 3:55 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2210
Location: Retired Moderator Slowly Returning to the Living.
Sweet new script!!
Attachment:
StrokePathGradient.png
StrokePathGradient.png [ 123.2 KiB | Viewed 552 times ]


Attachments:
StrokePathGradient3D.png
StrokePathGradient3D.png [ 936.55 KiB | Viewed 552 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Sun Oct 01, 2017 4:37 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2210
Location: Retired Moderator Slowly Returning to the Living.
Trying a little gear.


Attachments:
CoolWovenGear.png
CoolWovenGear.png [ 1.57 MiB | Viewed 547 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Top
 Post subject: Re: SVG Stroke with Gradient (with Miter [Sharp Pointy Edges])
PostPosted: Mon Oct 02, 2017 11:14 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 188
Location: Scandinavia
Wohoo this is awesome plugin, the stroke amount emulation gives lot of possibilities.
Still need Path Blend script as it can create oddly shaped gradients but this can do some of the stuff I used Path Blend for and is faster.
Was about to ask how to increase the maximum width over 100 pixels but found it on line 117.
Thanks again :bigthup


Top
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Gradient Stroke Script V1.4

119

No new posts Attachment(s) Stroke Paths with Gradient Script for GIMP

6

No new posts Attachment(s) The sharp look

8

No new posts Attachment(s) Growing Sharp Corners?

6

No new posts Attachment(s) How do I get a scaled down photo to look sharp against one that's not?

17



* Login  



Powered by phpBB3 © phpBB Group