Procederal Buildings?

I’m guessing the best place for this is c++ programming but I apologize if not. I’m curious if anyone has done procedural 3D buildings over time based on known models (as in an NPC carries a stone and drops it in a location, animation of mortar being applied, then the stone becomes a part of the mesh.)

If not, any thoughts on how to accomplish this? Thus far I’m thinking it might take separate stages or layers to do things like build a pyramid (i.e. NPCs lay down a layer of stone and mortar sliced from a base model at the stone thickness, then when the layer is complete it becomes a single mesh with a material over it and the next layer starts - ultimately for details like angled stones or stairs they would go in as a separate model at the same location as the first one before following a similar process.) An example of the layering process I have in mind would be like the image below, where layers would be drawn in the order red-green-blue one at a time with each one starting at the bottom and ending at the top to allow for different types of stone/mortar to fill each layer.

117376-layers.png