Punch a hole in a mesh

Blitz3D Forums/Blitz3D Programming/Punch a hole in a mesh

LostCargo(Posted 2003) [#1]
Again. Crazy weird questions from Baudspeed:

What if a I had a mesh (lets say something that looked like a simple plane. (not a terrain)

And another mesh which is a tunnel,mineshaft, hole ,door,etc.

I want to merge the two meshes at load time so that the ground now has the vertexes removed only in the spots where the player needs to go down the hole?


This way i can have an semi flat terrain, that i can place mine shafts, doors, etc that lead to other meshes. But i want to reuse the semiflat terrain other places without the holes?

Any thoughts guys?


smilertoo(Posted 2003) [#2]
boolean subtraction, should be doable but very unlikely to be anywhere close to realtime usability.


sswift(Posted 2003) [#3]
I suggest that you either construct the various terrain sections with holes in a 3D package instead, OR cleverly design the mine shaft objects such that you can remove a tile (two triangles) from the terrain, and replace it with a tile that has the mine shaft connected to it. This would be FAR FAR easier than general boolean operations. And as a bonus, when the user is far from the mine shaft, you can block the hole in the terrain with a black square so that you don't have to actually draw all the polygons inside the mine until the player gets very close to it. You could even fade the alpha tile out as the player approaches to make the transition smoother, just in case they can actually see the hole as they approach.


Dirk Krause(Posted 2003) [#4]
There is a code example in the archive:
here