Skip to content

View-dependent ray-march dropout of thin / non-uniformly-scaled geometry (slab vanishes at grazing angles) #76

Description

@kmatzen

Observation

A local project rendered as three sharp "fins/spikes" sitting on a thin slab, which looked wrong at a glance. Project tree (looks fuzz/random-generated — note values like x: -1.9296…, scale: 0.2012…):

{
  "kind": "linearPattern",
  "params": { "axisX": 1, "axisY": 0, "axisZ": 0, "count": 3, "spacing": 20 },
  "children": [{
    "kind": "translate", "params": { "x": -1.9296184514936314, "y": 0, "z": 0 },
    "children": [{
      "kind": "scale", "params": { "x": 0.20127571037331896, "y": 2.578296191303632, "z": 1 },
      "children": [{
        "kind": "union", "params": { "smooth": 0 },
        "children": [
          { "kind": "box", "params": { "width": 100, "height": 30, "depth": 50 } },
          { "kind": "translate", "params": { "x": -5.224608338673388, "y": 0, "z": 0 },
            "children": [ { "kind": "sphere", "params": { "radius": 20 } } ] }
        ]
      }]
    }]
  }]
}

Triage — investigation & evidence

1. Not caused by #75 (SDF-soundness rework). Rendered this exact tree on main immediately before #75 (4737458) and on the #75 branch (e949117): pixel-identical viewport (0 / 543,560 pixels differ; diff bbox empty). #75 changes the distance-field bound, not the zero-level-set, so the surface is unchanged — as expected.

2. The scale node is correct. Rendered scale(0.20, 2.58, 1) → sphere(r=20) in isolation → a clean, smooth ellipsoid (semi-axes ≈ 4 × 51 × 20), no pinching or pointed tip. No distortion from the non-uniform scale.

3. The "fins" are correct geometry + camera angle, not a defect. In the project the scaled box becomes a ~20×77×50 slab and the scaled sphere an ellipsoid ~8×103×40; they're unioned and tiled ×3 by the linear pattern. Each ellipsoid (103 tall) is taller than the slab (77), so only its rounded top cap pokes above — and a rounded cap cropped by the slab edge at that view angle reads as a "fin/point."

Disposition

Not a viewport rendering bug — the ray-marched viewport is faithful to the input. Low severity. The input appears to be a randomized/fuzz project rather than an intentional model.

Remaining to close this out

One thing not yet verified: the exported mesh. The viewport is GPU ray-marched, but STL/3MF export goes through a different pipeline (interval-pruned octree + dual contouring at 64³, per #75). Thin, high-aspect-ratio features (an 8×103×40 ellipsoid, and the ~4-wide scaled slab) are exactly where dual-contouring can under-resolve. Worth confirming an export of this project (or a lone thin scaled ellipsoid) produces a faithful mesh, not a faceted/pinched one — that would be a meshing issue distinct from everything above, and would land under #75's own octree/interval changes.

Filed as a triage record per request; reproduction assets and screenshots were captured during investigation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions