This is more a curiosity than a need to reproduce
In many strategy games 2D/3D there are buildings with different elevations + and -
when it is below the ground, the building fits perfectly "cutting" the terrain.
how is it done? alpha test?
Anno 2070 example
Replies
many games have terrain editor we shape/paint the terrain with brushes without seams, i thought that the grid was only applied to the buildings
The hard part would be to flatten the terrain surrounding the hole to avoid any seams there.
In Anno we can camera rotate/move/tilt freely to see all angles.
Buildings with "terrain subtraction" are very detailed and seem to cut and fit perfectly on the ground, with animations and in some cases water inside it.
The texture splatting/blend remains even with the building placed on middle of a blend, the texture does not change on the ground around, just a small blend to "fuse" the building with the ground.
You could also project a texture with those "masked" regions on the terrain and then perform "discard/alpha-test" so that terrain really has holes on the pixel level.
The structure fits into the grid presented by the terrain quite neatly, hence its shape.
I would say they have 2 types of 'buildings' where most would remove any grid tiles/tris under them and replace them with their own model with an alpha blend.
The other would be little prop type objects that sit on top of the terrain grid.
This is a grid, but the terrain can be shaped freely raising and lowering
[ame="http://www.youtube.com/watch?v=nkJVHwFYvZc"]Heroes V Map Editor - YouTube[/ame]
Is that not the effect your looking for? The video is showing the exact same effect, everything is interpolating between the vertices of the grid, and the raising and lowering of the ground is a sub-form of tessellation, which even old COD games had to displace water.
I don't see any 'smooth' displacing or holes, most of the mare pretty clunky, and many more even just are on land without any holes. The video even shows the placement of building being done on grids, with again, vertex interpolating as to where the decal/projection is being set.
Also, they're only lowering the terrain, since too much of a land stretch can lead to texture stretching, so you might need your own custom solution for that case.
All of this has to do with engine and what to call what and how to process what. Everything else has already been mentioned and is pretty simple by portfolio standard, let alone simplified version of it in a game.
http://udn.epicgames.com/Three/DevelopmentKitBuildUpgradeNotes.html#Unreal%20Landscape
In this case, you simply cover the edges with meshes.