Skip to content

strict-quality is unsatisfiable for any fabric material with a woven cue (blocks codegen) #135

Description

@jarvisthegreat2-svg

Version: 2.0.0 (6e60b5e) · Profile: generic, no plugins installed · Subject: a wool/leather/knit garment

Summary

--strict-quality cannot be satisfied by any fabric material that carries a woven cue, and since generate_threejs_factory.py is fail-closed on strict, no factory can be emitted for such a material at all.

The contradiction

forge/_shared/material_physics.py enforces two rules that cannot both hold:

  • :150-158sheen > 0 with no sheenColor is a hard error: "three's default sheenColor is #000000 and the sheen term is a multiply by that colour, so this contributes exactly zero. Declare sheenColor."
  • :69-72 + :184-195("sheen", "sheenColor") is listed in COLLAPSED_DEGREES_OF_FREEDOM, so declaring both raises quality: ... these are not independent evidence.
  • :163-170 — whenever sheen is active, sheenEnergyComp raises a second quality: warning advising base-colour compensation. It fires unconditionally, and there is no field in which to record that the compensation was applied — so it fires even when the authored base is already pre-brightened by exactly the factor the message asks for.

validate_sculpt_spec.py --strict-quality promotes every quality: warning to an error, and generate_threejs_factory.py:4072-4076 refuses to write a factory when strict fails.

Reproduction

Author one fabric material three ways and run validate_sculpt_spec.py <spec> --strict-quality:

configuration exit result
sheen: 0.7 + sheenColor: "#f2ece2" — the only combination that renders a woven cue 1 4 strict errors
sheen: 0.7, no sheenColor 1 hard error, "contributes exactly zero"
no sheen at all 0 passes — and has no woven cue

Only the third passes, and the repo's own guidance makes it the wrong answer: grimoire/build/threejs_skin_and_cloth_materials.md:196-206 states sheen "is the whole of the woven cue available to a code-only pipeline", and the material registry notes that a fabric family shipping no sheen tint has no woven cue at all.

Why --allow-nonstrict is not a workaround

generate_threejs_factory.py:4059-4084 labels it test-only, prints WARNING: generating a non-production test-fixture factory, and refuses to combine it with --pass-id — which the locked-pass workflow requires.

Suggested fix

Either exempt these two advisories from strict promotion, or add a field (e.g. sheenEnergyCompensated: true) that silences the darkening advisory once the author has compensated. Note that the ior/reflectivity pair in the same tuple is a genuine either-or — reflectivity is a derived accessor over ior, so authoring one is correct. sheen/sheenColor is not analogous: three.js requires both for the term to evaluate to anything.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions