This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Drawing a "gradient path" (a gradient along a path)?

Tags: None
(comma "," separated)
rblz
Registered Member
Posts
2
Karma
0
How would you draw a curve/path and make a gradient face the direction of the path? Let me show you what I mean: https://prnt.sc/1036pgl If that isn't clear, I want that path to have a gradient moving dynamically along each of those directions along the path. It would look like a cleaner, procedural version of this: https://prnt.sc/1036suz I realize this is probably a longshot, but if anybody would know how to do this it's you guys. (Also, if there's another way to achieve what I'm describing, I would love to know ;D) Thanks!
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
The short answer, from what I know, is that you can't.
The gradient is applied over an area that encloses the vector path/stroke and the gradient properties can't be varied locally on the vector path/stroke itself.

With a thick straight vector line, you can get that effect by having a linear gradient go 'across' the line.

If you're desperate for that effect on a curved line, you can convert the resulting gradient across a straight line to a paint layer (raster image) and then use a Mesh Transform to 'bend' the image. That would be a fiddly and painstaking exercise and would be very frustrating as you tried to get it looking good.

Edit:Add: Maybe not all that fiddly but it's far from perfect. Also, you need to start with a long, thin rectange because putting a gradient across a line really is fiddly.

Image
rblz
Registered Member
Posts
2
Karma
0
How does one achieve this bending? By mesh transform you mean this right? Image
I'm new to this program so if you could give me a brief walkthrough of how you achieved what you did that would be super helpful. Thank you!
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
I'm sure it would and it would take me a super long time.
Note: I've just remembered that version 4.4.2 has introduced mesh gradient fills which can be used to fit a gradient to a vector shape.

The manual is well written and well illustrated and has a search facility: https://docs.krita.org/en/

Remember to use the Tool Options docker, it tells you what you can do with any particular tool and lets you choose options.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]