Repository navigation
Closed
Description
Context
The rowmap + HTTP range-read pattern is the entire client API:
- Fetch rowmap JSON (~few hundred KB)
- Look up material ID → byte offset + length per channel
- HTTP Range-read into the Parquet → raw PNG bytes
This is 10–50 lines in any language. No pyarrow, no parquet
reader, no binary deps.
Each shim exposes the same three operations:
- get_manifest(tag) — fetch release-manifest.json, discover
URLs for all sources × tiers - fetch(source, id, tier) — pull textures, return channel →
bytes - rowmap_entry(source, id, tier) — return raw offset/length
info so the consumer can do the fetch themselves with whatever
HTTP client they prefer
Reference clients
Python (clients/python.py / pymat.vis.shim)
~150 lines. Ships inside the mat wheel. Also importable
standalone for users who don't want the full Material hierarchy.
from pymat.vis import shim
# Full fetch — returns channel → PNG bytes
textures = shim.fetch("ambientcg", "Metal_Brushed_001", tier="1k")
textures["color"] # PNG bytes
# Just the pointer — for DIY consumers
entry = shim.rowmap_entry("ambientcg", "Metal_Brushed_001", tier="1k")
# → {"color": {"offset": 102400, "length": 51200}, ...}
# Hand this to curl, JS fetch(), Rust reqwest, whateverJavaScript (clients/js.mjs)
~50 lines. No npm package — import from repo or copy-paste.
import { getManifest, fetchMaterial, rowmapEntry } from './clients/js.mjs'
const manifest = await getManifest('v2026.04.0')
const textures = await fetchMaterial('ambientcg', '1k', 'Metal_Brushed_001', manifest)
textures.color // Blob
// Or just get the pointer
const entry = await rowmapEntry('ambientcg', '1k', 'Metal_Brushed_001', manifest)
// → {color: {offset: 102400, length: 51200}, ...}
// Consumer does their own fetch()Shell (clients/example.sh)
# Fetch manifest
curl -sL https://github.com/MorePET/mat-vis/releases/download/v2026.04.0/release-manifest.json
# Fetch one texture channel (offset + length from rowmap)
OFFSET=102400; LENGTH=51200
curl -sH "Range: bytes=${OFFSET}-$((OFFSET+LENGTH-1))" \
https://github.com/.../mat-vis-ambientcg-1k.parquet \
-o Metal_Brushed_001_color.pngRust (clients/rust.rs)
~80 lines. Reference impl. Not a crate unless demand justifies it.
Versioning
Co-released with each calver tag. Client code + rowmap format +
data always match. No separate package registries.
Acceptance
- Python shim: get_manifest, fetch, rowmap_entry
- JS shim: getManifest, fetchMaterial, rowmapEntry
- Shell example with real values from first release
- Rust reference impl (can defer to post-M5)
- All shims expose the same three operations
- README documents all four language paths
- release.yml includes clients/ in release assets
Related
- MorePET/mat#35
— Material.vis + adapters (Python consumer side) - ADR-0001 — rowmap format spec
- ADR-0004 — cache layout (Python shim implements this)
Metadata
Metadata
Assignees
Labels
No labels
Activity
gerchowl commentedon Apr 17, 2026
Downstream consumer: MorePET/mat#37
mat's
pymat.vis._clientcurrently hardcodes the source list, tag,and URL pattern as a temporary bridge. Once this issue ships the
Python reference client with manifest-driven discovery, mat will
import/vendor it instead of maintaining its own fetch logic.
The Python reference client (
clients/python.py) is the canonicalmanifest consumer — mat and any other Python consumer should use it
rather than reimplementing manifest parsing.
Key requirement: the client must be importable standalone (no pymat
dependency) so mat can vendor or import it without circular deps.
gerchowl commentedon Apr 17, 2026
Reference clients shipped:
All at clients/. Dagger test infrastructure for all 4 languages.
feat: add mat-vis-client Python package
docs(adr): ADR-0013 adapter color input + colorspace + #300 cleanup +…
feat(client)!: 0.7.0 phase — linear-color foundation + #304 canonical…
feat: add mat-vis-client Python package
docs(adr): ADR-0013 adapter color input + colorspace + #300 cleanup +…
feat(client)!: 0.7.0 phase — linear-color foundation + #304 canonical…