Gimptalk - Premier Gimp Community: Exclusion Script - Gimptalk - Premier Gimp Community

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Exclusion Script

#1 User is offline   gimpbrushmod 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 20-May 06

Posted 20 May 2006 - 09:14 PM

Anybody know of a plugin that replicates the "exclusion" layer mode that you can find in pretty much every other PS-type program? I have searched far and wide and can't find anything, so any help would be appreciated.
0

#2 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 20 May 2006 - 09:45 PM

Top Layer: Set layer Mode to "Difference"
Bottom layer: Add Layer Mask (from grayscale copy of layer)
Bottom layer: Mask to Selection
Top layer: Add Layer Mask (from selection)
Bottom layer: Delete Layer Mask

Of course, the mask would need regenerating if the bottom layer changed (in this sense it does not perfectly emulate an "Exclusion Layer Mode").
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#3 User is offline   gimpbrushmod 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 20-May 06

Posted 20 May 2006 - 10:05 PM

I understand now ... thank you for your help!
0

#4 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 21 May 2006 - 03:22 AM

Quote

I don't quite understand what you mean when you say Top Layer and Bottom Layer. Are you working with two layers of the base image?


ALL layer modes in the GIMP (except dissolve*) specify how that layer combines with the image underneath it (this image is called the "projection"). This means that you must have more than one layer for the layer mode to be meaningful. I do not understand what Photoshop is doing to handle a single layer set to "Extraction Mode" (perhaps you can provide some samples and describe what is happening). I am assuming that "Extraction Mode" means to replace the parts of the upper layer which are different than the darker parts of the bottom layer with the bottom layer (this is the definition I found on the Internet, perhaps it is different than what Photoshop does).

In my description, "Top layer" refers to the layer which you want to be in "exclusion mode". I have simplified things in this description by assuming that there is only one layer underneath it. In order to accurately generate this effect, you would have to create a single layer that merges the ones underneath it.

This would be rather tedious and so I have written a script-fu which automatically does this. The script can be downloaded from http://flashingtwelv...lusion-mask.scm and run from the "Script-fu->Layer Effects->Exclusion Mask" menu. I would appreciate it very much if you would try this script and post some comparisons to your Photoshop images.


* "Dissolve Mode" is special amongst the layer modes because it does not use any information from the layers underneath it, it uses only its own alpha channel.
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#5 User is offline   gimpbrushmod 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 20-May 06

Posted 21 May 2006 - 03:43 AM

Thank you very much. I will try out your script and let you know if it's what I'm looking for. I appreciate you taking the time to reply in such detail. ^_^
0

#6 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 21 May 2006 - 07:25 AM

There was a small error in the script and if anyone downloaded it before reading this post then they might wish to update it with the current one.

The problem concerned the UNDOing of the script: when the script runs, the first thing it does is to save the current selection so that it can be restored later. The removal of this temporary selection channel was erroneously left as an operation outside the UNDO history (requiring two UNDOs to undo the effect). The new version correctly deletes this temporary channel (so a single UNDO properly restores the image to its original state).
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#7 User is offline   gimpbrushmod 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 20-May 06

Posted 21 May 2006 - 10:19 PM

An exclusion layer in PS is usually done with a bucket fill of the layer with a dark blue color (although it can be done with other colors for a different effect), which is then set to exclusion mode.

Definition of Exclusion Mode for PS: Exclusion uses the darkness of the lower layer to mask the difference between upper and lower layers.

As far as I can tell, your script achieves as close to the desired result as anything else I've seen for the GIMP. I simply run your script on a dark blue (top) layer (with my base image as the bottom layer), and it seems to work. If you Google "exclusion mode tutorial", you should be able to find plenty of examples of the end result.

Thank you again for taking the time to reply in such detail. Your script works wonderfully.
0

#8 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 22 May 2006 - 09:34 AM

Thanks for your response.

Quote

An exclusion layer in PS is usually done with a bucket fill of the layer with a dark blue color (although it can be done with other colors for a different effect), which is then set to exclusion mode.

I understand now. But the layer doesn't have to be filled with a solid color, it is just commonly used this way.

Quote

Definition of Exclusion Mode for PS: Exclusion uses the darkness of the lower layer to mask the difference between upper and lower layers.

Yep. That is pretty much what my script does: creates a mask out of the bottom "layer" and applies it to the top layer and changes the Mode of the top layer to Difference. I am not sure why my script produces a slightly different result than PS but I think that there may be a slight difference between the different Differences. :h:
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#9 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,256
  • Joined: 13-June 05

Posted 23 May 2006 - 09:54 PM

