Cutting out a part of the surface of a mesh

I am facing the following problem and don’t quite know how to tackle it: I basically want to draw an irregular shape, like you would do with the lasso tool in a 2D graphics program, but on any kind of 3D mesh. I then want to cut out the part of the 3D mesh, that is surrounded by the line I have drawn. So I need a method to see which parts of the original mesh are inside the loop I have drawn and then modify the mesh to make its edge more or less match the drawn outline. For the “outline” I have basically a line (or loop) of 3D points on the surface of the mesh.
Is there any algorithm, package or paper out there, that can help me with that?
(and is there maybe a better forum for asking this question)

Ok to do this you’ll need to make sure your mesh is equipped with the vertices required for what is in effect your cutting resolution.

So in 3D modelling software you need to subdivide your mesh and make sure it subdivides correctly so that the vertices you will later slice using the cutting tool will be as true as possible to the lasso coordinates.

Think of it like a grid in paint the whole drawable space is just a grid and your lasso has a accuracy of the size of the pixel in the grid. The 3D model is just the same.

what you want to do here is very complicated but it is not impossible and I would suggest taking a look at 3D modelling software for a full understanding of the situation available here that you want to recreate in unity.

1 Like

This is called Constructive Solid Geometry (CSG) and there are lots of papers out about it.

It’s not trivial to implement in the general sense.

The ProBuilder package apparently exposes some CSG functionality but I haven’t used it except in editor.

1 Like