It is currently Wed Apr 24, 2024 11:02 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Looking for a "Blending" - Script-fu or plug in
PostPosted: Tue Feb 14, 2012 9:40 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
I sure wish there was a plug-in that could make a blend that blends from a contoured edge to a straight edge like this image I have place:

Image

A plug in that can take an image on a layer and continually make copies and resize horizontally and change the colors as it gets thinner would make a whole bottle type of object. Thats what I would like to find.

Alan


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Tue Feb 14, 2012 10:50 pm  (#2) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Have a look at the CloneLayer Tool, if you have GIMP 2.7.x. It won't do everything but it might get you started.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 11:00 am  (#3) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Here ya go, hot of the presses: http://silent9.com/incoming/sc ... _blend.scm

It will use the active gradient and blend it across the current selection (or the whole image if no selection - but that is silly to do...) either horizontally or vertically:
Attachment:
selection_blend.jpg
selection_blend.jpg [ 25.94 KiB | Viewed 5060 times ]


There is one oddity - it seems to have a bug on my system in the horizontal mode where I get a PDBCallback error on the progress bar, which is why I've redirected the error messages to the console. It doesn't happen in the vertical mode, oddly enough, so runs much slower in the vertical mode as it updates the progress bar when blend is called.....

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 12:13 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
Wow! Thanks RobA

That looks really good. Looks like it would work perfectly. It even can follow two contours on each side of the selection. Can't wait to try it.

I am a graphic designer and not very good with scripts. Can somebody show me what to do with the script text? Do I just save it as a .txt file and put it into my Gimp 2.6 scripts folder?

Alan


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 12:32 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
You save the text as a SCM extension in your scripts folder.

Hrmmm..horizontal blend worked okay for me vertical takes awhile. :)
Then it works
Image

Image

I take it this is for 2 color gradients only?
Whats the difference in just using a gradient fill for the selection?

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 12:34 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Right click the link and save the .scm file into your C:\Documents and Settings\<username>\.gimp-2.6\scripts folder rather than the gimp installation folder (assuming you are using windows XP). Not sure where the comparable location is in other versions of windows. In most linux distributions it would be ~/.gimp-2.6/scripts

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 12:41 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Rod wrote:
You save the text as a SCM extension in your scripts folder.

Hrmmm..horizontal blend worked okay for me vertical takes awhile. :)
Then it works

I take it this is for 2 color gradients only?
Whats the difference in just using a gradient fill for the selection?


Not sure why vertical didn't work. Oddly enough it is much slower because it is working correctly :) (The blend call updates the progress bar)

It works for me. Do you get errors?
Attachment:
blend.jpg
blend.jpg [ 16.21 KiB | Viewed 5038 times ]


It will work with ANY gradient, (what ever is active).

EDIT: I've uploaded a new version that provides a gradient picker and a reverse checkbox to reverse the gradient.

The gradient follows the shape of the selection in a horizontal or vertical manner - something that can't be done with the a gradient fill on the whole selection.

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Last edited by RobA on Wed Feb 15, 2012 12:57 pm, edited 1 time in total.

Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 12:52 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
A slightly different approach from Mr A's, the following script will add a command "Filters->Distorts->Contour Fill Selection", which will scale each row of the current layer to fill the selection. It probably still needs some work but seems to be in a somewhat usable state.

http://chiselapp.com/user/saulgoode/rep ... d6366b14ed

Example (selection outlined in blue):

Attachment:
contour-fill-sel.jpg
contour-fill-sel.jpg [ 129.87 KiB | Viewed 5032 times ]


Produces the following new layer (original layer and selection are retained):

Attachment:
contour-fill-result.png
contour-fill-result.png [ 136.23 KiB | Viewed 5032 times ]

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:03 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I do not get any errors at all.It just doesn't blend correctly with vertical.
I am downloading your new one now.

Thanks Saulgoode.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:10 pm  (#10) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Oh, I need to check out saulgoode's too.

This is RobA's. I used horizontal for the frowny O and the vertical for the background.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:16 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
OK my real stupidity is showing now. I have saved the .scm file in my scripts folder but now what do I do? I can't find it in the [file create] or [script fu] pull down menus.

Alan


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:16 pm  (#12) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Very nice script RobA, thanks now for Saul's.

Image

_________________
Image


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:17 pm  (#13) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Look under select > selection blend

_________________
Image


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:24 pm  (#14) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
PegLeg44 wrote:
OK my real stupidity is showing now. I have saved the .scm file in my scripts folder but now what do I do? I can't find it in the [file create] or [script fu] pull down menus.

Alan
You need to refresh your scripts: Filters > Script-Fu > Refresh Scripts. Or you can close and re-open GIMP.

You will find the script in the image menu under Select > Selection Blend.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:35 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Wow Saulgoode that works pretty nice!

Image

Basically i can now take any image and warp it to a selection. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:40 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Robs doesn't run at all for me now. :\

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:44 pm  (#17) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Rod wrote:
Robs doesn't run at all for me now. :\


What is your gimp version?

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:49 pm  (#18) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
RobA's new one didn't run for me either. I used the same image as I did for the first one and the same gradient. After I changed the gradient, it worked fine. Think the gradient may not have "taken" since I hadn't opened a new image.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 1:51 pm  (#19) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
This is my Saul script
Image Image

_________________
Image


Top
 Post subject: Re: Looking for a "Blending" - Script-fu or plug in
PostPosted: Wed Feb 15, 2012 2:11 pm  (#20) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Oregonian wrote:
RobA's new one didn't run for me either. I used the same image as I did for the first one and the same gradient. After I changed the gradient, it worked fine. Think the gradient may not have "taken" since I hadn't opened a new image.


Thanks - That found a little bug.

If you set the gradient-picker default in a script to be "" it shows up in the GUI as the current active gradient, but it gets passed into the script itself as "" if you don't actually click on it and select a gradient - which I had to check for.

I've updated the file.

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) New GIMP Script Fu / Plug Ins

6

No new posts Attachment(s) Dodge blending mode but with gradient fade?

12

No new posts Attachment(s) How does it works on Layer Blending Mode "Add" with Alpha Channel?

4

No new posts Attachment(s) Don't work procedures plug-in-bump-map, plug-in-displace

2

No new posts Attachment(s) Looking for Script Coder to make Script of my VHS effect

2



* Login  



Powered by phpBB3 © phpBB Group