You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc926e3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(snippets): hull only the points so convex colliders come out closed (#407)
bmesh.ops.convex_hull adds hull triangles but keeps every source edge and
face whose verts lie on the hull, and geom_interior/geom_unused stay empty
on convex input. Hulling a cube gave V8 E18 F18 with 12 non-manifold edges
(6 source quads on top of 12 hull tris); on the pipeline fixture the
collider kept 4512 verts.
Remove the source edges first (edges.remove keeps the verts), hull, then
drop verts left with no faces. The cube now gives F12, all tris, 0
non-manifold edges. The pipeline template asserts the hull is closed and
exits 7 otherwise, so a regression cannot ship a broken collider silently.
The ai-mesh-cleanup skill describes the corrected recipe.
Showcase copies are fixed separately.
Refs #386
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Convex hull via `bmesh.ops.convex_hull`, then delete `geom_interior`and `geom_unused`. Copy `matrix_world` onto the collider. Hull a coarse cage when the render mesh would blow a per-piece face budget. Witness: [`examples/collision-hull-proxy/`](https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/collision-hull-proxy).
158
+
Convex hull via `bmesh.ops.convex_hull` over the points only: remove the source edges first (`bm.edges.remove`, which keeps the verts), hull, then delete verts left with no faces. Hulling a mesh that still has faces keeps every source face lying on the hull, so a cube collider comes out with 18 faces and 12 non-manifold edges instead of 12 closed triangles. Copy `matrix_world` onto the collider. Hull a coarse cage when the render mesh would blow a per-piece face budget. Witness: [`examples/collision-hull-proxy/`](https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/collision-hull-proxy).
0 commit comments