OBJ Optimizer For Unions

GitHub: https://github.com/TheNexusAvenger/OBJ-Optimizer
How it works: OBJ Optimizer - Part 1: Shape Optimizing | TheNexusAvenger
Bonus article: OBJ Optimizer - Part 2: OBJ Optimizing | TheNexusAvenger
[June 23, 2021]: Updated the article links. The download has been removed from the website.

The CSG engine is great, but isn’t optimal right now. From what I have found doing this project, a lot of zero-area triangles get generated, as well as generally unoptimal shapes. The first article goes more into how it works, but here is a quick comparison (680 triangles vs 522 triangles, for about 180 of them):

Be aware that edge cases with certain models may exist still. The second article goes more into what to do about this, but simplifying the mesh as far as possible is recommended. I don’t really have the time to fix the cases, which is why it is open source. I can apply fixes if you are able to debug it and figure out why it fails.

14 Likes

This looks really neat, I should try it. I’ve actually been looking for something that easily converts unions into meshes alone, however optimising them on the way is definitely a bonus. Meshes are by far less laggy to use massively for several reasons. If I can work out how to use this then I can probably give one of my devs who only uses unions some stuff to work on.
Thanks for this!