NVIDIA's Lobby scene loaded at runtime in Unity: a hall with wooden walls, wicker pendant lights and planters of yellow flowers on a lit floor.

Industry & R&D

OpenUSD at runtime, in Unity and on the web

In-house

Open the model, not an export of the model

The usual road from an industrial model to a real-time application runs through the editor: import the file, convert it to the engine's format, rebuild a package for each platform, then ship it. Every new delivery from the design office starts the cycle over, and what the application shows is never the source file — only its latest conversion.

We wanted the opposite: drop an OpenUSD file on the server and let the application open it as it is, on a computer as well as on a standalone headset. No conversion step, no trip back through the editor, and without losing along the way what makes a USD scene rich: its variants, its animation, its materials.

Why the existing building blocks fell short

We started by trying what was already there. None of it covered both the headset and the variants.

  • Unity's new USD toolkit does load at runtime, but it is experimental, limited to Windows and macOS, and handles neither variant sets nor animation.
  • Unity's former USD package relies on a 2023 version of USD, was never shipped for Android, and is no longer maintained.
  • OpenUSD itself, the reference library, can be ported to Android, but it is not an official target: 20 to 40 MB of binaries, and a plugin registry to deploy on the device's disk. We kept it as plan B.

What we built

We built a native plugin around a lightweight USD core, written in dependency-free C++, and wrote the Unity loader on top of it, which turns the composed scene into the engine's objects, materials and behaviours. The plugin weighs 5.4 MB on Android and 6.5 MB on Windows; it runs on macOS, Windows and Android, Meta Quest headsets included.

  • Composition in the background. References, sublayers and variants are resolved off the main thread, and PNG, JPEG and EXR textures are decoded by the plugin. The scene is then built over several frames, without freezing the application.
  • Materials. UsdPreviewSurface shaders become Unity materials: colour, relief, metal, roughness, transparency. The tangents that relief needs are computed at load time, and faces flipped by some exporters are turned the right way round.
  • Variants. The variant sets declared upstream — doors open or closed, paint colours, parts shown or hidden — are read and classified automatically, then wired into the application's interface. You switch variants without reloading the model.
  • Animation. The animation described in the file is replayed in the engine: a door opens along the arc the design office intended, around its real pivot.
  • Lights. The lights declared in the USD scene become Unity lights, with their intensity, colour temperature and cone.
  • One package for every platform. The USD export ships in an archive along with a short manifest. The same archive serves the computer and the headset.
In Unity, with the application running: NVIDIA's Lobby sample scene, a USD file of 942 meshes, is loaded at runtime by our plugin. It builds up frame by frame without freezing the application, materials and lights included.

What it gives on real models

We put it to the test on two car models that came out of real design pipelines, and on a sample scene published by NVIDIA.

  • A city car of 4 million triangles, 110 meshes and 38 materials: the scene is composed in under 100 ms.
  • A complete vehicle of 92,000 elements, 15,000 meshes and 15 million triangles: composed in 5 seconds. Its 40 variants, spread over 16 sets, are analysed in one second. Our first approach, which recomposed the whole scene for every variant, would have taken over half an hour.
  • NVIDIA's Lobby scene, 942 meshes exported from Omniverse: their 30 million face corners are brought down to 8 million vertices in 2.4 seconds, off the main thread.

A model that size is still too heavy for a standalone headset's memory: it opens on a computer, and has to be lightened at export for the headset. Runtime loading does not do away with preparing the data; it does away with the conversion step.

Checked against the reference

A lighter library is only worth having if it reads files the way the official one does. So we compared our results with OpenUSD's on the same files: the same variant sets, the same composed selections, the same number of meshes, and identical part positions, pivots included, at every point of the animation.

Next: in the browser

The same core compiles to WebAssembly: a module of around 5 MB that any recent browser can run. Most of the work described above — composing the scene, analysing the variants, preparing the animation — happens in native code and does not depend on Unity. Only the last step, building the objects shown on screen, belongs to the engine.

On the web, that last step would fall to three.js, the engine that already runs the ScaleViz 3D configurator. That is the next step we are preparing: opening the file delivered by the design office in a plain web page, with its variants and its animation, without going through a GLB export.

This work extends that of our OpenUSD importer for Unity, which keeps, inside the editor, the business data a standard import throws away. Both come from the same conviction: a 3D model should never become a prisoner of the tool that displays it.

Contact

Let’s talk about your project

Tell us about your need in a few lines. We come back within 48 hours with an initial view, free of charge.

Tell us about your need in a few lines: context, goal, timeline.