It is currently Wed Oct 01, 2014 4:17 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 112 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next
Author Message
 Post subject: GC Shadow V1.2 (with Gradient Shadows & Glow)
PostPosted: Mon May 27, 2013 1:34 am  (#1) 
Offline
GC Founder/Coder
User avatar

Joined: May 22, 2008
Posts: 4579
Location: Gimpville
GC Shadow V1.2 (07-2013) - (c) Copyright 2013 GPLv3

Created by GnuTux

Special thanks to Graechan and SaulGoode for their contributions.

===========================
Improved Drop Shadow Script
===========================
Added Glow, Inner Shadow, Inner Glow and Feathering
Specify separate x & y blue radius
Added the ability to specify shadow name (or pass from another script)
Label shadow layers and using selected (or passed) layer name + shadow type
Added the ability to keep drop shadow on top at all times
V1.1 Now includes gradient shadow & glow support
Fully compatible wih GIMP 2.6.x or GIMP 2.8.x (with layer group support)

Image

Any suggestions for improvements/enhancements to this script, would be appreciated.

Located in Filters/Light and Shadow/GC Shadow..

Script Updated to V1.1 Official Release

Change Log
RC V0.1 - Initial Release Candidate
RC V0.2 - Fix Gaussian limits, Merge visible layers, Clear script's selections on exit
RC V0.3 - Resize shadow layer to compensate for shadow offset, blur & feather, Allow resize toggle, Correct shadow X & Y minimum limits
RC V0.4 - Fix Merge Visible Layers Bug that was introduced in RC v0.03
RC v0.5 - Improve layer positioning logic & correct artifact bug when resizing layers, Add option to merge selected layer with shadow layer
RC V0.6 - Added support for GIMP 2.8 layer groups, Name layers with selected shadow options, If shadow name is blank (default), use selected layer name, dump merge visible layers.
RC V0.7 - If shadow name is blank (default) then use selected layer name
Add toggle to keep shadow layer above selected layer
Simplify shadow merge logic
Always add alpha channel
Dump merge visible layers option
Rework image sizing with logic from original GIMP Drop Shadow Script
Ensure compatibility with GIMP 2.6.x & GIMP 2.8.x
=====================
V1.0 - Official Release
Correct small bug with resizing when glow is selected
When resizing the image, execute layer to image size on selected layer
V1.1 - Added Support for Gradient Shadow & Glow
V1.2 - Corrected bug to properly handle linked layers

Download the script from GIMP Scripts

Image
Image
Image
Image

Gradient Shadows

Drop Shadow
Image

Inner Shadow
Image

Outer Glow
Image

Inner Glow
Image

Inner & Outer Glow
Image

Extrusion
Image

Image

_________________
Image
"The only way to have a friend is to be one." - Emerson


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 2:13 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 1992
Location: US
Tested your script. Few notes.
Script leaves alpha selection active.
Feathering works on selection, so i don't see any point in doing that if the script gaussian blurs shadow afterwards.
Maybe replace it by adding noise.
Blurring by zero value (e.g. i need a sharp shadow) returns error on invalid gaus-blur argument.
Merge layers as an option?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 2:21 am  (#3) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 3385
Location: Australia
GnuTux may I suggest that if no selection was there to begin with then no selection should be there when finished

(let* (
(shadow-layer -1) ; Shadow layer
(saved-selection -1) ; Save Selection Variable
(sel (car (gimp-selection-is-empty img)))
)

then at the end

(if (= sel TRUE) (gimp-selection-none img))

_________________
Image


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 2:23 am  (#4) 
Offline
GC Founder/Coder
User avatar

Joined: May 22, 2008
Posts: 4579
Location: Gimpville
K1TesseraEna wrote:
Script leaves alpha selection active.

Could that be useful or is it more of a problem? I was thinking if one is performing multiple manual selections, it should keep those. Otherwise, if the results were unsatisfactory, the user would have to select again.

K1TesseraEna wrote:
Feathering works on selection, so i don't see any point in doing that if the script gaussian blurs shadow afterwards.
Maybe replace it by adding noise.

That's an interesting idea. :bigthup

K1TesseraEna wrote:
Blurring by zero value (e.g. i need a sharp shadow) returns error on invalid gaus-blur argument.
Merge layers as an option?

Ah, yes. That's a bug. Thanks for pointing that out. Merge layers sounds good!

Thanks!

_________________
Image
"The only way to have a friend is to be one." - Emerson


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 2:29 am  (#5) 
Offline
GC Founder/Coder
User avatar

Joined: May 22, 2008
Posts: 4579
Location: Gimpville
Graechan wrote:
GnuTux may I suggest that if no selection was there to begin with then no selection should be there when finished

That is a good point, Graechan. I probably shouldn't leave a selection the script generates. That might have been K1TesseraEna's point, as well. I guess I should keep any selections coming in, but when no selections are there to begin with, don't add any. :bigthup

_________________
Image
"The only way to have a friend is to be one." - Emerson


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 3:00 am  (#6) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 3385
Location: Australia
GnuTux The script results are great

Image

Image

Image

_________________
Image


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 3:55 am  (#7) 
Offline
GC Founder/Coder
User avatar

Joined: May 22, 2008
Posts: 4579
Location: Gimpville
:tyspin Graechan, Esper and K1TesseraEna for testing this out and for your suggestions.

Your results are better than mine, Graechan. :hehe

I've fixed the Gaussian bug, ensured the selections are handled properly and added a merge visible layers option. Updated the first post with the new code.

I still need to decide the best method of resizing the shadow layer to compensate for shadow and blur offsets. As of now, it's "resize canvas", then "layer to image size". I'll go with that if there are no better suggestions.

Inner glow (black)
Image

_________________
Image
"The only way to have a friend is to be one." - Emerson


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 7:25 am  (#8) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1282
Location: not from Guildford after all
You should increase the size of your shadow layer before blurring (by twice the blur radius) so that the blur does not get "chopped off" and have a hard edge as shown in the following image.

Attachment:
wilber-shadow.png
wilber-shadow.png [ 39.41 KiB | Viewed 550 times ]


As to how resizing should be handled, the default Drop Shadow script seems to handle this properly and as long as you are willing to license your script under GPLv3, you are free to copy whatever you need from it.

_________________
A man who does not read good books has no advantage over a man who cannot read them. -- Mark Twain


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 11:44 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 1992
Location: US
I second what saulgoode mentioned.
Shadows get cut off if the layer size is too small like in this case i used dynamic textbox (vs Fixed).

ImageImage


It can be fixed if script executes Layer_to_Image_Size command from PDB first.
As of now I have to make sure I've done it manually.

I like the script and I'm gonna keep it.
One request, thou. Script creates dropped shadow anywhere between 0 and 90 degrees only.
Of course i can move shadow layer around (if i hadn't merged it) but the possibility to
offset shadow in *all directions* would be great.
For that the script should recognize negative values for offset by x/y axes.
Or implement angle offset like Esper suggested.

Thank you!

_________________
Image


Top
 Profile  
 
 Post subject: Re: Custom Shadow Procedure
PostPosted: Mon May 27, 2013 12:03 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Aug 10, 2012
Posts: 3349
Location: Formerly From NYC, Now Living in Arizona
One thing I'd like to mention is that shadows are not entirely black in color all the time. This is one reason I have a tendency to create my own shadow using a gradient and not just solid black.

Is there a way to incorporate the use of gradients in the script?

_________________
Image

"A wise man can learn more from a foolish question than a fool can learn from a wise answer."
-Bruce Lee


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 112 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial Feed    * Subscribe to Gimp Chat's G'MIC Feed


Powered by phpBB3 © phpBB Group