First I sample the building's volume. The voxel size is based off the expected modkit's width and height. I make some attributes to be used later here before I start splitting things up. Most notably each floor's level is calculated based off height and stored, and the ceiling points are labeled.
I masked out walls based on the highest +X,-X,+Y,-Y position. By sorting the specified position I could get the largest or lowest value and filter for that value, getting a wall from the volume. I did this because it was a guaranteed way to not sample an extra point from inside the volume, however I didn't get it working with multiple volumes in time.
I then removed the corner pieces and offset the walls for the modkit to click together.
Corners were masked and labeled with the same method.
My ground floor storefront meshes are different from my upper floors. Now I get to attribute filter my ground floor out, and use my corner filter to easily spawn my modkit pieces.
The storefront and upper level meshes have slightly different heights. I made a subgraph to fix it.
I can simply use the Ceiling attribute filter on my wall points for my top trim. However the floor of the top, taken directly from the volume sample, needs some cropping.
I did that here with the Combine Points node, which turns all points its given into one point with the bounds of the old points. I subtract from its bounds slightly and then get the distance of the ceiling points compared to that.
Sometimes an object we want to use is made up of multiple things, and so is not possible to spawn with a Static Mesh spawner. This bus stop, for example was assembled from multiple little pieces shown on its demo map. But by selecting all of of its pieces and creating a level instance of it, then creating a PCG Data Asset of that. we can spawn it in!
This is done by copying the points from the chosen PCG Data Asset to your chosen locations, and chosing "PCGMeshSelectorByAttribute" on the Static Mesh Spawner.
Modkit: PurePolygons