Export Signed-Distance Fields for 3D-ML Training (Professional)

Zwe Wint Naing · 2026-06-10

Metrixel now turns any mesh into a signed-distance-field volume, paired with a JSON manifest. These are then ready to be dropped straight into image-to-3D and shape-representation training pipelines. It runs on the GPU, follows animations frame by frame, and copes with the messy, non-watertight meshes real datasets are often full of. A Professional-plan feature, new in 2026.2.1.

Introduction

If you train models that are of 3D nature, including image-to-3D generators, neural implicit surfaces, occupancy or distance-field networks, you may have almost certainly written your own "mesh to SDF" preprocessing step. You may also find it to be fiddly, slow, and will break from many kinds of imperfect geometry that fills real-world datasets. With the version 2026.2.1, Metrixel does it for you: signed-distance-field (SDF) export is a new Professional-plan feature.

In this article, I will explain what an SDF is, what Metrixel produces, and why it is built to handle the messy assets you may have.


What Is a Signed-Distance Field?

A signed-distance field (SDF) is a 3D grid of numbers. Each cell stores the distance from that point in space to the nearest surface of the mesh. The values are negative inside the object, positive outside, and zero right on the surface. Store these values over a regular grid, and you will have a compact, differentiable description of the shape that a neural network can learn from - far more readily than a raw triangle mesh.

SDFs are a workhorse representation for modern 3D learning. Shape generation, surface reconstruction, and image-to-3D pipelines all lean on them because they are continuous, easy to sample, and play nicely with gradients.


What Metrixel Produces

For each asset, Metrixel writes two elements:

  1. A raw volume. A float32 grid, which is exactly what you want to load into PyTorch, JAX, or whatever framework you train in, without parsing or conversion. It loads in a single line of NumPy.
  2. A JSON manifest. Alongside the volumes, Metrixel produces a manifest describing each asset: its bounding box, triangle and vertex counts, the SDF's resolution and bounds, and the relative path to every output file. That is the kind of metadata that a data loader needs to assemble a training set.

Since the manifest uses paths relative to the output root, the whole dataset is portable! Whether you generate it on a workstation, push it to S3, mount it on a training node, everything still resolves at the end, anywhere.

A minimal loader is all it takes to read a volume back:

import numpy as np

def load_sdf(path: str, resolution: int) -> np.ndarray:
    """Returns a (R, R, R) float32 array; negative inside, positive outside."""
    vol = np.fromfile(path, dtype=np.float32)
    return vol.reshape(resolution, resolution, resolution)

Built for Real, Messy Meshes

This is the part that we are proudest about. Most "mesh to SDF" code that we have seen will assume a watertight mesh: A perfectly sealed surface with a clean inside and outside. However, in most cases, real datasets are nothing like that. Assets scraped from the wild, or exported from animation tools, are full of cracks, holes, internal geometry, and disconnected pieces. As a result of these inconsistencies, naive inside/outside tests fall apart on them.

Metrixel uses a method (called the generalized winding number) that gives a sensible inside/outside answer for any triangle soup, watertight or not. In practice, that means you can point it at Objaverse-style or Mixamo-style assets and get usable SDFs, all without needing a preprocessing or repair step. The messy meshes that would have broken your old pipeline, will work fine with Metrixel.


Animation-Aware, Frame by Frame

If your asset is animated, Metrixel generates an SDF for each frame in the actual pose, and not just a single static reference pose being repeated. As the character moves, each frame's volume reflects the real, posed geometry at that moment, and it stays perfectly aligned with the rendered image and the exported mesh for the same frame.

That lets you build datasets that capture motion, not just shape. Every (image, mesh, SDF) triple for a frame describes the same pose.


Fast on the GPU, reliable everywhere

SDF generation is heavy work. You are measuring distance from every grid cell to every triangle. As a result of this, Metrixel runs it on your GPU via Vulkan compute by default, with an automatic CPU fallback when no usable GPU is available. A single flag pins the backend when you need reproducibility:

metrixel --mode cli --gen_mode batch \
  --input /datasets/objaverse --output /datasets/out \
  --gen_sdf=true \
  --sdf_resolution=64 \
  --sdf_backend=auto \
  --manifest=true
  • --gen_sdf=true turns SDF export on (it is on by default on the Professional plan).
  • --sdf_resolution sets the grid's side length. 64 is the default and a good balance of fidelity and size; 128 is higher fidelity for production training; 256 is reserved for special cases (the files get large fast. Resolution cubed).
  • --sdf_backend is auto (Vulkan with CPU fallback) for normal runs, cpu for a deterministic baseline, or vulkan to fail loudly if the GPU is unavailable. Useful in CI.

On Linux with a discrete NVIDIA GPU, this runs at full bandwidth; on Apple Silicon it stays responsive by working in tiles so that your machine remains usable while volumes generate in the background.


A note on sizing

SDF storage grows with the cube of the resolution, so do plan accordingly:

Resolution File size per volume
32 128 KB
64 (default) 1 MB
128 8 MB
256 64 MB

For an animated asset, you get one volume per frame per viewpoint, so a large batch at high resolution adds up quickly. Start at 64, confirm the fidelity is right for your model, and scale up only where you need it.


Who is this for?

  • Researchers training image-to-3D, shape, or implicit-surface models,
  • Teams that have been maintaining their own mesh-to-SDF preprocessing,
  • Anyone working with non-watertight, real-world assets (Objaverse, Mixamo, scanned data),
  • Pipelines that need image, mesh, and SDF perfectly aligned per animation frame.

Conclusion

Signed-distance-field export takes one of the more tedious, error-prone steps in 3D-ML data prep and folds it into Metrixel's pipeline: raw volumes plus manifests, on the GPU, animation-aware, and robust to the messy meshes that real datasets are made of. It is available now on the Professional plan in 2026.2.1, and it pairs naturally with the command-line and Linux releases for running it at scale.