Clean up your AI-generated GLB

Send the GLB your image-to-3D generator wrote, from TRELLIS, Meshy or Tripo. You get back a lighter model at its real size, still wearing its texture, with collision pieces and a report of every change.

A textured wagon as TRELLIS generated it, 148,801 triangles
The same wagon after a hosted Spatial Compiler compile, 33,657 triangles, original texture

Generated, 148,801 triangles

Cleaned, 33,657 triangles

  • 77% fewertriangles, with the original texture still in place
  • 2.5 mlong, set to real-world size in meters
  • 64collision pieces your physics engine tests
  • About 2 minto compile on the hosted API

Compiled on the hosted API on 3 December 2026.

What goes wrong on import

Image-to-3D tools write dense meshes with no sense of scale. The wagon came out at 148,801 triangles, sized to fit a 1-unit box, and about two thirds of its triangles sit inside the model where no camera can see them.

Fixing each model by hand means hours in Blender: deleting buried faces, decimating, scaling and building collision. Your agent can hand all of it to one compile instead.

What the terms mean

  • Triangle count

    The number of flat triangles that make up the surface.

    Each one costs draw time, so a scene full of 150,000-triangle props slows down.

  • Hidden triangles

    Faces buried inside the model that no camera ever sees.

    They still cost memory and draw time. The compile removed 884 of them from the wagon.

  • Real-world size

    The model's length and height in meters.

    Without it, a wagon imports the size of a teacup or a house.

  • Collision pieces

    Simple convex shapes, with no dents, that wrap the model for physics.

    Engines test these instead of every triangle, so characters and props can bump into the wagon cheaply.

How it works

  1. Send the GLB

    Your agent uploads the file over MCP, or your code calls the REST API. GLB, FBX, OBJ, STL and PLY files up to 64 MB are accepted.

  2. See the price, then compile

    Your first 50 mesh Drafts are free with the $5 signup credit. The full compile of this wagon cost $2, priced by the triangles you send.

  3. Load the result

    You get a GLB with its texture, a layout file for Godot and a JSON report of each change and the measured triangle count.

Read the step-by-step cleanup guide

Questions

Does the cleaned model keep its texture?

Yes. Spatial Compiler keeps the model's own UV layout, so the original texture still fits the lighter mesh, as it does on the wagon.

Which files can I send?

Send a GLB, OBJ, STL or PLY file up to 64 MB. Your agent uploads it over MCP, or your code calls the REST API.

Can my agent clean up a folder of models?

Yes. Your agent runs one compile per model and shows you the price of each before it runs. A batch compile can also try up to 3 settings on one model, each priced as a normal compile.

All use cases

Use with your agent

Paste the prompt into Claude Code, Cursor or Codex. Your agent connects to Spatial Compiler and comes back with a lighter GLB at real size with its texture, collision pieces and a report of every change.

New accounts start with $5 of usage, and you see the price of each job before it runs.

Agent prompt

Connect the Spatial Compiler MCP server at https://spatialcompiler.dev/mcp if it isn't connected yet. Use meshfx to clean up my generated GLB: remove hidden faces, make it lighter while keeping its texture, set it to real-world meters and add convex collision pieces. Run a Draft first. Your first 50 mesh Drafts are free with the $5 signup credit. Ask before running a final compile.

Or add the server yourself in Claude Code:

claude mcp add --transport http spatial-compiler https://spatialcompiler.dev/mcp

Set it up in Cursor, Codex or another agent

Once connected, your agent can call the starter tool for a ready fire Draft spec and the exact call that runs it. Your first 100 fire Drafts are free with the $5 signup credit.