It is currently 25 Feb 2018, 07:43

GIMP Python Fu ScriptsMultiple Shadows Script for GIMP (Showcase | Slideshow)

Share your Python Fu scripts for GIMP here
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/11
Posts: 2195
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,278.81 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1219
x 264
Contact:
Canada

Multiple Shadows Script for GIMP

Post#1 by tim » 04 Nov 2016, 21:39


So you've got multiple layers on top of one background and you want to simply drop shadows, but you want each layer to drop shadows on other layers and so on so that you have a multiple depth effect where the layer on top looks like it's above the rest of layers and layer below looks like it's a little lower and so on.

This script will do that.
It'll drop shadow of each layer onto lower layers and making the appropriate cuts.
And at the end you'll have a single shadow layer on top that makes it look like you have multiple shadows going on.


:download:
Multiple_Shadows.zip #
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder)
(1.69 KiB) Downloaded 89 times
:download:
Multiple_Shadows (2).zip #
version 2 - only perform work on visible layers. Some minor speed improvements
(1.84 KiB) Downloaded 40 times
:download:
Multiple_Shadows (3).zip #
version 3 - Reuse selection channels for minor speed improvements
(1.97 KiB) Downloaded 54 times
Menu-location: Filters -> Light and Shadows -> Multiple Shadows ...

sample run on an image with multiple layers with transparency over top of solid background.
Attachments
multiple_shadows.jpg
multiple_shadows.jpg # (58.07 KiB) Viewed 987 times (Watermarked | Thumbnail)
multiple_shadows_sample_with_outlined_text.jpg
multiple_shadows_sample_with_outlined_text.jpg # (79.95 KiB) Viewed 985 times (Watermarked | Thumbnail)
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
User avatar
Wallace
Forum Member
View: Showcase | Slideshow
Topic Posts: 3/11
Posts: 220
Joined: 11 Oct 2016, 21:24
Cash on hand: 294.42 GLP
Bank: 1,479.62 GLP
Gender: Guy
Location: Arizona USA
Website: http://gimpchat.com
Operating System: Windows
GIMP Version: 2.8.18
My YouTube Channel
My deviantart Account
x 3
x 39
Contact:
Gimp Nation

Post#2 by Wallace » 10 Nov 2016, 02:39


This script takes a very long time to complete.
I used it on an image with 31 layers (my mistake) and I became impatient, waiting for the script to finish.
Needless to say, but I killed the processes before it finished.
0 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/11
Posts: 2195
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,278.81 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1219
x 264
Contact:
Canada

Post#3 by tim » 10 Nov 2016, 02:47


I don't even have patience for twenty layers, only sixteen. It's slow because it has to check all layers above the layer its dropping shadow on and so for example for first layer on top it has to drop shadow on all layers on bottom and at each drop it has to delete all selection of layers above
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Wallace
Forum Member
View: Showcase | Slideshow
Topic Posts: 3/11
Posts: 220
Joined: 11 Oct 2016, 21:24
Cash on hand: 294.42 GLP
Bank: 1,479.62 GLP
Gender: Guy
Location: Arizona USA
Website: http://gimpchat.com
Operating System: Windows
GIMP Version: 2.8.18
My YouTube Channel
My deviantart Account
x 3
x 39
Contact:
Gimp Nation

Post#4 by Wallace » 10 Nov 2016, 03:05


admin wrote:I don't even have patience for twenty layers, only sixteen. It's slow because it has to check all layers above the layer its dropping shadow on and so for example for first layer on top it has to drop shadow on all layers on bottom and at each drop it has to delete all selection of layers above
That explains it.
Thanks. :thumbsup:
0 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/11
Posts: 2195
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,278.81 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1219
x 264
Contact:
Canada

Post#5 by tim » 10 Nov 2016, 04:03


I had to try to see how long it took for me,
even with some improvements this image took 1 hour 4 minutes with 32 layers.
When a 16 layer took less than 5 minutes more like 3.
Attachments
450x510x32layers-took-1hr4min.png
450x510x32layers-took-1hr4min.png # (127.29 KiB) Viewed 914 times (Watermarked | Thumbnail)
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Wallace
Forum Member
View: Showcase | Slideshow
Topic Posts: 3/11
Posts: 220
Joined: 11 Oct 2016, 21:24
Cash on hand: 294.42 GLP
Bank: 1,479.62 GLP
Gender: Guy
Location: Arizona USA
Website: http://gimpchat.com
Operating System: Windows
GIMP Version: 2.8.18
My YouTube Channel
My deviantart Account
x 3
x 39
Contact:
Gimp Nation

Post#6 by Wallace » 12 Nov 2016, 01:45


admin wrote:I had to try to see how long it took for me,
even with some improvements this image took 1 hour 4 minutes with 32 layers.
When a 16 layer took less than 5 minutes more like 3.
I think I would have had the same experience, with my 31 layers, but I didn't wait to find out.
The default of 16 layers or less, seems to be the sweet spot for this filter.
0 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/11
Posts: 2195
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,278.81 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1219
x 264
Contact:
Canada

Post#7 by tim » 12 Nov 2016, 03:19


i also tried 20 layers and larger size image like 1500 x 2000 or so and i ran out of ram or something i left it over nite running and in the morning the result wasn't accurate. :D
0 x



aka Tin
Image gimplearn.net                                              

Post Reply

Last 20 Members Who Visited This Topic

User avatar tim (2)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Ella
2: leopardo-40
3: animicule
4: Ella
5: Anonymous
6: Pat625
7: gnerd

Who is online

Users browsing this forum: No registered users and 1 guest