The 64th Gamer

the-64th-gamer:

man this sucks I’m basically having to create Blender’s edge split modifier by hand and I just know this is gonna run like garbage once its all ready

I’m recursively checking every triangle on the mesh for connecting faces at an angle, shoving all that data into a new list, and then doing it over and over again until there’s no more triangles. Then I have to merge that data back into the original to form one mesh.

Idk how that’s even gonna work with assigning materials to the mesh I’m just kinda swinging blindly hoping this works out.

Day later, turns out recursively traversing a mesh over and over is extremely extremely bad. Scrapped it all and now I am going to just iterate over every vertex. Had to create a loop that finds all adjacent faces so its now 2*O(n), and there’s some weirdness with creating additional adjacent face tables after splitting, but I’m HOPING this is gonna be fast enough.

The green text above is just my plans for the entire function. I was completely on my own and didn’t wanna mess anything up so no code written yet past the adjacent face loop being done.

Tags: