Hi, in Unity, I would like to generate a 3D mesh by using a series of points and only a series of points. As the points can be placed by the player, I cannot specify any triangles or faces and therefore, would like to generate them procedurally as well. If you could shed some light on a possible way to do this, even if it requires a third party extension, I would be most grateful.
You’re welcome to look around my MakeGeo project, all kinds of random procgen stuff.
You might want to look at the testfingerpolygons
scene for a cute little 2D demo
And here’s code to just make a single triangle:
After that it’s just triangles, all the way down.
MakeGeo is presently hosted at these locations:
That works great! Is there any way I could extrude it into a 3D mesh?
I guess you didn’t see the extrude example in the above project?
Generally the trick is you need the list of just the “outer” parts of whatever shape you are extruding, then you build the extrusions. Start small with a simple triangle, extrude that, because as you go it gets pretty hairy keeping track of which way you are in space.