Gradient Map/Reverse Gradient Map Script

Discussion in 'Other' started by fencepost, Mar 20, 2010.

  1. fencepost

    fencepost Member

    Joined:
    Jan 15, 2010
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Occupation:
    Environmental Scientist
    Location:
    Florida
    A couple of weeks ago I wrote a script (Gradient Map All Layers) that would gradient map all the layers in an image (initially created to work on animations). A neat feature of the script is that it allows the gradient map to reverse the gradient when it's applied (the gradient map option in GIMP doesn't normally allow for a reversed gradient). David Wood asked me if I could create/modify a script that would do this on a single layer. After showing him my Gradient Map All Layers script, he liked what it did and requested modifications so that it would work on a single layer as well. Below is the result of his request. The script can work on all layers or just a single layer. You pick the gradient, choose if it's to be reversed, and whether it works on all/one layer(s).

    Copy and paste the code below into a text file. Save it with an ".scm" extension in your GIMP scripts folder (ie.. C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts). Refresh your scripts (Filters > Script-Fu > Refresh Scripts) and you can find it under Colors > Map > Ultimate Gradient Map...

    Or you can download the script already saved as a scm.



    Enjoy!

    Art
  2. David Wood

    David Wood Active Member

    Joined:
    Jul 22, 2009
    Messages:
    5,472
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home page:
    Shweet! I love it and I've only used it about 10 times. ;D I'm going to use it in a tutorial too.
  3. virtualTune

    virtualTune Active Member

    Joined:
    Sep 2, 2009
    Messages:
    4,421
    Likes Received:
    1
    Trophy Points:
    36
    Location:
    Neverland
    Home page:
    couldd someone post what it looks like cuz if i see the word "gradient map" i have a freak out and run away! :(
  4. Maffe811

    Maffe811 Moderator Staff Member

    Joined:
    Jul 2, 2009
    Messages:
    6,810
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Norway/Norge/Norwegen
    david, make the tut an show Vt and I
  5. Cyrilshark

    Cyrilshark Active Member

    Joined:
    Oct 8, 2008
    Messages:
    2,132
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Graphic Designer
    Location:
    Good ol' US of A :)
    Home page:
  6. Cyrilshark

    Cyrilshark Active Member

    Joined:
    Oct 8, 2008
    Messages:
    2,132
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Graphic Designer
    Location:
    Good ol' US of A :)
    Home page:
    And yes I know it's for photoshop. GM in GIMP is in Colors>Map>Gradient Map
  7. Maffe811

    Maffe811 Moderator Staff Member

    Joined:
    Jul 2, 2009
    Messages:
    6,810
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Norway/Norge/Norwegen
    but we like buggin david :)
  8. David Wood

    David Wood Active Member

    Joined:
    Jul 22, 2009
    Messages:
    5,472
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home page:
    He does at that. :p
  9. Maffe811

    Maffe811 Moderator Staff Member

    Joined:
    Jul 2, 2009
    Messages:
    6,810
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Norway/Norge/Norwegen
    weres the tut??? :p
  10. David Wood

    David Wood Active Member

    Joined:
    Jul 22, 2009
    Messages:
    5,472
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home page:
    see? 8) I have minions
  11. Maffe811

    Maffe811 Moderator Staff Member

    Joined:
    Jul 2, 2009
    Messages:
    6,810
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Norway/Norge/Norwegen
    all hail the master of tuts, the king of gimp, the best of the best (when it comes to gimp):
    DAAAAAaaaaviiii.... what? wrong name? gimme the note! oh.... okay...
    here we go...
    GIIIIIMMP KNOOOOWW HOOOOWW!!!!!

    (sarcasm)
  12. David Wood

    David Wood Active Member

    Joined:
    Jul 22, 2009
    Messages:
    5,472
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home page:
    >:D You will pay for that worthless peasant! :p I just have to come up with a good use of gradient maps and I'll record it. :)
  13. Maffe811

    Maffe811 Moderator Staff Member

    Joined:
    Jul 2, 2009
    Messages:
    6,810
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Norway/Norge/Norwegen
    maybe.... ehh.... il leave you thinkin!
  14. virtualTune

    virtualTune Active Member

    Joined:
    Sep 2, 2009
    Messages:
    4,421
    Likes Received:
    1
    Trophy Points:
    36
    Location:
    Neverland
    Home page:
    :!: @Cyril, don't you think he can tell us himself>? btw. in case you haven't noticed, this forum was made to answer questions, even to members that are active! this is not just for CnC and Showoff!!!!
  15. fencepost

    fencepost Member

    Joined:
    Jan 15, 2010
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Occupation:
    Environmental Scientist
    Location:
    Florida
  16. virtualTune

    virtualTune Active Member

    Joined:
    Sep 2, 2009
    Messages:
    4,421
    Likes Received:
    1
    Trophy Points:
    36
    Location:
    Neverland
    Home page:
    well...they all utilise GM and i thank you for linking them,. but they don't explain what they do and what one would have to do to get the desired change. Say Blue to green. I don't know what will happen!
  17. bladesonic

    bladesonic Member

    Joined:
    Aug 2, 2008
    Messages:
    867
    Likes Received:
    0
    Trophy Points:
    16
    If you want to find out what they do, try it. Just experiment with them.
  18. fencepost

    fencepost Member

    Joined:
    Jan 15, 2010
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Occupation:
    Environmental Scientist
    Location:
    Florida
    The link to the GIMP manual explains exactly what it does. But, I agree with bladesonic: experimentation is the key. The worst thing that can happen is that you'll have to use the Undo command. Well, that's not the worst thing that can happen, but you get the idea. :p
  19. virtualTune

    virtualTune Active Member

    Joined:
    Sep 2, 2009
    Messages:
    4,421
    Likes Received:
    1
    Trophy Points:
    36
    Location:
    Neverland
    Home page:
    yeah i did play around, accidentally hit save....that was the worst that could happen! :| I should try again on a less important piece! ;D
  20. virtualTune

    virtualTune Active Member

    Joined:
    Sep 2, 2009
    Messages:
    4,421
    Likes Received:
    1
    Trophy Points:
    36
    Location:
    Neverland
    Home page:
    ok here we go:
    before
    after


    So you have to duplicate the current layer it is applied to. set it to EG overlay and play with opacity. When I tried it before I always made a new transparent layer. that way nothing showed up however! ;D thx guys.

    @maffe, I'll be glad to help you!

    ignore the render :p it sucks!

Share This Page