Forge: shape from views

forge_from_views turns a sheet of views of one object into a closed, watertight mesh. It works for any object class (vehicles, statues, props) because it only uses outlines and, optionally, a normal picture: no part grammar, no trained model, no outside mesh library.

The sheet

  • 2 × 2 grid (the Nano Banana layout): front, side facing left (front of the object to the left), top with the front at the bottom, three-quarter. Plain backdrop (magenta works best; any flat colour is keyed from the panel's border).
  • Row: views side by side, e.g. front, side, back, side_right (the other flank, front to the right), or front, side, back, top. Pass views in reading order when it isn't the default; skip ignores a panel.
  • Guide lines that run out of a panel (a ground line, a divider) and labels printed under a view are ignored.
  • Give one real size: dimension: "length 6.4 m" (or height / width / depth).

What it does

  1. Every straight-on view's outline becomes a signed distance image; the solid is everything inside all of them (a visual hull), sampled as a field and meshed with Surface Nets: one closed, outward-facing manifold piece.
  2. Drawn views never agree exactly (a front drawn wider than the top allows, perspective in a front view). A plain visual hull keeps only what every view agrees on, so each view loses what another vetoes. Two fixes, chosen per sheet by carving every combination coarsely, re-carving the best three at full size and keeping the one whose worst* straight-on view matches its outline best: slack: each outline may be exceeded by 0 to 2% of its size; reconcile (reconcile, reconcile_limit): a pixel inside a view's outline whose whole ray the other views carved away gets material back, a slab a few cells thick at the depth along the ray that the other views object to least, if that objection is under the limit (0 to 8% of the longest side).
  3. The three-quarter view's camera (azimuth, elevation and perspective) is solved from its outline against the hull of the other views. If it matches (IoU ≥ 0.7) it is a candidate fourth carve: tried with 1.5% and 3% slack and not at all, and kept only when it doesn't make the straight-on views worse (drawn three-quarter views are rarely exact). The report says which was chosen.
  4. Without a top view the cross-sections are rounded (a superellipse between the front and side spans), so a statue comes out round instead of as two crossed extrusions.
  5. The field is made well-composed before meshing (no inside or outside samples touching only along a grid diagonal), so Surface Nets gives a closed manifold even with thin parts: 0 open or branching edges, 0 flipped faces.
  6. With normals (the same sheet as a camera-space normal picture: in Flow, "convert this into a surface normal map render, same framing, background 128,128,255"), each straight-on view's normals are integrated to a height map (NormalReliefMap), anchored to the hull where the hull's normal agrees with the picture's, and carved in: canopy recesses, intakes, dents, folds and a hood opening the outlines can't see. Safeguards, all generic: anchors the solution sits well below lose their pull (robust reweighting), so a flat recess floor, which faces the same way as the hull above it, can sink while the rims hold; a relief deeper than relief_max_depth (default 6% of the longest side) or through more than half the part's thickness along the ray is not trusted (the integration drifted; AI-painted normals are guesses); if the relief moves any straight-on outline by more than half a point of IoU, each view's rim band is tried uncarved in turn and kept uncarved only when that helps.

Outputs

Assets/Forge/<name>.glb (front at -Z by default; front: "+z" for the forge recipe convention), <name>.views.json (size, per-view silhouette IoU, the solved three-quarter camera, and with normals relief_agreement: per view how far the model is from the integrated normals, cm, and on what share of the view the relief was trusted) and <name>.views.png (per view: the sheet, the carved model drawn through the same camera, and the outlines over each other: white both, red sheet only, blue model only). Shape only: one plain material, no UVs yet.

In a recipe: f.from_views("Hull", "racer_sheet.png", {dimension: "length 6.4 m", normals: "racer_normals.png"}) returns a part in the recipe frame (front at -Y).

Checking it on ground truth

forge_views_proof draws a known object as a colour sheet and a normal sheet, carves it back from those pictures alone and reports silhouette IoU per view, depth error per view against the truth (cm, outlines alone and with the relief), the model's agreement with the integrated normals, and how much of each known concavity came back. Objects: object: "racer" (built in, 6.4 m, canopy recess and side intakes), object: "statue" (built in, 2.2 m hooded figure on a plinth, hood opening and robe folds), or any model from the project via mesh. The report also says what the 2 cm-at-6.4 m bar is at the object's own size.

Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us
Download Arcwright free