https://openbrush.app/ logo
Optimizing hulls
# unity-integrations
a
As @Zandy often points out, typical artist workflows with hull brushes create a ton of geometry that's never seen.
One option is the CSG all the meshes in Blender but that means going OB > Blender > Unity with the extra step introducing more issues with shaders etc
I was thinking about adding a CSG feature into the SDK/Toolkit but I was also wondering if something simpler could also do the trick.
Rather than cleanly joining all hulls into a full manifold mesh, all we really need is a cull of all triangles that are inside other hulls
We know that all hulls are manifold and convex. This is probably useful for simplifying the algorithm.
Starting with a hull. We want to then optimize each other hull that possibly overlaps the first one and remove unnecessary faces. Would something like this work: 1. The initial hull is "Hull A" 2. For each vertex of a face in the next hull (Hull B) fire a ray in any direction and keep track of which triangles in Hull A it hits and which direction those triangles are facing
At this point - can we just count crossings like 2d winding algorithms for filling shapes?
The initial two hulls are guaranteed to be manifold and convex. but when you add a 3rd, 4th that's no longer true. but there's still some useful invariants that fall out of the fact that each individual hull is manifold and convex.
🤔
z
This would be awesome and so useful!
3 Views