CSG, remove intersected area?

Hi team,
I’ve been trying out CSG for the first time… to create holes in a ground mesh,
However, it only creates an indent.

  • Is there any way i can remove the intersected area?
  • It should create a clear, see-through hole, not an indent.
  • No geometry data in the hole (vertices, etc) that could cause collision.

The PG has a sphere mesh to create a circular hole; results in a circular indentation.
I tried a box mesh, has same results as sphere, just a indent in a box shape.
I tried another (smaller) GroundMesh, results in a mesh with no geometry.

Is it possible?

Your ground plane does not have a thickness. CSG does not like that. Here i replaced the ground plane with a flat box:

1 Like

That’s a little disapointing :frowning:
I need it to be a flat plane, and i’'ll be running collisions on it, so a box would more than double the triangles needing to be checked

If you need only a plane you should look for a 2D CSG library. Operating on 2d polygons should be also much faster compared to 3D CSG.

something like this: GitHub - mfogel/polygon-clipping: Apply boolean polygon clipping operations (union, intersection, difference, xor) to your Polygons & MultiPolygons.

Also note that CSG is not known for creating clean geometries, so you will have extra triangles that you would not have if you generated the mesh offline:

1 Like

Yeah… i think i’ll just have to do it in blender :slight_smile:
A bit more work but the result will be worth it

even with a much higher poly sphere, smoother circle