hydra-rs 0.0.1

Rust bindings to OpenUSD's Hydra rendering layer: scene-index ingestion, render-delegate enumeration, headless render to RGBA via Storm.
docs.rs failed to build hydra-rs-0.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

hydra-rs

Rust bindings to OpenUSD's Hydra rendering layer. Sibling crate of rust-usd; the two are designed to be used together but currently interop via path strings rather than shared cxx types.

What's here:

  • SceneIndex::from_path(path) opens a stage and ingests it into a UsdImagingStageSceneIndex. prim_paths() and prim_count() walk the index so callers can verify Hydra sees the prims they expect, including filtering of shaders inside materials.
  • list_render_delegates() enumerates the HdRendererPlugin plugins USD's plug system found at startup. On a typical macOS dev box that returns ["HdStormRendererPlugin"].
  • render_to_rgba(usd_path, delegate, width, height) runs a real headless render through Storm. It constructs Hgi::CreatePlatformDefaultHgi (HgiMetal on macOS), feeds it to UsdImagingGLEngine, disables the HdxPresentTask so Storm does not try to copy the Metal texture into a non existent GL context, configures a hardcoded free camera plus a single positional GlfSimpleLight, runs the convergence loop, and reads the half float color AOV back as RGBA8.

The hydra_render example renders a 256x256 image of a sphere at the origin with displayColor = (0.85, 0.2, 0.2) and writes a raw RGBA file you can convert to PNG with ffmpeg. Mean R should be visibly higher than mean G and B once the example finishes.

This crate has the same build environment as rust-usd. Set USD_INCLUDE_DIR, USD_LIB_DIR, USD_LIB_PREFIX, and the Python framework variables documented in the rust-usd README before running cargo.

The bound surface is intentionally small for now. Camera state, light authoring, multiple AOVs, and render delegate parameters are the natural next layers and will land as the consumer painter app pushes on each one.