Skip to content

coverage: discover() returns unbakeable materials — coverage checker needs per-material capability classification #435

@gerchowl

Description

@gerchowl

Problem

scripts/check_substrate_coverage.py (new in this branch) compares upstream discover() IDs against what's on HF. But discover() returns all materials an API advertises — including ones the baker can't produce texture tiers for. This creates permanent false-positive violations:

ambientcg (45 false positives):

  • 28 materials offer only JPG downloads (adapter's _TIER_ATTRS matches only PNG)
  • 17 materials have no downloadable files at all (empty/placeholder listings)

gpuopen (18 false positives):

  • 18 procedural/parametric materials whose ZIPs contain only a .mtlx shader definition with zero texture PNGs
  • _bake_mtlx() in bake.py:52-66 is a stub that raises NotImplementedError
  • Materials: Aluminum, Brass, Bronze, Chrome, Cobalt, Copper, Gold, Iron, Nickel, Acryl Plastic, White Plastic, Frosted Glass, Glass, Dark Glass, Diamond, Red Wine, White Wine, Semitransparent Silicone

Proposed fix

Two-sided classification in discover() / the coverage checker:

Material capability Expected texture tiers Expected thumb Example
textured (has PNG textures) 1k, 512, 256, 128, ktx2-* yes ambientcg/Bricks097, gpuopen/Wood_X
scalar-only (mtlx/parametric, no textures) none yes (shader-ball render) gpuopen/Gold, gpuopen/Glass
unbakeable (no downloads / JPG-only) none no ambientcg/Asphalt001 (JPG-only)

The coverage checker should:

  1. Get (textured_ids, scalar_only_ids, unbakeable_ids) per source instead of one flat set
  2. Expect texture tiers only for textured_ids
  3. Expect thumb for textured_ids ∪ scalar_only_ids
  4. Expect nothing for unbakeable_ids (or report them separately as "upstream has no PNG")

Where to implement

  • _ids_for_source() in scripts/snapshot_upstream_catalog.py — return classified sets
  • ambientcg: apply _filter_with_downloads() (already in sources/ambientcg.py:304) to split textured vs unbakeable
  • gpuopen: check whether the material has texture packages vs mtlx-only to split textured vs scalar-only
  • scripts/check_substrate_coverage.pywanted_material_ids() returns classified sets, build_coverage_report() uses correct population per tier

Related

Optional follow-up

  • JPG fallback for ambientcg's 28 JPG-only materials (update _TIER_ATTRS in sources/ambientcg.py)
  • MaterialX TextureBaker implementation for gpuopen's 18 procedural materials

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:bakerBaker pipeline, Dagger, data fetchersenhancementNew feature or requestpriority:mediumImportant but not urgent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions