Skip to content

v0.4.0: Higher-fidelity renderer (VTK or trimesh-scene swap) #14

@digispark-bot

Description

@digispark-bot

Goal

Current 3D renders use matplotlib's Poly3DCollection with per-face Lambertian shading — "good enough to confirm not garbage" but flat-looking, no real depth occlusion, no surface-finish cues. For parts where the visible finish matters (cosmetic enclosures, display pieces), a better renderer would catch issues the iso view hides.

Concrete deliverable

Swap or augment the 3D render path with a higher-fidelity backend. Two candidates:

Option A — trimesh scene renderer (trimesh.Scene.save_image)

  • Already have trimesh as a dep; uses pyglet/pyrender under the hood
  • Needs a headless GL context (EGL/OSMesa) in the container — adds apt deps
  • Better occlusion + lighting than matplotlib

Option B — VTK offscreen

  • Heavier dep, but best-in-class CAD-style rendering
  • Offscreen rendering well-supported headless

Decision criteria (resolve during spike)

  • Does it work cleanly headless in the existing slim container without ballooning image size? (matplotlib/Agg's whole appeal was zero GL deps — see renderer.py docstring "No Xvfb, no VTK, no OSMesa")
  • Is the fidelity gain worth the dep weight + container complexity, given the perimeter/small-over-capable principles?

This may resolve as "not worth it." The matplotlib renderer was a deliberate small-over-capable choice. Only swap if a real design's review actually needed finish detail the iso view couldn't show. Spike first, decide, document the decision either way.

Out of scope

  • Photorealistic/ray-traced output — marketing material, not design review
  • Animation / turntable GIFs

Why

Per ROADMAP Theme 2 (output fidelity). Lowest-priority Theme 2 item and the most likely to be declined on cost/benefit — filed for completeness so the decision is tracked, not forgotten.

Tracked in ROADMAP.md Theme 2.

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