AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX

Spec: case-sensitive vs. case-insensitive path resolution not specified

Open
#1,480 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
451
Avg merge
6d 6h
Merged PRs (30d)
5

Description

Hi, it seems that the MaterialX spec and supplements currently do not specify whether file references (references to textures) should be treated case-sensitive or case-insensitive by implementations. Currently, that leads to interoperability issues as a material that is designed on one OS (e.g. Windows) with a viewer that may or may not care about casing may break on another OS or even on another viewer that implements file resolution differently.

For a format designed for interoperability between applications that's not great; for reference, the [glTF spec](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#uris) states [specific RFCs ](https://www.rfc-editor.org/rfc/rfc3986.txt)as references for relative paths (scheme and host are case-insensitive and the rest is case-sensitive), without requiring normalization (so schema and host could also be uppercase or mixed).

Opening this issue to see clarification - either that the MaterialX spec itself explicitly doesn't care and leave the choice up to implementations, or that the MaterialX spec recommends or requires that relative paths follow some rules (which I'd be in favor of to ensure compatibility).

I'm raising this issue because I noted that [this MaterialX file](https://matlib.gpuopen.com/main/materials/all?material=8c9de375-59a8-49a8-a553-639880e0b3f9) uses the worst of both worlds with a mix of exact references and references with wrong casing ("baseColor" but the file is named "basecolor"). Zip for archival purposes:
[Emerald_Peaks_Wallpaper_1k_8b_O9xco8x.zip](https://github.com/AcademySoftwareFoundation/MaterialX/files/12397067/Emerald_Peaks_Wallpaper_1k_8b_O9xco8x.zip)
Subsequently, it renders differently on different viewers even on the same machine (some don't care, some care about casing) and it will likely break on other OSs.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the MaterialX spec and supplements for file-reference and relative-path rules, then compare their wording with the linked glTF URI and RFC 3986 references. Done means the specification's case-handling policy is explicitly decided and documented.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.