Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By RobA

Thread: GIMP Gradient Script

  1. #1
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,532

    Info GIMP Gradient Script

    A while back I wanted to create some hypsometric gradients in GIMP. There a quite a few out there (usually as jpegs) and being a lazy guy I wrote a script rather than messing about with the gradient editor (attached).

    The script gets loaded into the gradient menu (accessible in the gradient palette, click the < arrow in the right hand corner). Chose the image and layer (drawable), dial the segments in the gradient, and select if you want the segments to be blended or stepped.
    GIMP Gradient Script-2008-06-04_130903.png

    The program will sample the entire source vertically, and horizontally depending on the segments selected.

    Here is a source image I ran the script on:
    GIMP Gradient Script-hypso_humid_boost.png

    and here is the resultant gradient that was created, opened in the gradient editor:
    GIMP Gradient Script-2008-06-04_131245.png

    And a resultant fill with that gradient:
    GIMP Gradient Script-gradient.png

    Unchecking "smooth" will make the gradient colour steps. I have limited it to 256 steps, but you could change she script to more quite easily (the limit for GIMP gradients is 1024).

    -Rob A>
    Attached Files Attached Files

  2. #2
      ravells is offline
    Community Leader Gracious Donor ravells's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    10,902

    Default

    You are truly amazing Rob. The makers of Gimp should give you some sort of award for contributions to the program.

  3. #3
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,532

    Default

    Many more people have contributed many more scripts than I ever will. Though I was flattered that my inkscape z-order extension is making it into the next formal release

    -Rob A>

  4. #4
    Guild Novice
    Join Date
    Jun 2008
    Posts
    15

    Post

    So would I use this to create a snow capped mountain gradient, or is there an easier way to do that?

  5. #5
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,532

    Default

    I really designed the script to take image gradients (of which there are many) and get a Gimp gradient I could use with the gradient tool. I could, however, work just as well with manually created images to fabricate a gradient from scratch without messing about with the gradient editor (though the editor is much more powerful in terms of setting the gradient segments, steps, and curves)

    -Rob A>

  6. #6
      RobA is offline
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,532

    Default

    Just a quick update, I have posted a new script at the gimp plugin registry that works similarly, but allows you to sample an image along an arbitrary path to generate a gradient.

    -Rob A>

  7. #7
      CAgrippa is offline
    Guild Novice
    Join Date
    Sep 2014
    Location
    Boston area
    Posts
    17
    Blog Entries
    1

    Default

    OLD thread, but...

    So does this mean I can sample a gradient from a map I like, ranging from low to high, and then project this onto an arbitrary heightmap in my image?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •