Questions About Developing a Tool Using Kit

Hello,

I have a question about Kit and was also hoping I could get some advice from more seasoned developers.

I’m trying to set up my Kit development environment and I’m having an issue with intelligent suggestions/help with the omni APIs. Damien Fagnou gave a great talk at GTC where he mentioned/showcased the Pylance support but it doesn’t seem to work for me and I need help setting it up. [note the yellow underline/error in the following picture]

Do I point Pylance to the .pyi files mentioned in this post?

If so where can I find them? I’ve looked in [Omniverse path]\pkg\kit-100.1.0_exts and [Omniverse path]\pkg\kit-102.1.1\exts and I see what looks like many of the files for these libraries but no files with the .pyi extension.




My goal is to create something that fills the gap identified in this post:

Specifically being able to measure between a voxel within a Flow point cloud and a piece of a UsdGeomMesh in order to capture discrepancies between design and production. I figure this is a good starting point for learning how the Kit APIs work.

Any advice regarding relevant and helpful functions for such a use case in these libraries (omni or pxr) would be greatly appreciated as well! There are so many to read up on but I think I start with omni.usd or pxr.usd

In reading, I found omni.usd.selection as a way to access the user selected prim in Create and subsequently get coordinates of any UsdGeomXFormable prim, but there are two problems with this:

-I don’t think individual voxels in a flow point cloud can be selected this way (please correct me if I’m wrong here)
-A mesh selected this way would only give me access to the transform of the shape in 3d space.

I am looking for the position of a raycast collision originating at my current viewport toward the object my mouse cursor is hovering on (screen-space to world-space conversion) - and to have the coordinates relative to the world origin - It’s a very similar operation to how we select objects using the Kit viewport, so I’m sure the tools to make it happen are somewhere in the omni utilities.

Note: my point clouds’ origins aren’t always perfectly aligned with the origin of the USD file referencing them, that’s why I would compare this raycast collision to the world origin or the default prim origin - as long as it’s not relative to the currently selected object.

I appreciate any advice the community can give.

Thank you for reading!

-Matthew

[edited for clarity - 12-22-2021]

Hi Matthew! Thanks for the detailed post…it’s clear you have done your research! I will see if I can get some help for you…it may take a little longer due the holidays, but hang in there! :) In the meantime, did you see Damien’s latest announcement on Omniverse Code? Damien Fagnou on LinkedIn: Omniverse Code 2022.1

You are very welcome to jump on our Discord to chat with the community. We will also have regular livestreams with Damien focused on developers like yourself, so be sure to follow us on YouTube and/or Twitch!

Thank you for your interest in developing on the Omniverse platform!!

Cheers,
Edmar

P.S. We are constantly adding new tutorials and aggregate them all in the “learn” tab on the launcher (also see: https://developer.nvidia.com/nvidia-omniverse-tutorials).

he / him | LinkedIn | Discord ID: Prof E#2041
Omniverse: “A New Era of Collaboration and Simulation” (video)
Omniverse Create’s latest features show & tell: Twitch livestream.
As seen in VentureBeat | Physics Showcase

Omniverse Resources:
Open Beta | Documentation | Tech Requirements | Videos | Roadmap | Twitter | Discord | Twitch

PLEASE NOTE: If you are reporting a bug/issue, please provide OS, GPU, GPU Driver, the version of the app, and full log file (if applicable). For crashes, please zip and provide a link to your logs → C:\Users\ [YOUR NAME] \ .nvidia-omniverse\logs

Hi Edmar,

I had not seen that announcement! I was a huge fan of the Omni.ui documentation extension and had even mentioned to a colleague that I hoped to see more like it in the future - This is great!

The ‘viewport api’ documentation section in Omniverse Code appears to include much of what I was looking for, though I’m a bit confused on getting the queries to work. I’m going to experiment/investigate more in the coming week. I’ve joined the discord as well

Thank you for your response!

-Matthew