Inkscape.org
Beginners' Questions Gradient following shape of an object
  1. #1
    Brushmeow Brushmeow @Brushmeow

    I am new to using Inkscape, and I had a question regarding gradients. I managed to make linear and radial gradients, but is there a way to make a non linear gradient that isn't radial? Like for example one that could follow the shape of a given curve, or side of an object?

  2. #2
    Polygon Polygon @Polygonβš–πŸŒΆ
    *

    If you like to have something like the left example you need a vector editor with a brush engine. The right example is done via extensions->Generate from Path->Interpolate:

    Β 

  3. #3
    Brushmeow Brushmeow @Brushmeow

    The right example is exactly what I'm going for, but could you provide a little more explanations on how to do it? I have the same interpolate values and options, but it doesn't do anything when selecting the path.

    Also, using this method, is it possible to adjust how the gradient is done, like in a normal gradient?

    Thanks.

  4. #4
    Polygon Polygon @Polygonβš–πŸŒΆ

    You need exactly 2 separate paths - stroke width and steps are crucial.

    YouΒ΄ll get a bunch of extra strokes in-between so no - you canΒ΄t edit the graduation like normal gradients and have to start over each time you need other color variations.

  5. #5
    Brushmeow Brushmeow @Brushmeow

    I managed to do it, but it's a bit weird, there's this sort of 'dithering' effect where the paths overlap. And I'm not sure but I couldn't really union all the paths. I was stuck with multiple.

    Β 

    Is there a way to achieve a similar result using gradients or gradients mesh?

  6. #6
    Polygon Polygon @Polygonβš–πŸŒΆ
    *

    I donΒ΄t know another sufficient method in Inkscape so far.

    What kind of path are you working on?

  7. #7
    Brushmeow Brushmeow @Brushmeow

    I'm working using various non elliptical curves for certain shapes, and I was trying to use such a gradient to shade the inside of the shape. When the shape is elliptical the gradient tool works just fine, but when it's not, it doesn't.

  8. #8
    Polygon Polygon @Polygonβš–πŸŒΆ

    Maybe you can use some filter trickery like this one:

  9. #9
    Brushmeow Brushmeow @Brushmeow

    Thanks for the help. This sorta works, thought not exactly what I was looking for.Β 

  10. #10
    alxpnv alxpnv @alxpnv

    Here is what I got with Distribute Along Path and Voronoi Diagram:

    Gradient Along Path
Inkscape Inkscape.org Inkscape Forum Beginners' Questions Gradient following shape of an object