Omni PhysX Visual Debugger#
PhysX visual debugger extension - OmniPvd
Documentation#
Omniverse physics visual debugger (OmniPvd), an early preview version that allows for recording of transformations and attributes of Omniverse Physics objects and to transform them into USD.
OmniPvd consist of a shared library and a Kit extension. The shared library is used by both the PhysX SDK simulation engine for the recording or writing of OmniPvd binary files (.OVD) and by the omni.physx.pvd Kit extension to read the recorded OmniPvd (.OVD) files.
The OmniPvd Kit extension (omni.physx.pvd) allows firstly the transformation of PhysX recordings into USD or USDA format and to inspect them. It also allows secondly for the transforming of a single snapshot of such a PhysX recording into the Physics USD format. And thirdly allows for the baking or cooking of PhysX transforms onto Omniverse Physics objects in a separate Edit Layer.
To be able to record a physics scene, go into the Physics Debug window, under the PVD section and check “OmniPvd Enabled” output. This will allow for a binary serialization of your Omniverse physics scene into an OmniPvd file. It primes the underlying PhysX simulation engine for OVD output.
Once you have the OmniPvd file ready you can transform it into USD or USDA format by chosing the input (.OVD) file, the up axis and the output format (USDA/USD).
A feature that is deprecated and is currently not functional is the overlaying of an OmniPvd simulation recording onto a USD Stage, thereby baking the physics simulation as an animation track.
Below is a screenshot from an OmniPvd recording of the PhysX vehicle sample
pybind11 carb.physx.pvd bindings
- class omni.physxpvd.bindings._physxPvd.IPhysXPvd#
- build_handle_cache( ) None#
Build and cache the handle-to-path mapping by traversing the stage once. This is much faster than Python stage traversal. Call this once when stage opens, then use get_handle_prim_names_batch for lookups.
- clear_messages( ) None#
Reset the list of messages parsed from the OVD stream.
- get_handle_prim_names_batch(
- self: omni.physxpvd.bindings._physxPvd.IPhysXPvd,
- handles: list,
- time_code: float,
Batch resolve multiple handles to prim names in one call.
- Parameters:
handles – List of object handles to look up
time_code – The time code to check visibility at
- Returns:
Tuple of (names_list, is_actionable_list) - names_list: List of prim names (“NULL” for handle 0, “INVALID” if not found) - is_actionable_list: List of booleans indicating if each prim is actionable
- get_messages( ) list#
Retrieve the list of messages in the OVD stream.
- Returns:
A list of messages contained in the OVD stream in a dictionary format. The following keys can be used to reference the corresponding values: “message”: The message string itself. “file”: The name of the source file the message was generated in. “line”: The line number in the source file where the messages was generated. “type”: The message category type. “typeName”: The message category type name string if an optional class handle was sent with the message. “frameId”: The frame ID for the time when the message occurred.
If an error occurs, the list will be empty.
- invalidate_handle_cache( ) None#
Invalidate the handle cache. Call this when stage closes.
- load_ovd(
- self: omni.physxpvd.bindings._physxPvd.IPhysXPvd,
- arg0: str,
Loads the input OmniPVD binary file and parses out the messages received. Does not covert to a USD stage or save a cached file.
- Parameters:
omniPvdFile – the OmniPvd OVD binary full file path
- Returns:
true on success, false on failure
- ovd_to_usd(
- self: omni.physxpvd.bindings._physxPvd.IPhysXPvd,
- arg0: str,
- arg1: str,
- arg2: int,
- arg3: int,
Transforms an OmniPvd binary file into a USD Stage.
- Parameters:
omniPvdFile – the OmniPvd OVD binary full file path
usdStageDir – the output directory of the output USD Stage
upAxis – up axis of the USD stage, 0 = Y-axis, anything else Z-axis
isUSDA – non-zero = USDA format out, 0 = USD format out
- Returns:
true on success, false on failure
- ovd_to_usd_in_memory(
- self: omni.physxpvd.bindings._physxPvd.IPhysXPvd,
- omni_pvd_file: str,
- up_axis: int,
Transforms an OmniPvd binary file into a USD Stage in memory.
- Parameters:
omniPvdFile – the OmniPvd OVD binary full file path
upAxis – up axis of the USD stage, 0 = Y-axis, anything else Z-axis
- Returns:
Returns a long integer representing the USD stage ID on success, 0 on failure
- ovd_to_usd_over(
- self: omni.physxpvd.bindings._physxPvd.IPhysXPvd,
- arg0: str,
Extracts an over layer from an OmniPvd binary file and adds it to the current active Stage.
- Parameters:
omniPvdFile – the OmniPvd OVD binary full file path
- Returns:
true on success, false on failure
- ovd_to_usd_over_with_layer_creation(
- self: omni.physxpvd.bindings._physxPvd.IPhysXPvd,
- arg0: str,
- arg1: str,
- arg2: str,
- arg3: str,
- arg4: float,
- arg5: float,
- arg6: bool,
- arg7: bool,
Creates a new USD stage with an over layer from an OmniPvd binary file.
- Parameters:
omniPvdFile – the OmniPvd OVD binary full file path
outputDir – the output directory where files will be saved
stageFilename – the name of the output stage file (will be normalized to end with .usda)
startTime – the start time of the simulation range to include in the over layer
stopTime – the end time of the simulation range to include in the over layer
verifyOverLayer – whether to verify that the over layer contains the Prims also in the simulation.usda layer
- Returns:
true on success, false on failure
- update_ovd_visibility(
- self: omni.physxpvd.bindings._physxPvd.IPhysXPvd,
- time_code: float,
Update visibility of OVD prims for the given time code. This is a C++ implementation of the recursive visibility update for better performance. It traverses /Scenes and /Shared prims and sets visibility based on omni:pvdi:viz attribute.
- Parameters:
time_code – The time code to evaluate visibility at
- omni.physxpvd.bindings._physxPvd.acquire_physx_pvd_interface(
- plugin_name: str = None,
- library_path: str = None,
- omni.physxpvd.bindings._physxPvd.release_physx_pvd_interface( ) None#