---
title: Mesh Primitive
order: 3
---

The Mesh primitive turns any Blender mesh object into an SDF shape. Chisel bakes the mesh into a signed-distance grid once, and from then on it behaves like every other primitive: it takes booleans, blends, mirrors, arrays, twists, and materials, and it renders in the ray-marched viewport alongside native shapes.

![Convert Mesh to SDF](../assets/sdf-mesh-convert.webp)

This is the inverse of [Convert to Mesh](../operations/convert.md) — instead of leaving the field for polygons, you bring polygons into the field.

## Converting a mesh

1. Select one or more regular mesh objects (not already Chisel objects).
2. Run **Convert Mesh to SDF** from either:
   - *Object Properties → SDF → Convert Mesh to SDF* (the button shown under the Chisel toggle while the object is not yet a Chisel object), or
   - `RMB → Convert to SDF` with the Chisel tool active.
3. Set the bake options in the dialog, then confirm.

The bake runs on a background worker: the status bar shows `Chisel: baking SDF <n>%` with a per-object counter, and `Esc` cancels mid-bake. The original mesh datablock stays as the object's data — it *is* the display proxy, so the object keeps its wireframe, bounds, and selection silhouette.

## Bake options

- **Resolution** — `8–1024`, default `128`. Grid cells along the mesh's longest axis. This is the single biggest quality/cost lever: above roughly `256` the grid starts costing gigabytes of VRAM and the bake takes minutes.
- **Field Margin** — `6–64` voxels, default `8`. The exact-field shell baked around the mesh surface. Emboss strengths and blend widths have to fit *inside* this shell, so raise it if a wide blend or a deep emboss against the mesh looks clipped.

Both values are stored on the object and can be edited afterwards in *Object Properties → SDF*, next to the **Rebake SDF** button.

## Rebaking

Editing the source mesh does not automatically re-bake the grid — the field is a snapshot. When you have changed the mesh (or want a different resolution or margin), select the object and press **Rebake SDF** in the SDF panel. The bake re-runs with the object's current *Resolution* and *Field Margin*, on the same background worker.

## Composing with native primitives

Once converted, a mesh prim is just another shape in the chain:

![A mesh SDF used as a boolean operand](../assets/sdf-mesh-boolean.webp)

- Boolean it against native primitives with smooth blends — the fillet crosses the mesh/primitive seam like any other
- Emboss or engrave a mesh stamp into a Chisel surface
- Mirror and array it (arrayed mesh chains reuse a single baked copy for their proxy)
- Give it a Chisel material and it shades with the rest of the scene

## Normals and winding

The bake reads the **evaluated** mesh, so the object's Blender modifier stack is applied first. Two things affect the result:

- **Shading** — a smooth-shaded source bakes with smooth normals; a flat-shaded source bakes faceted. The operator reports which path it took per object.
- **Winding** — the sign of the field comes from face orientation. If a mesh has mixed orientation, Chisel reports a *winding confidence* warning and the inside/outside test may be wrong in places. Run `Mesh → Normals → Recalculate Outside` on the source and re-convert.

## Storage and file loading

Baked grids are cached by content hash and, by default, stored **compressed inside the `.blend`** so reopening a file loads them in milliseconds instead of re-baking. This is budgeted per grid — see [Mesh-SDF storage](../render-engine/display.md#mesh-sdf-storage) for the *Store SDF Bakes in File* toggle and its size budget.

Grids that exceed the budget (or were never stored) re-bake on a background thread when the file opens: the prim appears as soon as its bake lands, and the viewport stays responsive in the meantime.

## Type cycling

A mesh prim is **not cycle-reachable**: `[` / `]` and the Type submenu never turn a native primitive into a Mesh, or a Mesh into a native primitive. Conversion is always explicit.

## See also

- [Convert to Mesh](../operations/convert.md) — the opposite direction, SDF out to polygons
- [Standard Shapes](shapes/index.md) — the ten native primitives
- [Display → Mesh-SDF storage](../render-engine/display.md#mesh-sdf-storage) — persistence budget
- [Modifiers: Boolean](../modifiers/boolean.md) — composing the mesh prim with other shapes
