You are here

Brick Wall

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
JMS-Brickwall.scm18.61 KB
bricks.jpg29.27 KB

Since the previous script is for an isometric wall, the obvious choice for the next script would be one to automatically generate a wall. I'd written one previously, but this seems as good a time as any to post it!

This script will generate a brick wall with mortar. The wall and mortar can each be any color. The height and width of the bricks, as well as the mortar thickness can also be picked. There are color variations in each brick that you can set manually (the amount that the R, G, B values of each individual will deviate from the "standard" brick color.) The final wall is then bump mapped onto some noise to give it some texture.

The script is under the "/Filters/SambrookJM/" menu in GIMP, although that can be changed by editing the last line of the script to put it wherever you want it to go.

[edit] A few more changes to the script. You can now set the layer mode for the bricks, in case want it to be Overlay, normal, or anything of the other possible modes. The tile size and saturation for the cubism filter used on the mortar can be set. Finally, the "Bevel and Emboss" portion of the layer effects scripts are now included in this script.

[edit #2] I think I fixed the Linux problem. It happened with a (rand 4000000000) statement, which Linux doesn't like (even though Windows does. Go figure...) I changed that, so hopefully this should work on Linux and Windows machines alike.

[edit #3] Fixed an error where the color variation was set to zero giving a divide by zero error. Now that is fixed. Thanks for gerard82 for being a far more diligent tester than I was. :-)

Code License: 
GIMP Version: 
Scripting Engine: 


Most scripts are broken from 2.6 to 2.7. Very few are spared: I did not find one since I began migrating to 2.7. Some functions are to be removed because they are duplicated, some others must be changed for the compatibility with groups of layers. And fixed scripts sometimes are not backward compatible with 2.6:-((

In Gentoo the package manager uses tarballs supplied by the organization that makes the software.
Gentoo then compiles them.
Sometimes patches are added that Gentoo deems necessary.
I checked the "ebuild" for Gimp:
It contains two patches,one is a security patch,the other has to do with libpng.
I wonder if this problem is caused by another script somewhere.
Look at this post in Gimpusers Forum:
I really don't know which script might be causing this.
I've noticed recently something weird:layerfx is available as .scm script and also as .py plugin.
When I install it in the scripts folder and restart Gimp a lot of scripts have disappeared.
Installed as .py in the plugins folder this doesn't happen.

Edit: I tried removing ALL the scripts in ~/.gimp-2.6/scripts except the brick wall script.
Same problem.
Removing all the scripts that are located in /usr/share/gimp/2.0/scripts results in:
"error: eval: unbound variable: random".
Apparently it depends on some script in there.

Could you retest this with a non-Gentoo system?

What i had to do was take out the brickwall script that loads under Filters/Render
That fixed the problem i had with Error - wrong type - context-set-foreground-color
Both of my scripts under the menu Filters/SambrookJM work fine now.

I am running Windows XP by the way.

Gerard do you have that script in your scripts folder along with any others?
Its listed as JMSBrickwall.scm <-- delete that one or remove it from your scripts folder.

Of course it's in the ~/.gimp-2.6/scripts folder.
I don't think it would show up if in another folder.
If you read my posts you'll see that I tried both versions.
It would be a nice addition to have so I'm sorry it won't work.

what i meant was do you have that script and the one that shows up under the Filters/Render menu in the scripts folder together?
Because that could be your problem, it was for me.
Keep only the ones that show under Filters/SambrookJM

I can't get it to run.
It freezes at "gimp-brush-delete".

What system are you running it on? Which version of GIMP? Did you make any changes to the script before you ran it? Does it work if you comment out that line?

I've only been able to test on Windows machines, so there may be something funky with the script on Linux/Unix builds...

I am running Gentoo Linux and Gimp-2.6.11.
I'll try commenting out that line and report back.
Edit: When I comment it out and restart Gimp it doesn't show up in the filters anymore.
Maybe the system does an md5 check or something?
My bad: I used # for comment.
Replaced it with ;; but now it freezes on something else.

Where does it freeze now? As I said, I've only got access to GIMP 2.6 on Windows versions right now, but I don't think I've run into script-fu scripts that work on Windows but not on Linux, assuming equal versions of GIMP anyway.

I'm also in the middle of copying the layer effects code into the script, since I found that some earlier versions of the layer effects script didn't have the same number of input variables as the latest one.


Subscribe to Comments for "Brick Wall"