Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gradient along an arbitrary selection.
#1
Hi All,
Image a letter 'S'.
Or a 'C', for that matter.
Can anybody suggest a sensible way to fill the shape with a linear-style  gradient, starting at one end and shading to the other?
A purely linear gradient places the end points of the gradient at the furthest extents of the shape, leaving incorrectly coloured parts at the tips of the shape; 'shaped' gradients fill from the edges to the middle; spiral, conical and radial gradients also fail to fit the bill.
Warp transformation and Whirl and Pinch filter make interesting effects if you start with a box filled with a linear gradient, but change the width and length of the box in a way I haven't managed to control, and don't get me started about Cage Transform.

Am I simply asking too much of Gimp in its current incarnation, or can you suggest the blindingly obvious solution that's right under my nose but will need a good night's sleep to work out, otherwise?

QuinB
Reply
#2
Possible solution if your are mostly interested in the shape on the limits:

1) Create two paths on the two distorted borders
2) Use my path-inbetweener script  to generate a fine lattice of intermediate paths
3) Use my stroke-visible-paths script to stroke the result with a soft and small brush.

   
Reply
#3
After an uncomfortable time with Inkscape's Mesh Gradient, I've come up with a 'this is the sort of thing I mean' image
   

It's neither quick nor accurate to the spec., but it gives an idea. Firstly, it's not a Gimp solution, secondly it's a 'by eye' technique that takes a fair bit of manipulation to implement. 

I'll be happy to check out your scripts: they're always an education – thanks.

Q
Reply
#4
You could try something like this, stroking a path, constrained by a selection.

[Image: svx8rlC.jpg]

see the first couple of pages here: https://gimpchat.com/viewtopic.php?f=4&t...3e6#p73945
Reply
#5
A little cumbersome, but several times easier than Inkscape!
Very nicely reasoned; thank you.
Reply


Forum Jump: