Nodes graphical intersection

Hi i was playing some games and noticed ,some buildings were literally borried in ground , and there was no holes in the ground , but some how when you were looking inside the building
(even from out side) terrain in house was not visible .
It was like house were actually cutting terrain rendering .
Soo my question was , is there any way to make it possible here ?

Lets say i have a geometry House in node House,
and i have geometry terrain in node Terrain .

Is there any way to make it soo the house cuts terrain rendering
or terrain gets not rendered at collision between house and terrain , and inside house geom as well ?

Just a guess, but is it possible that what you were looking at was a building with “fake” terrain around it? In other words, the building and the ground immediately around it is all the same model.

Any decent 3D modeling tools should have boolean operations… that’s usually how this would be done.

…very super extremely unlikely that it is done in the game itself.

well, there is one more way.

if you use JME terrain, you could little modify shader to use additional texture map that will discard pixels where painted. Problem would be only physics that would consider discarded pixels as mesh.
(but there is always also option to do like “if in building, remove terrain from physics for character”.

but its kind of tricky…

trully i always thought they just lower terrain where building is so basement would be possible.

Lowering the terrain doesn’t help much in JME because terrain cannot have vertical drops. You’d still need to include enough fake terrain in your house model to cover a one-grid-square gap all around.

It might be nice if JME’s terrain had a mechanism to specify rectangular holes (places where there’s no terrain), but that would break many assumptions of the current design.