How to Spawn Meshes to fill between ground and building base?

I been looking around to find a idea where to start with this and since unable to find something hoping someone here can point me in the right direction.

Basically in summary I will be let player to create a building base, and to hide the building floating on uneven terrain I want to be able to have meshes spawn along the outside that would go from building edges down to the ground to fill in the gap basically like a foundation on a building.

I would just appreciate a general summary of what I should be looking into. I appreciate any help thanks everyone!

Hi man ,
its just a bit of work , but depend on how you are making the things.
I suggest you , if you can , to make the basement inside the graphic. lets say that all your model will have a basement under your house/ office/ farm… so when you build something ,everything have already his basement.

Otherwise here how should work the basement.

i have 3 building. a Pillar , a house , and a longbuilding.
I have these 3 model made so i make sure that all 3 building are placed with the 0,0,0 on the most lower most left part.
The pillar is large 80cmx 80cm, and i assume that is the minumun block, and the other are modular.
so i build up also a model for the basement, that is 1x1. is my first module.
Now the house is larger , but i shrink it in a 3x3 module. and the longbuilding in a 3x8.
When i use the Create building Function.
I send him wich model i want. and in the function i check wich one is, and for every model , i get up a loop
that create N basement, and place them in the right grid .
Maybe some building are rotable , so , if i do buildings that are not square like 3x8 i have to work on my grid to make it rotable.

So , i really suggest you the first :stuck_out_tongue: