3dSynth

Docs / Node Sculptor

Open in the interactive docs reader

Marching Cubes

Polygonise an SDF into a triangle Mesh. This is the explicit bridge between the implicit world (Sphere / Gyroid / Union / ...) and any node downstream that needs actual geometry (Mesh Boolean, Mesh Subdivide, Mesh Slice, Output → Mesh).

Node

Interactive preview is available in the interactive reader.

Sockets

sdf (in)
SDF. Required.
center (in)
Vector3. Centre of the sampling volume.
size (in)
Vector3. Extent of the sampling volume (x, y, z full-extent).
resolution (in)
Int. Cells along the longest axis.
isoLevel (in)
Float. Iso-value to extract (typically 0 for proper SDFs).
mesh (out)
Mesh.

Parameters

Center
Centre of the sampling box. Default: [0, 0, 0].
Size (xyz)
Full extent of the sampling box along x, y, z. The box spans center ± size/2. Default: [40, 40, 40].
Resolution
Cells along the longest axis; shorter axes get proportionally fewer cells so cells stay roughly cubic. Default: 48. Range 4..256. Doubling this roughly 8× the work.
Iso level
Level set to extract. 0 for SDFs. Non-zero lets you shift gyroid-style pseudo-SDFs' wall thickness without re-authoring the field. Default: 0.

How It Works

  1. Sample the SDF on a regular (nx+1) × (ny+1) × (nz+1) grid.
  2. Classify each cell by the sign of its eight corners.
  3. Look up the triangle pattern from the 256-entry Marching Cubes table.
  4. Linearly interpolate each edge crossing to place the triangle vertex.
  5. Feed the resulting positions + indices through makeMesh which also computes smooth normals.

Cancellation is checked once per Z slab — big resolutions abort cleanly when the user retriggers a generation.

Tips