Turn scenes into STL files on worker machines

Mesh scenes on a farm

A mesh job turns a scene into an STL file on another machine: a worker. You submit it, watch it, and collect the file, and your hub keeps the queue and the result wherever the job ran. The mesh is the one construct export makes, byte for byte, because the job calls the same export.

What one job costs

Measured on 2026-10-08 with the demo scene gyroid_lattice_gradient.construct, at the export's defaults: 178 298 triangles, a watertight STL of 8.9 MB.

Where Mesh time Submit to done Cost of the job
A rented Hetzner cx23 (2 vCPU, 0.0088 EUR an hour) 272 s 5 min 29 s about 0.0007 EUR
A 32-core desktop, the hub itself 67 s 67 s nothing extra

A mesh job asks for one core and 2 GiB of memory unless it says otherwise, because one export of this scene peaks at about 770 MB and grows its buffers by about 1 GB more. So a cx23, with 4 GB, runs one mesh job at a time, and a worker never takes more than its memory holds. Give resources in batch.job.submit to ask for something else.

Buying a machine takes about three minutes before it takes its first job, and it bills by the hour from then until it is destroyed. A pool that drains idle machines pays for the work and the drain time, not for the hours between batches. See Make a worker farm.


Before you start

  • A farm: a paired machine that offers construct.mesh, or a fleet that buys workers with construct.mesh among its job types. Make a worker farm shows both.
  • Your hub sends construct.mesh away: the node setting batch/remote/forwarded-types.

With no farm, the same job runs on your hub.

Submit a job

Run batch.job.submit with the scene as an input file:

{"task": "batch.job.submit",
 "args": {"type": "construct.mesh",
          "inputFiles": {"scene": "/home/me/scenes/gyroid.construct"},
          "params": {"format": "stl"}}}

It answers with the job's id. The scene goes into your hub's file store, and reaches the worker by its hash. A .cpack works too: the worker unpacks it first.

Parameter Means
format stl
cellSize The size of one cell. Left out, it is derived from the bounds, as construct export does
extractor DC-octree (the default), DC or MC
backend native (the default) or gpu. A worker with no GPU refuses a gpu job by name, and the DC-octree extractor runs on the CPU only

where chooses for you: local keeps the job on your hub, remote sends it to a worker. Left out, placement decides.

Watch it

Run batch.job.get with the id. A job on a worker shows the worker's progress, which arrives once a second, and the last lines of its log. batch.artifact.transfers shows the scene and the mesh on their way, and how much of each has arrived.

If the job waits and does not start, Find out why a job is not running lists the reasons, the ones a worker gives among them.

Collect the mesh

When the job is done, write its outputs into a folder:

{"task": "batch.job.collect", "args": {"jobId": "36", "folder": "/home/me/meshes"}}

The folder gets mesh.stl. The job's result also carries the triangle count, whether the mesh is watertight, and the quality metrics mesh.export reports.

In this section
Topics
howto construct mesh batch workers farm