{"id":50544756,"url":"https://github.com/displayxr/displayxr-demo-modelviewer","last_synced_at":"2026-06-06T08:00:52.561Z","repository":{"id":361895018,"uuid":"1255780460","full_name":"DisplayXR/displayxr-demo-modelviewer","owner":"DisplayXR","description":"DisplayXR demo — glasses-free 3D glTF 2.0 PBR model viewer (OpenXR + Vulkan). Scaffolded from displayxr-demo-gaussiansplat.","archived":false,"fork":false,"pushed_at":"2026-06-03T22:32:59.000Z","size":7078,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T23:19:45.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DisplayXR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-01T06:58:18.000Z","updated_at":"2026-06-03T22:18:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DisplayXR/displayxr-demo-modelviewer","commit_stats":null,"previous_names":["displayxr/displayxr-demo-modelviewer"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/DisplayXR/displayxr-demo-modelviewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DisplayXR%2Fdisplayxr-demo-modelviewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DisplayXR%2Fdisplayxr-demo-modelviewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DisplayXR%2Fdisplayxr-demo-modelviewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DisplayXR%2Fdisplayxr-demo-modelviewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DisplayXR","download_url":"https://codeload.github.com/DisplayXR/displayxr-demo-modelviewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DisplayXR%2Fdisplayxr-demo-modelviewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33973868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-03T23:00:50.915Z","updated_at":"2026-06-06T08:00:52.536Z","avatar_url":"https://github.com/DisplayXR.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DisplayXR Demo — 3D Model Viewer\n\nReal-time PBR model viewer for glasses-free 3D displays, built on the\nDisplayXR runtime via OpenXR with Vulkan. Loads **glTF 2.0** (`.glb` / `.gltf`),\n**STL**, **OBJ**, **FBX**, and **USD** (`.usdz` / `.usd` / `.usda` / `.usdc`)\nmodels and renders them with asymmetric per-eye Kooima projection for the full\nmultiview 3D experience.\n\nLoads metallic-roughness PBR materials with textures and image-based lighting,\na blurred procedural skybox, and a transparent see-through mode (Windows). The\nbundled sample is the Khronos DamagedHelmet, auto-loaded at startup.\n\n\u003e **Requires the DisplayXR runtime v1.9.1 or newer** (Windows) / **the latest\n\u003e macOS runtime `.pkg`**. Download the matching installer from the\n\u003e [`displayxr-runtime` releases page](https://github.com/DisplayXR/displayxr-runtime/releases):\n\u003e `DisplayXRSetup-*.exe` on Windows or `DisplayXR-Installer-*.pkg` on macOS.\n\u003e v1.9.1 ships the Vulkan transparent-window bridge + in-place resize this demo\n\u003e relies on; older runtimes produce a broken/black window or flicker on resize.\n\u003e The shell ([`displayxr-shell-releases`](https://github.com/DisplayXR/displayxr-shell-releases))\n\u003e is optional — only needed for the spatial workspace shell.\n\n## Supported formats\n\n| Format | Extensions | Materials | Notes |\n|---|---|---|---|\n| glTF 2.0 | `.glb` `.gltf` | Full metallic-roughness PBR + textures | Reference path |\n| STL | `.stl` | Neutral default material | Binary + ASCII; geometry only |\n| OBJ | `.obj` (+ `.mtl`) | Phong → metallic-roughness shim | Best-effort material fidelity |\n| FBX | `.fbx` | PBR maps, Phong fallback | Skinned + animated (auto-plays first clip); no blend shapes yet |\n| USD | `.usdz` `.usd` `.usda` `.usdc` | UsdPreviewSurface PBR | Base-color/emissive textures + PBR factors; normal \u0026 metallic-roughness *maps* not yet honoured |\n\nEvery format feeds the same renderer (metallic-roughness PBR + image-based\nlighting). Not yet supported: **Draco** mesh compression and **KTX2 / Basis**\ntextures (textures are PNG/JPEG only). See [`PORTING.md`](PORTING.md) for the\nper-backend breakdown and roadmap.\n\n## Controls\n\n| Input | Action |\n|---|---|\n| WASD / Q / E | Strafe the virtual display in 3D |\n| Left-click drag | Rotate the virtual display |\n| Scroll / trackpad | Zoom (virtual display height) |\n| `-` / `=` | Decrease / increase depth + IPD together (10 %–100 %) |\n| `M` | Auto-orbit: slow turntable rotation when idle |\n| `V` | Cycle rendering modes advertised by the display runtime |\n| `L` or top-bar **Open…** | Load a different model (glTF / STL / OBJ / FBX / USD) |\n| Drag-and-drop (macOS) | Load a supported model dropped onto the window |\n| Space | Reset pose, zoom, depth |\n| Tab | Toggle HUD |\n| Ctrl+T | Toggle transparent background (desktop see-through; Windows only) |\n| Esc | Quit |\n\n## Build from source\n\n### Prerequisites (both platforms)\n- CMake ≥ 3.21 + Ninja\n- [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) (includes `glslangValidator`)\n- [OpenXR loader](https://github.com/KhronosGroup/OpenXR-SDK) (find_package-visible)\n- A DisplayXR-compatible runtime (install via `DisplayXRSetup-*.exe` from\n  [displayxr-runtime releases](https://github.com/DisplayXR/displayxr-runtime/releases))\n\n`model_common/` fetches **tinygltf**, **glm**, and **tinyusdz** (USD) via CMake\n`FetchContent` on first configure (no submodules); **tinyobjloader** (OBJ) and\n**ufbx** (FBX) are vendored under `model_common/third_party/`. STL has no\ndependency. The first configure builds tinyusdz from source, so it is slower.\n\n### macOS\n```bash\nbrew install cmake ninja vulkan-sdk openxr-loader\n./scripts/build_macos.sh\n# Run against an installed DisplayXR runtime (handles the Vulkan-loader setup):\n./scripts/run_macos_dev.sh\n```\n\u003e Launch the dev build with `scripts/run_macos_dev.sh`, not the bare binary.\n\u003e The dev binary links Homebrew's Vulkan loader while the installed runtime\n\u003e loads its own; the script converges both on one loader (and points Vulkan at\n\u003e the runtime's bundled MoltenVK) so the `xrGetVulkanGraphicsDeviceKHR`\n\u003e handshake succeeds. The distributed `.app` (`build_macos.sh --installer`)\n\u003e bundles a self-consistent Vulkan stack and needs none of this.\n\n### Windows\n```bat\nREM Sets vcvars64 + OpenXR_ROOT + Vulkan SDK, then configures + builds.\nscripts\\build-with-deps.bat\nREM Run\nbuild\\windows\\model_viewer_handle_vk_win.exe\n```\n\u003e Use `build-with-deps.bat`, not the bare `build_windows.bat` — the latter\n\u003e assumes you are already inside a VS developer environment.\n\n## Repo layout\n\n```\n.\n├── macos/                  Platform entry + window handling (Cocoa / MoltenVK)\n├── windows/                Platform entry + window handling (Win32 / Vulkan)\n├── model_common/           Multi-format PBR renderer: loaders + renderer + shaders\n├── common/                 Shared helpers: Kooima math, input, HUD\n├── openxr_includes/         Vendored OpenXR headers (incl. DisplayXR extensions)\n├── installer/              Windows NSIS + macOS .pkg installers\n├── scripts/                Build scripts for each platform\n└── PORTING.md              Roadmap (port done; animation/skinning next)\n```\n\n`common/` and `openxr_includes/` are shared with the other DisplayXR demos and\nwere seeded from the runtime source tree.\n\n## Why a glTF viewer (not a Gaussian-splat fork)\n\nThis is a separate demo, not a mode bolted onto the splat viewer: it shows a\ndifferent DisplayXR capability (mesh + PBR rendering) and grows the demo\ngallery. The renderer draws on techniques from the MIT-licensed\n[SaschaWillems/Vulkan-glTF-PBR](https://github.com/SaschaWillems/Vulkan-glTF-PBR).\n\n## License\n\nBSL-1.0 — see `LICENSE`. Bundled demo models carry their own licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisplayxr%2Fdisplayxr-demo-modelviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisplayxr%2Fdisplayxr-demo-modelviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisplayxr%2Fdisplayxr-demo-modelviewer/lists"}