I try the routine and the script on a sample i didn't notice any difference from the ps mode,at soon i will use on more complex image i will post a link to the output

BTW is not possible add to gimp new layer mode?
0

#10 User is offline   saxon2309 

  • Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 30-July 06

Posted 02 September 2006 - 06:52 PM

The script doesn't work for me... I really want to use this script but it wont work :( It just like deletes the picture.... I took two screen shots before and after I used the script... Does anything look wrong?


Before I use the script:
Posted Image


After I use the script:
Posted Image


Please help me...
0

#11 User is offline   saxon2309 

  • Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 30-July 06

Posted 02 September 2006 - 06:53 PM

-----
0

#12 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 02 September 2006 - 07:30 PM

Gimpbrushmod wrote:

Quote

I simply run your script on a dark blue (top) layer (with my base image as the bottom layer), and it seems to work.


While the script doesn't care if the top layer is filled with blue, it generally expects that the bottom layer holds the image to be modified. If your were to place your transparent layer above the image of the girl and then run the script (with the top layer active), the mask would be properly generated (although for a transparent layer there would be no change, you will want to fill the top layer with HTML=#052FA5).
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#13 User is offline   saxon2309 

  • Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 30-July 06

Posted 02 September 2006 - 08:19 PM

Ok.. ill try that and post my results.. one second..
0

#14 User is offline   saxon2309 

  • Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 30-July 06

Posted 02 September 2006 - 08:28 PM

ORIGNIAL:
Posted Image

PaintShop Pro:
Posted Image

GIMP:
Posted Image

Okay, the PSP one is lighter and the GIMP one is darker and has yellow and stuff. In the PSP one her face is a light and smooth, which I like. In the gimp one her face is too orange and yellow, not smooth... I like the lighter one, it looks more "vintage". Is there anyway to make it look more like the lighter PSP one???? I tried putting a white layer overtop and adjsting the Opacity, but that just makes it faded...
0

#15 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 03 September 2006 - 06:06 AM

Thank you for posting the images, Saxon. I do not have Paint Shop Pro installed on my computer and your help is appreciated.

I believe you may have omitted a couple of the steps in the tutorial which "set up" the image (the sharpening, duplicating, and setting the mode to Screen and the opacity). When I performed those steps I still end up with very noticeable differences (but not so extreme as your example). I will look into this some more later in the week; I have a suspicion that Paint Shop Pro's "exclusion blend mode" includes a certain amount of "inclusion masking" but I am not sure (I have compared my output to that of Pegtop Delphi and they are identical; PSP is apparently doing something different). If you encounter any other tutorials for PSP's blend modes, feel free to send me a PM.

Posted Image
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#16 User is offline   saxon2309 

  • Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 30-July 06

Posted 04 September 2006 - 08:32 PM

Cool, thanks for all your help. I got the same results as yours... which is pretty good! :D I also made a site layout really quick using exclusion:


Posted Image

:h: :l:
0

#17 User is offline   capnhud 

  • Member
  • PipPip
  • Group: Members
  • Posts: 576
  • Joined: 13-July 05

Posted 22 September 2006 - 12:22 PM

When you use this .scm do you have to change the layer from difference to screen and then sharpen, duplicate, and adjust opacity to acheive the desire effect?
I know I'm in my own little world. But its ok. They know me HERE
0

#18 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 22 September 2006 - 01:28 PM

Yes, the script is only intended to emulate an "exclusion mode" between the two layers, the other steps of the tutorial would still need to be performed and the opacity of the layers would need to be adjusted to achieve the desired result .

In my opinion, the script is somewhat worthless. All it does is perform the five basic steps described in the second post in this thread. If the time is taken to understand what is taking place in those steps, one will learn much more than just inputting values taken from a web tutorial.

The idea of masking off portions of an upper layer that somehow affects the image underneath is fundamental to image manipulation. Simple highlights and shadows adjustments, removing noise, and exclusive "colorization" all share the principle that the amount of the effect should be based on the content of the lower layer. Photoshop (and apparently PaintShop Pro) seem to teach their users that image manipulation consists of inputting numbers and moving sliders in a dialog box, I prefer to think that image manipulation consists of manipulating images. :l:
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#19 User is offline   capnhud 

  • Member
  • PipPip
  • Group: Members
  • Posts: 576
  • Joined: 13-July 05

Posted 22 September 2006 - 02:33 PM

So the sharpening and duplicating are only done on the bottom layer and then the script is applied to the blue layer?
I know I'm in my own little world. But its ok. They know me HERE
0

#20 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 22 September 2006 - 03:12 PM

Correct.
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic