Skip to content

feat(rtx): add geometry MDL scene-data aliases - #394

Draft
kvankooten wants to merge 1 commit into
NVIDIA:next_releasefrom
kvankooten:geom_attrib_names
Draft

kvankooten wants to merge 1 commit into
NVIDIA:next_releasefrom
kvankooten:geom_attrib_names

Conversation

@kvankooten

Copy link
Copy Markdown
Collaborator

One native MDL material can now request a scene-data name while different geometries store it in different existing attribute slots. Add ANARI_VISRTX_GEOMETRY_MDL_SCENE_DATA: geometry parameters such as sceneData.temperature = "attribute2" override material bindings for the same exact name, with material fallback when an alias is unset or invalid. A valid alias selecting absent data returns the MDL default.

Use synchronized device-local name tokens to bridge material-local MDL string IDs to compact geometry alias tables. Float/color lookups and data_isvalid share resolution, including synthetic geometry-light hits. Preserve existing interpolation, presence and uniform eligibility. Correct the material scene-data upload to pass an element count after expanding its table entries.

Include extension discovery, API examples, implementation notes, GPU regression coverage and an optional alias-count benchmark. Initial advertised geometry subtypes are triangle, quad, sphere, cylinder, cone, curve, SDF and isosurface.

Validation

Windows Release, Visual Studio 2022, CUDA 13.2, OptiX 7.7, ANARI 0.16.0, MDL SDK 2025.0.5, RTX A3000 Laptop GPU:

  • RTX libraries build with MDL enabled and disabled.
  • TestMdlSceneData, rtx::MdlSceneDataInstance, rtx::MdlSceneDataDescriptor, rtx::MdlEmissionClassifier, and MDL-disabled TestDenoiserReuse pass.
  • GPU coverage includes shared materials, different target-code string tables, precedence and unsetting, missing/nonfinite values, interpolation, uniform eligibility, retained edits, accumulation, destruction and sampled emission. Halving the aliased emitter value halves the receiver radiance.
  • At 256x256 and 64 spp, median GPU frame time is 53.183 ms with zero aliases, 53.729 ms with 8 (+1.0%), and 56.540 ms with 32 (+6.3%). This is a single-GPU microbenchmark, not a comparison with the pre-feature binary.
  • Formatting checks and git diff --check pass.

Known limitations

The existing rtx::MdlMaterialRegistry Windows canonical-module recovery fixture fails with source acquire failed (no fallback permitted); the same failure was reproduced using the parent checkout's unchanged registry/test sources and a fresh build of unchanged libmdl code.

Alias-only edits still rebuild BLAS. Interned names live until device destruction, and GPU resolution searches the alias list linearly. Extension-name/specification review, MaterialX/neural coverage and broader subtype/performance testing remain follow-ups. Detailed design, validation and assertion-enabled World-ordering observations are recorded in devices/rtx/docs/geometry-attribute-names-investigation.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant