Inkscape.org
Beginners' Questions How the gradients were applied?
  1. #1
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    Hi,

    I was looking at this fine work: https://store.kde.org/p/1306666/

    The svg file claims it was created with Inkscape.

    I see a lot of triangles there and they look to have assigned different part of one of the three gradients on the bottom, outside the page.

    How these were applied? Is there a gradient picker tool?

    They were obviously set to form an impression of sun lightning on the sea waves.

    Also, how could this be achieved efficiently?

    Thanks.

  2. #2
    brynn brynn @brynn

    You'd have to ask the artist for details about how they did it.  We can really only guess.

    There's not exactly a gradient picker tool.  There is a Gradient tool (for creating gradients).  And when you select something, all the gradients are shown in the Fill and Stroke dialog.  So you could choose which gradient you want to use.

    But it looks like they might have positioned the gradient handles almost individually.  I don't know, maybe they randomly selected 15 or 20 at a time, and applied the gradient to all of them at once, and repeated that.  Or possibly they duplicated objects and/or gradients?

    It doesn't look to me, with my only intermediate skills, like it was done efficiently.  It looks like it might have been somewhat tedious - at least as far as the little triangles. 

    Possibly something like that could be done efficiently, using Tiled Clones??   Although....now that I think of it, I'm not sure if you can use gradients with Tiled Clones....?  Or maybe that was a starting place, and then they adjusted the gradient handles later?

    Maybe someone with more advanced skills has other insights?

  3. #3
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    Interesting, I've thought there might be some extension to help doing it.

    I find it difficult to translate gradient as long as both, points and handlers, must be selected.

  4. #4
    Flamingolady Flamingolady @flamingolady🦩

    They could have used the mesh gradient too, hard to know without asking them.

  5. #5
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    Could it be Jitter Gradients?

    I've found this: https://inkscape.org/~vermette/%E2%98%85jitter-gradients

    But I don't know where to get it. Is it in the menus somewhere?

  6. #6
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    I've installed it. I think something similar was applied.

    Like setting a gradient to a large bunch of shapes, the rotated randomly for a little amount of degrees. Also the gradient is largely stretched, in order to avoid a round-bumpy appearance.

    A question:

    - how could somebody setup such gradient on an object, then apply it on others?

    - how to make a rotation extension? I have no idea og Inkscape's API in this regard, a documentation of what is available or where to look for it.

  7. #7
    Mihai Dobrescu Mihai Dobrescu @msdobrescu
    *

    So, Inkscape is not to be able to clone gradients relatively to each object the same as the gradient was set on the original object.

    On the other hand, I have selected all the needed objects, set a gradient to them (at this point the gradient is done as needed above, but what you set a gradient and alter its position on some object, that could not be cloned).

    Then I have taken the gradient tool form the toolbat, with all the objects selected, tried to apply it on them by dragging the tool on the canvas and.... Inkscape crashes at this point.

    It is a true problem to apply a gradient to many objects when it is needed to be stretched outside boundaries of the object.

  8. #8
    brynn brynn @brynn
    *

    Umm, I'm not sure if they could have used that, or not.  I haven't tried it, so I don't know how it works.

    However, the image showing in the gallery is not the same as the SVG file you showed.  In the SVG file, they are actually individual rectangles.  That image does not look like individual squares to me.

    Edit

    I'll look at it closer, later.

  9. #9
    brynn brynn @brynn

    Yeah, it looks like they might have used that.

  10. #10
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    Indeed, one more mistery is how the gradients were applied bulkly. I can't figure out how the gradients are replicated on other shapes. They are ususally applied to the bounding boxes, right? If they are stretched outside the bounding boxes of the shapes or paths, it must be done manually for each, right? For thousnads of items it is tedious, I don't think somebody would do this.

    I have managed to make an extension for that, I try to adjust it now.

  11. #11
    brynn brynn @brynn

    Well I can see some people might do them all individually, if they really wanted to.

    Gradients are applied to the fill or the stroke, or both, if you want to.

    That extension you found looks like it would do it.  Here's how it worked for me.

    • draw a small grid of 4 x 4 squares
    • select them all at once and apply some gradient to the whole selection, all at once - make the gradient really long, if you want to, or make it short - whatever you want
    • Extensions menu > Color > Jitter Gradients
    • set the jitter amount to something like 20 for a subtle change or 80 for an extreme change
    • click Apply

    The extension switches....well, I'm not sure if it switches the squares around or it switches the gradients around.  But it could easily have been used for that image.

  12. #12
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    Well, my Inkscape crashes at the gradient assignment, after selecting all and dragging the gradient over...

  13. #13
    brynn brynn @brynn
    *

    It crashes with just 10 to 20 squares?

    I don't have a problem on Windows.  But maybe you've found a bug?

  14. #14
    Mihai Dobrescu Mihai Dobrescu @msdobrescu

    I use Linux.

    It is a bug, but version 1.0 beta works, so does not worth to report, right?

  15. #15
    brynn brynn @brynn

    Right!

Inkscape Inkscape.org Inkscape Forum Beginners' Questions How the gradients were applied?