I do game development in Godot engine, and modeling and animation on Blender. I'm currently working on a very physics heavy 3D Sonic fangame. You can find my progress on that in the #my gamdev tag. I also greatly enjoy fighting games, character action, and boomer shooters.No gods, no kings, no fandoms.
sometimes i forget wizardposting isn’t a regular occurrence on any other website. what do you mean your posts don’t randomly get taken over my evil wizards casting spells on your peunis
Since I'm insane and decided to create a mesh editor for level design I needed to think about how to approach mesh triangulation.
Arrived at two important conclusions needed for simplifying the process.
First is that the number of splits needed seems to always be three less than the amount of edges in a face (which makes sense, as once the triangulation is finished the remaining edges will always be equal to three). Not an impressive realization but it means the amount of work the function needs to do doesn't change partway through the triangulation and I can loop for a set amount of times instead of checking for comparisons.
Second was how to solve for a tough problem, preventing the triangulation from creating an edge between two concave points, which would be seriously bad because it would change the boundary of the face and potentially cause the triangulated mesh to overlap on top of itself.
Did a bit of thinking and noticed that the correct type of "convex" split would result in only one shared edge between the new triangle and the rest of the face, while a "concave" split would result in two shared edges.
so preventing the mesh from being split is as simple as comparing the number of shared edges or vertices between the new results, then moving on to a different set of edges if the result is bad.
Maybe not optimal and might make experienced programmers or mathematicians cringe, but in a day of scratching my head about it these are useful conclusions.