Getting started with NVIDIA Omniverse KIT — creating your first extension
I’ve recently done first steps in creating Omniverse KIT extensions and following Richard Feynman, who said “If you want to master something, teach it”, I’d like to put together a few tutorials based on my own progress.
First thing to get started is to create a KIT extension using the built-in template.
Update 01/2022 — nvidia has released Kit CODE for development which provides a convenient developer experience out of the box — the basic steps outlined here still apply but I’d advise to use Kit CODE instead of KIT from Development Tools as described below — here is an introduction to Kit CODE:
install Omniverse workstation and the launcher from https://developer.nvidia.com/nvidia-omniverse-platform
Microsoft Visual Studio Code
get it from https://code.visualstudio.com/
Create extension from template
Start the “Kit” application found in “Development Tools “ in the Launcher, this launches an empty application frame ready for our extension. We could also use any other Kit based application like “Create” or “View” because all Kit applications are basically just a collection of extensions talking to each other — for this tutorial we’ll stick to the empty Kit frame.
Open the extensions window…
Select “New Extension Template Project” by clicking on the “+” button…
After selecting a directory where to store the extension we enter a name and a namespace for our extension, we’ll use “omni.tutorials.first”…
After pressing “Ok” our extension will be created and Visual Studio Code will start up and load the extension. Moreover Kit will automatically load and display the new extension which contains a label and a button to click on.
A cool feature about Kit it is the hot reloading ability — that means that the extension will reload as soon as we’ve done and saved changes in the source code.
Lets change the button text and the window title, then save the source file — the extension will reload and display the changes.
Displaying the console output
In order to see the output which is produced by the button click we need to display the console window, which is also an extension.
Therefore we open the extensions window, search for “console” and activate the omni.kit.window.console extension.
When the console window is shown we have to click on the info level button to show our “clicked” message.
Where’s Kit looking for extensions ?
The source directory is automatically added to the search paths of kit which can be examined by clicking on the gears button in the extension window.
The folder containing the source will be opened in the windows explorer when clicking on the “open” button.
We’ll add some functionality to the extension which reacts on selection changes and is able to read custom attributes of scene objects…
Kit Programming Manual:
KIT API Developer Documentation: https://docs.omniverse.nvidia.com/index.html
Introduction to Omniverse KIT by NVIDIAs Damien Fagnou: