It is currently Tue Jul 23, 2024 10:25 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Stained Glass Script(s)
PostPosted: Wed May 28, 2014 11:08 am  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
Following this conbagui's tutorial

This script will be run after user manually draw whatever text or images (it runs conbagui's tutorial steps 3 to 12).
So here it is.

1) copy conbagui's Candle.ggr file into C:\Program Files\GIMP 2\share\gimp\2.0\gradients
2) copy conbagui's pattern files (3D brown texture pattern.jpg,Vitro.pat,Frosted Glass texture.jpg) into C:\Program Files\GIMP 2\share\gimp\2.0\patterns
3) put the below script into your gimp's scripts folder
Attachment:
Stained_glass.scm [8.61 KiB]
Downloaded 278 times

4) open conbagui's Rough wall.jpg in GIMP
5) create a new layer with your (black) art whatever it may be text, or shapes (have this layer selected, if the layer is a text layer, right click and click on "Discard Text Information" to make it just a normal layer and not text). The next step will run script on this layer.
6) Script-fu -> Stained glass and a dialog will open that looks like below. Just click OK to run conbagui's defaults.
Image


Here are conbagui's files needed to run this script (repackaged here for your convenience).
Attachment:
conbaguisFiles.zip [2.4 MiB]
Downloaded 326 times

_________________
TinT


Last edited by trandoductin on Sun Jun 01, 2014 6:30 pm, edited 4 times in total.

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: Stained Glass Script(s)
PostPosted: Wed May 28, 2014 11:25 am  (#2) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
Here's the script to run the window portion of the tutorial(steps 13 to step 22).

1) copy conbagui's Candle.ggr file into C:\Program Files\GIMP 2\share\gimp\2.0\gradients
2) copy conbagui's pattern files (3D brown texture pattern.jpg,Vitro.pat,Frosted Glass texture.jpg) into C:\Program Files\GIMP 2\share\gimp\2.0\patterns
3) put the below script into your gimp's scripts folder
Attachment:
Stained_glass_window.scm [8.82 KiB]
Downloaded 180 times

4) open conbagui's Rough wall.jpg in GIMP
5) File Open as layers, and open conbagui's "Windows line drawing.png".
Manually select the inner portions of the window excluding the window frame or perform steps below
Alpha to Selection
Grow selection by 35 pixels
Shrink selection by 50 pixels.

so it looks like below
Attachment:
window_excluding_frame_selected.jpg
window_excluding_frame_selected.jpg [ 160.12 KiB | Viewed 4650 times ]

This will tell the script that you want the selected area to be stained glass. And the unselected area as window frame.
6) Script-fu -> Stained glass window - and a dialog will open that looks like below. The defaults of conbagui should be fine. Click OK and let the script run.
Image

_________________
TinT


Last edited by trandoductin on Sun Jun 01, 2014 6:31 pm, edited 3 times in total.

Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Wed May 28, 2014 11:27 am  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
I made the changes to these scripts as Dinasset suggested to set users choose patterns (already installed) instead of choosing browsing for file names so make sure you do steps 1 and 2 before trying to use these scripts.

_________________
TinT


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Wed May 28, 2014 1:34 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Tin,
my first trials of your scripts

Attachment:
TinBaobab.png
TinBaobab.png [ 1.95 MiB | Viewed 4619 times ]


Attachment:
TinWindows.png
TinWindows.png [ 1.36 MiB | Viewed 4619 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Wed May 28, 2014 1:37 pm  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
wonderful background images :hi5

_________________
TinT


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 8:26 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 591
Trandoduction, your script doesn't run in Portuguese. I think your script contains the word "clipboard" that doesn't exist in Portuguese.
The same problem happened with the Graechan's script: Nic nacs logo. He made the substitution of the word "clipboard" at my request and the script works fine now.
I'm posting two of Graechan's escript. Nic nacs logo before modification contains the word "clipboard" to refer to brush that was in the clipboard. Nic nacs logo after modification: Graechan used the word "TMP-brush" to replace "clipboard."


Attachments:
Nic Nacs Logo before modification.scm [18.93 KiB]
Downloaded 126 times
Nic Nacs Logo after modification.scm [19.13 KiB]
Downloaded 130 times

_________________
Image
Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 10:19 am  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
Carlos did you download these files and overwrite the older ones? These new ones posted above don't refer to "clipboard" at all.

_________________
TinT


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 10:38 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 591
You can read at Nic nac logo before modification:

(nic-nacs-multi-brush-fill image brush-layer
FALSE ;check
'("Clipboard" 100 44 0) ;brush1
"Red" ;brush1-color
FALSE ;add-brush2
'("Clipboard" 100 44 0) ;brush2
"Green" ;brush2-color
FALSE ;add-brush3
'("Clipboard" 100 44 0) ;brush3
"Blue" ;brush3-color
spacing
max-size
100 ;min-size
1 ;in-angle
FALSE ;keep-selection-in
FALSE ;conserve
)
(gimp-display-new image)

_________________
Image


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 10:47 am  (#9) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
Carlos,

I see the modifications.

But my older version of the scripts uses "Clipboard" (because they load the patterns using file names and then copy to clipboard to use as pattern).

The new ones posted above do NOT use "Clipboard" at all. The "clipboard" lines are all commented out as I made a change to use pattern instead of filenames.

When you run my script(s), does it let you choose filenames or patterns. If you're still choosing filenames then you have the older versions of the script.
The new scripts lets you choose patterns and do not use "Clipboard".

I double checked and found all references to "clipboard". There are 5 of them and they are indeed all COMMENTED OUT (green colored text below).
Attachment:
clipboard_commented_out.jpg
clipboard_commented_out.jpg [ 398.46 KiB | Viewed 4533 times ]


Please try and let me know.

_________________
TinT


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 12:34 pm  (#10) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7760
Location: On the other side of this screen
I just downloaded Diego's script and have tried it twice but am not sure why I am getting all these error messages before even running it.
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Rough Wall.jpg' not found
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Vitro' not found
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Frosted Glass texture.jpg' not found
GIMP Error
Calling error for procedure 'gimp-gradient-get-uniform-samples':
Gradient 'Candle' not found
Inner Shadow Warning
Error: Layer is not part of image.
Stained Glass Text Warning
Error while executing script-fu-stained-glass-txt2:
Error: Procedure execution of python-layerfx-inner-shadow failed
GIMP Warning
Plug-In 'Stained Glass Text' left image undo in inconsistent state, closing open undo groups.
GIMP Error
Calling error for procedure 'gimp-gradient-get-uniform-samples':
Gradient 'Candle' not found

_________________


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 1:43 pm  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
sallyanne wrote:
I just downloaded Diego's script and have tried it twice but am not sure why I am getting all these error messages before even running it.
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Rough Wall.jpg' not found
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Vitro' not found
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Frosted Glass texture.jpg' not found
GIMP Error
Calling error for procedure 'gimp-gradient-get-uniform-samples':
Gradient 'Candle' not found
Inner Shadow Warning
Error: Layer is not part of image.
Stained Glass Text Warning
Error while executing script-fu-stained-glass-txt2:
Error: Procedure execution of python-layerfx-inner-shadow failed
GIMP Warning
Plug-In 'Stained Glass Text' left image undo in inconsistent state, closing open undo groups.
GIMP Error
Calling error for procedure 'gimp-gradient-get-uniform-samples':
Gradient 'Candle' not found


sallyanne,
Diego's script and my scripts expect pattern files to be installed already so
you'll have to do these steps before opening GIMP, if you're running Diego's scripts you'll need step 3 as well.

1) copy conbagui's Candle.ggr file into C:\Program Files\GIMP 2\share\gimp\2.0\gradients or your gimp's gradients folder
2) copy conbagui's pattern files (3D brown texture pattern.jpg,Vitro.pat,Frosted Glass texture.jpg) into C:\Program Files\GIMP 2\share\gimp\2.0\patterns or your gimp's pattern's folder


3) Diego's scripts expects "Rough wall.jpg" to be installed so you'll need to copy conbagui's "Rough wall.jpg" into your gimp's pattern's folder.

Let me know if this works for you.

_________________
TinT


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 1:53 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
sallyanne wrote:
I just downloaded Diego's script and have tried it twice but am not sure why I am getting all these error messages before even running it.
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Rough Wall.jpg' not found
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Vitro' not found
GIMP Error
Calling error for procedure 'gimp-pattern-get-pixels':
Pattern 'Frosted Glass texture.jpg' not found
GIMP Error
Calling error for procedure 'gimp-gradient-get-uniform-samples':
Gradient 'Candle' not found
Inner Shadow Warning
Error: Layer is not part of image.
Stained Glass Text Warning
Error while executing script-fu-stained-glass-txt2:
Error: Procedure execution of python-layerfx-inner-shadow failed
GIMP Warning
Plug-In 'Stained Glass Text' left image undo in inconsistent state, closing open undo groups.
GIMP Error
Calling error for procedure 'gimp-gradient-get-uniform-samples':
Gradient 'Candle' not found


you may change everything in the parameters, so choose what you have in...

but - as Tin said - if you want to use it with the defaults, defaults require conbagui's resources

_________________
"Where am I ?"


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Thu May 29, 2014 4:51 pm  (#13) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7760
Location: On the other side of this screen
Thankyou guys. I had an idea it may have been because I didn't have particular resources downloaded. I may give the script a miss. Give me more of an incentive to do the tutorial.

_________________


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Fri May 30, 2014 4:30 pm  (#14) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
Thanks to Carlos for finding a bug in my script.
If you have a layer named with some name with a hash(#) and a number (for example: "Layer #1"). And you run the script on this layer, you'll get an error.
The latest version (in the 1st post of this topic/thread) fixes this bug.

_________________
TinT


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Sat May 31, 2014 12:07 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 591
The new version of the script gave me this error message. Alert = alert, warning. I remember that Diego's script works well. So, my plugin Python-layer-fx works well too.


Attachments:
Stained glass script error trandoductin May31-2014.png
Stained glass script error trandoductin May31-2014.png [ 14.82 KiB | Viewed 1723 times ]

_________________
Image
Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Sat May 31, 2014 1:56 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Carlos,
try with a higher image, more than 700 pixels (it seems that the value in error is the y in the centre of the gradient)
Tin will look after that problem, I guess

_________________
"Where am I ?"


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Sun Jun 01, 2014 6:36 pm  (#17) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4041
Location: Canada
Carlos,
It's because it was hardcoded to conbagui's y-center value of 650.

I have made a change to both scripts to set to a percentage of conbagui's numbers multiplied by your image height ((650/1200)*your image height).
The latest version of both files in post #1 and post #2 should get rid of this error.

Please try again and let me know if it works for you.

_________________
TinT


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Mon Jun 02, 2014 5:16 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12727
Location: Spain, Aragón
Thank you so much trandoductin, other script for playing. It runs great! Good Job! :jumpclap :tyspin


Attachments:
Stained Glass Arch.png
Stained Glass Arch.png [ 853.33 KiB | Viewed 1677 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Mon Jun 02, 2014 7:35 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
I like this script, but that bevel and emboss is bit too much for my taste.
Stained glass is usually flat, now it looks more like a thick button with the bevel effect.
I´d remove the bevel and change it to small inner shadow, to shadow the edges of windows.
And a stroke to create the window frame, it could be seamless wood pattern for example.


Top
 Post subject: Re: Stained Glass Script(s)
PostPosted: Tue Jun 03, 2014 7:27 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 591
trandoductin, I made a larger image. The script works very well.


Attachments:
Thanks vitro.png
Thanks vitro.png [ 497.09 KiB | Viewed 1647 times ]

_________________
Image
Top
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Stained Glass (well almost).

4

No new posts Coleus Stained Glass

9

No new posts Attachment(s) GEGL Stained Glass Tile theory (concept not a plugin yet)

0

No new posts Attachment(s) Glass sphere.py

7

No new posts Attachment(s) glass-frame-effect.scm

23



* Login  



Powered by phpBB3 © phpBB Group