Repository navigation
crust-core: the image depends on the scene index alone (hydra-only-renders) - #431
Conversation
…nders) What the delegate asks its host about the stage (HostFacts) now informs warnings, crust check and provenance only, except a .mtlx reference until mtlx-format-plugin composes it into the stage. - Moho 4d63d41 (stage-meters-per-unit): depth of field reads the stage unit from the index root's __usdMetersPerUnit/metersPerUnit; HostFacts::meters_per_unit is removed. - Asset paths are the index's asset values, which Moho resolves on their authoring layer. HostFacts::authoring_layer_dir and the layer-dir plumbing (MatSource, the MaterialX and precomp translators, the products reader) are removed. A relative path authored as a string, which USD never anchors, resolves against the stage's directory and raises the new asset.string_path warning (reverses 0bebb34; ALab 2.3.0 and the Moana island author none). - crust-render/tests/host_facts.rs: every sample that references no .mtlx renders bit-identically at 16 spp with NoHostFacts and StageHostFacts; a .mtlx sample is checked to differ. - tests/lens_units_from_index.rs; asset_anchoring.rs's string case rewritten, an absolute-string case added. Images: all 45 samples identical to goldens recorded before the change (scripts/check_images.sh, 16 spp, --indirect-clamp 0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoRender from scene-index assets and units without stage host facts
AI Description
Diagram
High-Level Assessment
Files changed (30)
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code Review by Qodo
1.
|
… on #431) A wrapped line of the warning's literal had lost its trailing \ continuation, so every message carried about fourteen spaces between "does not" and "anchor". asset_anchoring's string case now checks the message text. Also ticks hydra-only-renders 2.4, 4.2 and 4.3, verified by #431's Linux CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why
Crust's delegate reads only Hydra schemas (
tests/hydra_only.rs), but three answers it took from the host's stage throughHostFactsstill changed the image:metersPerUnit;.mtlxreference.Under a host with no stage (
NoHostFacts), a relative texture authored as astring, a metre-unit scene's lens and a.mtlx-referenced material rendered differently. A Hydra 2.0 delegate should render from its index alone.What
4d63d41(stage: the root carries the stage's authored unit (__usdMetersPerUnit) Moho#28,stage-meters-per-unit). Depth of field reads__usdMetersPerUnit/metersPerUnitfrom the index root.HostFacts::meters_per_unitis removed.assetvalue arrives resolved on its authoring layer, as UsdImaging does it.HostFacts::authoring_layer_diris removed, along with the layer-directory plumbing:MatSource's index, rebase and host fields; the MaterialX and precomp translators'LayerDir; and the products reader's host.string, which USD never anchors, resolves against the stage's directory and raises the newasset.string_pathwarning. This reverses0bebb347. A temporary count undercrust checkfound ALab 2.3.0 and the Moana island author no such path..mtlxreferences stay a host fact untilmtlx-format-plugincomposes them into the stage.crust checkand provenance only.OpenSpec:
openspec/changes/hydra-only-renders/. It adds requirements torender-delegate("The image depends on the scene index alone") and tousd-scene-import("Relative asset paths resolve as the index gives them").Tests
crust-render/tests/host_facts.rs(the guard): everysamples/*.usdathat references no.mtlxrenders bit-identically at 16 spp withNoHostFactsand withStageHostFacts.materialx_basicis checked to differ, so the exception list cannot hide a regression.crust-core/tests/lens_units_from_index.rs: a metre stage's lens is identical without host facts. On the old code it was 100× too wide without them.crust-core/tests/asset_anchoring.rs: the string case is rewritten (resolves against the stage, warns), and an absolute-string case is added.Measurements
Images:
scripts/check_images.shagainst goldens recorded before the change (16 spp,--indirect-clamp 0): all 45 samples identical. Kitchen_set is not on the machine I used.Local gate (Windows): fmt and clippy are clean, with and without
--features delegate. The workspace tests pass except three that fail identically on unmodifiedmainand are Windows-specific:asset_anchoring::relative_assets_…: Linux path expectations;kept::a_tile_added_…: touching a directory is denied;stamp::the_lens_the_layer_stack_…: 8.3 short-path spelling.Linux CI is the check for those, for the unchanged
assetcases, and for the site build: Zola 0.21 is needed for the new texture file paths section and theasset.string_pathwarning row.Downstream
Mantle bumps crust-render after this merges. It needs no code change, since it keeps passing
StageHostFacts.🤖 Generated with Claude Code