Results 1 to 8 of 8

Thread: GIMP Gradient Script

Hybrid View

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

    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.
    Click image for larger version. 

Name:	2008-06-04_130903.png 
Views:	209 
Size:	12.6 KB 
ID:	4129

    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:
    Click image for larger version. 

Name:	hypso_humid_boost.png 
Views:	219 
Size:	2.9 KB 
ID:	4130

    and here is the resultant gradient that was created, opened in the gradient editor:
    Click image for larger version. 

Name:	2008-06-04_131245.png 
Views:	148 
Size:	12.8 KB 
ID:	4131

    And a resultant fill with that gradient:
    Click image for larger version. 

Name:	gradient.png 
Views:	211 
Size:	49.9 KB 
ID:	4132

    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

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

    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

    Post

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

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

    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

  7. #7
    Guild Novice
    Join Date
    Sep 2014
    Location
    Boston area
    Posts
    19
    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?

  8. #8
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,567

    Default

    Quote Originally Posted by CAgrippa View Post
    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?
    Slow answer, but....

    Yes!

    -Rob A>

Posting Permissions

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