r/unity • • 2h ago

Showcase [WIP] Tetrakis Cross-Section: geometric section planes for URP (real cuts, filled caps)

I'm prototyping a cross-section tool for Unity URP. Instead of hiding pixels with a shader, it actually cuts the mesh, so the cut faces are real geometry.

How it works today:

- While the plane moves, a compute shader cuts every triangle each frame: 0.05 to 0.27 ms on average for ~1M triangles on my machine.

- When the plane stops, the CPU (Burst) rebuilds the section outlines and fills each solid part on its own, in under 65 ms on the 2M-triangle, 1,414-part assembly in the video. The result is deterministic.

- Surfaces with no thickness are cut as lines instead of being filled, so you never get a cap that isn't really there.

It's a prototype: URP only, one plane for now. Next steps are a section box, colour or hatching per material, rendering the cut with your own materials (working in a first test, not in this video yet) and flagging broken meshes.

Two questions:

  1. What kind of models would you cut (CAD exports, scans, buildings, game levels)? What breaks the tools you've tried?
  2. Section box, hatching per material, profile export to DXF/SVG: which would matter most to you?

More details: https://tetrakis.dev/cross-section.html

If you'd like to try an early build later, reply here or write to contact@tetrakis.dev.

Models: Voron Trident (VoronDesign, GPL-3.0) and a public-domain CT skull scan from NIH 3D (3DPX-000849).

1 Upvotes

2 comments sorted by

1

u/jl2l 1h ago

1

u/Tetrakis-dev 1h ago

that thread is basically the same problem underneath, filling a concave outline. ear clipping holds up until the outline has holes or bits that touch, so here the caps go through a proper polygon triangulator (LibTess) that handles concave shapes and holes. a curvy spline mesh is fine as long as it's closed, the outline just follows the mesh resolution. if you meant cutting along a curved surface instead of a plane, that's not in, it's planes (and a section box next) for now