Index Picture, left
Index Picture, right

Auto Masonry Blender Script

Wall generator! I've dreamed about doing this for years. Finally got good enough to do it. The script generates a wall of bricks or stones with varying depth, height, and width. I'm planning on adding lots of extra functionality, hopefully making an entire castle generating script at some point. First results were around 2007-09-08. A couple of months later I wrote an article about the Auto Masonry Blender Script at the request of the Blenderart Magazine, which appears in Issue 12.

These images are some demonstrations of what can be done with the Auto Masonry script for Blender. Please note that some of these are renders from development versions of the script, so some features didn't survive to a release version. Here is my original code. There is an updated version in the official Blender release. Enable "Add Mesh: Extra Objects" in the Add-ons tab of the user preferences. Then hit Add > Mesh > Extras > Wall factory (Shift-A, M, E, W) and the options will show up in the tool pane.

Radial masonry from development script V0.2 I'm so happy with how the lighting and composition turned out on this shot! I want to visit there some time...

Animation test. Some cannon balls hit the poor wall. It didn't stand a chance I'm afraid.

This is the first wall generator image I made. The script was written before a bevel or solidify modifier were available, so I calculated all the vertex positions manually. If I were going to do it again, I would probably do it 2D with a solidify modifier, or even try using Geometry Nodes somehow.

In this picture the wall is warped to a curve, dynamically editable of course.

The code for the edges of openings is finally working (took longer than I expected), along with flaws (chips off the corners) and some higher level functions. The whole model was created in place by the script. I particularly like how the stone extends all the way across the top of the doors and windows.

Finally got the grout working, though not as well as I would like. Lintels can now be offset seperately, and are correctly subdivided for curving (into a tower, or other shapes). Still a lot of coding going on behind the scenes. Also added crenels (not seen here) which double as spacers for floor beams or what have you.

It is possible to make very large walls using this script. There is no tiling and no textures, just geometry. This one took about thirty seconds to generate.

After breaking, fixing, and updating a lot of stuff, I finally got down to writing the code for keystones. You can see that long, low arches still produce voids on the sides... a problem I'm working on now.

Sides of low arches are fixed. Keystones are in place. Big Blocks are working correctly (finally).

Finally got all the stonework for domes working correctly. Edges, openings, and arches all work fine now.

This is a demonstration of the (hopefully) final code for radial stonework. Truly circular openings may go in at some point, but for now these egg shaped openings are as close to "round" as it gets.

Arched openings in a wall. The stones fit to the edges of the arch, which was harder to do than it looks... Seriously!

I'd like to get back to working on a script like this at some point, but I haven't really had a need for it yet. That, and solving the problem is a large part of the fun!

Navigation Links

Level Up to Blender Scripts

Gallery Root

Back to Peripheral Arbor Homepage