Convert MoGe Point Map to Mesh
Turning MoGe geometry into a textured GLB
- moge_geometry
- MESH
MoGe gives you a point map; this node gives you something you can actually put in Blender. MoGePointMapToMesh triangulates a MoGe point map into a MESH - vertices, faces, UVs, and your source image carried through as the base color texture. One node between "photo in" and "mesh out," and it's the whole reason to reach for MoGe over a plain depth estimator.
How it works
It takes the moge_geometry packet from MoGeInference (or MoGePanoramaInference) and builds a grid mesh: each pixel becomes a vertex, adjacent pixels become triangles, and the source image becomes the UV texture. Then it handles the coordinate surgery that makes the mesh usable outside ComfyUI - perspective MoGe output is OpenCV space (Y down, Z forward), and it's flipped into glTF convention (Y up, Z back), with the winding fixed so faces stay front-facing. Feed the MESH into a Save 3D Model node and you get a .glb in your output folder.
The dials that matter
- batch_index (default 0) - which image of a batched geometry to convert. Per-image vertex counts differ, so batches can't be stacked into one mesh; pick one.
- decimation (1–8, default 1) - the vertex stride. 1 is full resolution and can be millions of triangles; 2 or 3 is usually plenty for a game asset and dramatically smaller.
- discontinuity_threshold (0–1, default 0.04) - drops triangles whose 3×3 depth span exceeds this fraction. This is the anti-tearing control: occlusion edges are sharp depth jumps, and without some threshold the mesh grows "bridges" across them. 0 turns it off.
- texture (default on) - carries the source image through as baseColor.
Where people get burned
The classic error: "MoGe produced an empty mesh." It happens when the mask culls too much - typically heavy sky or a scene with little recoverable geometry. The node's own suggestion is the fix: try discontinuity_threshold=0 or apply_mask=False back upstream in MoGeInference. On the quality side, remember this is a height-field-style grid from one viewpoint - flat surfaces that face away from the camera come out fragmented, and there are no backsides. It's quick scene prototyping and reference geometry, not a replacement for multi-view reconstruction. And if you push decimation to 8 expecting a clean low-poly, you get a sparse holey grid instead; for real retopology you want the full-res mesh and a separate tool.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| moge_geometry | MOGE_GEOMETRY | — | |
| batch_index | INT | 00–4096 | Which image of a batched MoGe geometry to mesh. Per-image vertex counts differ, so batches can't be stacked into a single MESH. |
| decimation | INT | 11–8 | Vertex stride; 1 = full resolution. |
| discontinuity_threshold | FLOAT | 0.040–1 | Drop pixels whose 3x3 depth span exceeds this fraction. 0 = off. |
| texture | BOOLEAN | true | Carry the source image through as the baseColor texture. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MESH | MESH | — |