Based On: Omniverse Kit SDK 106.0
The USD Composer App Template provides a streamlined starting point for developers aiming to create complex OpenUSD scenes. This template is tailored for configurator applications, featuring enhanced performance through the Fabric Scene Delegate, improved support for AXF sourced MDLs, and robust Variant Tools.
To better serve complex scene editing use cases, USD Composer has been optimized to include a refined set of extensions, focusing on the most essential components. This template simplifies the creation and manipulation of detailed 3D scenes, making it easier to customize and extend functionalities to meet your team's and customer's needs.
The USD Composer Template is perfectly suited for:
-
Configurators - USD Composer is targeted at authoring for Configurators. Developers can leverage, asset layout, materials, lighting, rendering, and variant tools to bring their configurator projects to final quality. The resulting USD asset can then be packaged and deployed to end users using the USD Viewer kit-app-template
-
Design Review - The exact same asset that is authored for configurators can also be used for Design Review. Stakeholders can walk through the options of a product that the design team has authored and decide what works best for their final product offering
- OpenUSD File Aggregation: Seamlessly combine and manage multiple USD files in a unified scene.
- Variant Tools: View, edit, and interact with USD Variants throughout USD Composer.
- Scene Optimizer and Validation: Validate and modify your USD based on your custom pipeline.
- Asset Packaging: Collect and prepare your final content for deployment to your end user experiences.
- Built in Importers: Directly import and convert files into the OpenUSD format.
- Material Library: library of materials to seed your imagination and use on your assets.
- Live Collaboration: Real-time collaboration tools allowing multiple users to view and edit scenes concurrently
To get started with the USD Composer template, ensure your development environment meets the prerequisites outlined in the top-level README.
NOTE: Example commands should be executed in powershell in Windows and terminal in Linux.
git clone https://github.com/NVIDIA-Omniverse/kit-app-template.git
cd kit-app-template
Note for USD Composer : Some applications require setup extensions to function as intended. In the case of USD Composer, the setup extension controls the configuration of the extensions within the application, their layout, and other settings. During Application configuration, you will be prompted for information about this extension.
NOTE: Feel free to use default values for testing purposes.
Linux:
./repo.sh template new
Windows:
.\repo.bat template new
Note: If this is your first time running the
template new
tool, you'll be prompted to accept the Omniverse Licensing Terms.
Follow the prompt instructions:
- ? Select with arrow keys what you want to create: Application
- ? Select with arrow keys your desired template: USD Composer
- ? Enter name of application .kit file [name-spaced, lowercase, alphanumeric]: [set application name]
- ? Enter application_display_name: [set application display name]
- ? Enter version: [set app version]
The application template you have selected requires a setup extension. Setup Extension -> omni_usd_composer_setup
- ? Enter name of extension [name-spaced, lowercase, alphanumeric]: [set extension name]
- ? Enter extension_display_name: [set extension display name]
- ? Enter version: [set extension version]
Note that the build step will build all applications contained in the source
directory. Outside of initial experimentation, it is recommended that you build only the application you are actively developing.
Linux:
./repo.sh build
Windows:
.\repo.bat build
If you experience issues related to build, please see the Usage and Troubleshooting section for additional information.
Linux:
./repo.sh launch
Windows:
.\repo.bat launch
? Select with arrow keys which App would you like to launch: [Select the desired composer application]
NOTE: The initial startup may take a 5 to 8 minutes as shaders compile for the first time. After initial shader compilation, startup time will reduce dramatically.
Select Window > Browsers > Configurator Samples - to open configuration sample browser
Applications and their associated extensions can be tested using the repo test
tooling provided. Each application template includes an initial test suite that can be run to verify the application's functionality.
Note: Testing will only be run on applications and extensions within the build directory. A successful build is required before testing.
Linux:
./repo.sh test
Windows:
.\repo.bat test
-
On launch of the Application enable the developer bundle by adding the
--dev-bundle
or-d
flag to the launch command.Linux:
./repo.sh launch --dev-bundle
Windows:
.\repo.bat launch --dev-bundle
-
From the running application select
Developer
>Extensions
-
Browse and enable extensions of interest from the Extension Manager.
-
Enabling the extensions within the Extension Manager UI will allow you to try out the features of the extension in the currently running application.
-
To permanently add the extension to the application, you will need to add the extension to the
.kit
file. For example, adding the Layer View extension would require addingomni.kit.widget.layers
to the dependencies section of the.kit
file.
-
-
For additional information on the Developer Bundle Extensions, refer to the Developer Bundle Extensions documentation.
Linux:
./repo.sh template new
Windows:
.\repo.bat template new
Follow the prompt instructions:
- ? Select with arrow keys what you want to create: Extension
- ? Select with arrow keys your desired template:: [choose extension template]
- ? Enter name of extension [name-spaced, lowercase, alphanumeric]:: [set extension name]
- ? Enter extension_display_name:: [set extension display name]
- ? Enter version:: [set extension version]
Importantly For an extension to become a persistent part of an application, the extension will need to be added to the .kit
file.
[dependencies]
"extension.name" = {}
After a new extension has been added to the .kit
file, the application should be rebuilt to ensure extensions are populated to the build directory.
For deploying your application, create a deployable package using the package
command:
Linux:
./repo.sh package
Windows:
.\repo.bat package
By default, the package
command will name the package based on the name
value contained in the repo.toml
file at the root of the repository. By default, this value is set to kit-app-template
. Modify this value to set a persistent package name for your application.
Alternatively, you can specify a package name using the --name
flag:
Linux:
./repo.sh package --name [package_name]
Windows:
.\repo.bat package --name [package_name]
This will bundle your application into a distributable format, ready for deployment on compatible platforms.
source/
directory the package version will need to be set independently of a given kit
file. The version is set within the tools/VERSION.md
file.
The UI-based template applications in this repository produce more than a single .kit
file. For the USD Composer template application, this includes {your-app-name}_streaming.kit
which we will use for local streaming. This file inherits from the base application and adds necessary streaming components like omni.kit.livestream.webrtc
. To try local streaming, you need a web client to connect to the streaming server.
The web viewer sample can be found here
git clone https://github.com/NVIDIA-Omniverse/web-viewer-sample.git
Follow the instructions in the README to install the necessary dependencies.
The Web Viewer Sample is configured by default to connect to the USD Viewer application template and includes web UI elements for sending API calls to a running Kit application. This is necessary for the Viewer template, which has limited functionality for driving application behavior directly. However, for the USD Composer template, this messaging UI functionality isn't needed as the USD Composer template includes menus and other UI elements that can be interacted with directly.
When connecting the Web Viewer Sample to the USD Composer application template, it is recommended to modify the source code. Make the following change to the web viewer sample:
In web-viewer-sample/src/App.tsx
- Change:
import Window from './Window';
- To:
import Window from './WindowNoUI';
--no-window
passes an argument directly to Kit allowing it to run without the main application window to prevent conflicts with the streaming client.
Linux:
./repo.sh launch -- --no-window
Windows:
.\repo.bat launch -- --no-window
Select the {your-app-name}_streaming.kit
and wait for the application to start
npm run dev
In a Chromium-based browser, navigate to http://localhost:5173/ and you should see the streaming client connect to the running Kit application.