Apps Part of Renderloom

Voxel Greedy Mesher (OBJ, STL, GLB)

Turn a voxel model into a compact, watertight OBJ, STL or GLB mesh.

More options

Try an example: · ·

More about this tool

How it works

Merge the exposed faces of a Renderloom voxel model into the fewest same-colour rectangles (greedy meshing), remove T-junction cracks, check the result with the shared mesh analyser and download it as OBJ + MTL, binary STL or GLB.

  • For each axis and direction, every slice is scanned for exposed voxel faces (the neighbouring cell is empty or outside the grid). Equal-colour faces are merged greedily: extend along the row as far as possible, then extend the strip row by row while the whole strip matches.
  • Watertight mode walks every rectangle edge and inserts the corners of neighbouring rectangles that lie on it (T-junction removal). Rectangles without such vertices stay two triangles or one OBJ quad; others are fanned from their centre.
  • The mesh is checked with the same edge analysis as the Renderloom mesh analyser: boundary, non-manifold and inconsistent edges, non-manifold vertices, volume by the divergence theorem and surface area.
  • OBJ and STL use millimetres with Z up. GLB stores metres with Y up: its root node rotates −90° about X and scales by the voxel size, so viewers show the model upright at true size.

Watertight means no open or non-manifold edges. Voxels that touch only along an edge or at a corner always give non-manifold edges; the report lists them instead of hiding them. Colours become flat materials; no textures are generated.

Sources

Part of Renderloom

How to turn a voxel model into a watertight GLB, STL or OBJ

Merge the exposed faces of a voxel model into large same-colour rectangles, remove T-junction cracks, check watertightness and download GLB, STL or OBJ.

What it is for

Voxel Greedy Mesher converts a Renderloom voxel project into a triangle mesh you can open in Blender, a game engine or a slicer. A naive export writes one square per exposed voxel face; greedy meshing merges neighbouring faces of the same colour into the largest rectangles it can find, so files get much smaller and easier to edit.

It is the same engine as the 3D mesh section in Renderloom's Voxel Desk export dialog, so the tool page, the JSON API, MCP and the app produce identical files.

Worked example

The first example uses the Little house (828 voxels) with the defaults: GLB, watertight meshing and 10 mm per voxel. The summary reads "672 exposed faces became 43 rectangles (93.6% fewer) and 164 triangles; the mesh is watertight." The check table lists 84 vertices, 22 T-junction vertices added, 0 open edges, 0 non-manifold edges, 1 part, a volume of 828 voxels and a model size of 160 × 160 × 160 mm. The GLB file is 8,732 bytes.

The second example prints the Pocket robot as binary STL at 4 mm per voxel: 504 exposed faces become 52 rectangles and 184 triangles, the mesh is watertight and the file is 9,284 bytes.

The third example writes the Quiet tree as minimal OBJ: 728 faces become 38 rectangles and only 76 triangles, but the check reports 80 open edges, because minimal mode leaves T-junctions where a rectangle edge meets the corner of a neighbouring rectangle.

How to read the result

Exposed faces counts voxel faces whose neighbouring cell is empty. Rectangles is the number after greedy merging; Triangles is what the file contains. Volume (voxels) must equal the number of voxels for a closed surface, which is a quick sanity check.

Watertight means no open (boundary) edges, no non-manifold edges and consistent winding, the same test as 3D Mesh Analyzer. Voxels that touch only along an edge or a corner always create non-manifold edges; the tool reports them instead of hiding them.

Tips and common mistakes

  • Use watertight meshing for 3D printing and for game engines that bake lighting; minimal meshing is only for the smallest possible files.
  • OBJ and STL are in millimetres with Z up. GLB stores metres with Y up; its root node converts, so viewers show the model upright at true size.
  • Colours become flat materials. No textures, UVs or smoothing are generated.
  • Limits: 64 cells per axis, 32,768 voxels and 64 colours, as in Voxel Desk.

FAQ

Why is my model not watertight even in watertight mode?

Watertight mode removes the cracks that greedy meshing itself would create. It cannot fix the shape: two voxels that share only an edge or a corner make an edge used by four faces, which no printer or mesh tool accepts as a closed surface. The report lists these non-manifold edges; fill one of the neighbouring cells and export again.

Does greedy meshing change the shape or the colours?

No. Every exposed face is covered exactly once, the volume equals the number of voxels and each rectangle keeps the palette colour of its faces. Only the way the surface is split into triangles changes.

Which format should I choose?

GLB for Blender, Godot, Unity, Unreal and web viewers, because it keeps colours, units and orientation in one file. Binary STL for slicers. OBJ when another program expects OBJ with an MTL colour file.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://renderloomvoxelmesher.usefulweb.app/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://renderloomvoxelmesher.usefulweb.app/mcp · tool name renderloom_voxel_mesher
Example request
curl -s -X POST https://renderloomvoxelmesher.usefulweb.app/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{}'
Feedback · ideas & bug reports welcome