You are here

Brick Wall

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
AttachmentSize
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: 

Comments

Hi JMSambrook,
Many thanks!
Both the Brick Wall and the Galaxy scripts work fine now.
Gee, I spent hours trying to find what's with my system.
I looked at the code but had no idea either that Linux has limits for random.
Anyway all's well that ends well.
Thanks for two nice scripts.
Gerard.

I tried the new versions in Gimp-2.7.2 and they both work ok.
You still get the remarks about depecrated commands though.
Gerard.

Which commands gave the remarks about being deprecated? I don't remember seeing anything like that while running 2.6, even when I was testing it on the Linux system.

Were some new commands deprecated in 2.7 (and soon to be 2.8?)

Here are the error messages:

GIMP: WARNING: Plug-In "script-fu"
(/usr/lib/gimp/2.0/plug-ins/script-fu)
called deprecated procedure 'gimp-image-add-layer'.
It should call 'gimp-image-insert-layer' instead!

GIMP: WARNING: Plug-In "script-fu"
(/usr/lib/gimp/2.0/plug-ins/script-fu)
called deprecated procedure 'gimp-selection-layer-alpha'.
It should call 'gimp-image-select-item' instead!

GIMP: Plug-In "script-fu"
(/usr/lib/gimp/2.0/plug-ins/script-fu)
called deprecated procedure 'gimp-palette-set-foreground'.
It should call 'gimp-context-set-foreground' instead!

GIMP: WARNING: Plug-In "script-fu"
(/usr/lib/gimp/2.0/plug-ins/script-fu)
called deprecated procedure 'gimp-selection-load'.
It should call 'gimp-image-select-item' instead!

GIMP: Plug-In "script-fu"
(/usr/lib/gimp/2.0/plug-ins/script-fu)
called deprecated procedure 'gimp-drawable-set-name'.
It should call 'gimp-item-set-name' instead!

I weeded out the ones that were the same.
Hope this is of any use to you.
The brick wall was produced ok but once 2.8 comes out it may not work anymore.
Gerard.

The "called deprecated procedure 'gimp-palette-set-foreground'." was a valid message, so I've changed that. I've got that in quite a few scripts, so that will have to be fixed in a lot of places!

The rest of the ones that you listed about are not in the GIMP 2.6 I have installed. (Doing a search for "item" in the plug in list yielded no results.) I guess once 2.8 comes out, I'll check and see which scripts needs to be changed. Thanks for the heads up on this, though!

I replaced the first script but it freezes again at brush-delete.
I have a lot of scripts and plugins installed from the registry.
Problems have been few,most of those were due to age.
Thanks for your efforts though.
Gerard.

I posted the script at the Cartographer's Guild, since you guys seemed to like this one quite a bit. I also put in a plug saying that there was a problem with the script freezing on the brush-delete, and it would be greatly appreciated if anyone could track it down and figure out what the problem is. There are some serious GIMP gurus at that site, so we may have a bit of luck.

Wish I could figure out what's wrong...try commenting out that line, and then manually deleting the brush after running the script?

I run a separate install of Gentoo Linux on a separate partition.
I use this for experimental software and in case I need to repair my regular install.
I installed Gimp-2.7.2 from tarballs on this install.
Tried the Brick Wall script but it fails because apparently the API has changed.
This happens with lots of existing 2.6 scripts in 2.7.2.
The "texturize" plugin freezes Gimp-2.7.2 completely.
Gerard.

I don't have any installs of GIMP 2.7, so I can't help out trying to troubleshoot the texturize problem. If the APIs switch when 2.8 is released, then it looks like a lot of scripts will be broken.

I'll second the question that schumaml asked: Do you have any non-Gentoo systems? If the script works on the Linux non-Gentoo systems, it's something with the build. If it fails on the other linux builds, there's another problem somewhere.

"If the APIs switch when 2.8 is released, then it looks like a lot of scripts will be broken." Noooooooooooooooooooooooo... why is the world so cruel?!

Pages

Subscribe to Comments for "Brick Wall"