Inspired by the Matrix Awakens Unreal 5 Demo, Building Grammar, that later evolved into Shape Grammar, I wanted to recreate a simple solution, that would allow me to quickly assemble buildings using pre-made modules.
What is it?
It is a simple expression language to distribute facade modules along an edge.
How?
A facade edge uses three vertices and the two edges between them, defining width (0->1) and height(1->2):
A Textblock Data-Block containing the expression is attached to the object:
In the Textblock, an expression defines the distbution, e.g.:
This means:
place module C once then
place modules A and B, as a group, as many times as possible then
place module C once
Facade Modules
I modelled a set of very basic facade parts. Each one is saved in its own collection:


Pick Random Module
A pick() function allows to pick a random module:
place(pick([A,B,C]),2)
This places A, B or C two times.
Here, the same expression is used on three levels. With the pick() function, the result is different on each level:

Demo Video
Watch me clicking around for three minutes:
The Entire Building
A whole building setup can look like this:
Export to Godot
Since all modules share the same geometry data, the import into a game engine like Godot preserves the module instances:








