NyxPyRenderer#
- class gs_nyx_plugin.nyx_renderer.NyxPyRenderer[source]#
Bases:
objectPython-side wrapper around the native Nyx renderer.
Owns the CUDA tensors that bridge Genesis simulation state (rigid transforms, deformable vertex positions, camera poses) to the Nyx GPU renderer, and drives the per-frame upload + render. End users typically interact with the renderer indirectly via
NyxCameraSensor; this class is exposed for advanced use cases that need to drive the renderer manually.Coordinate convention#
Genesis is Z-up, Nyx is Y-up. Static scene data is converted on the CPU at export time by
NyxSceneExporter; per-frame transforms are uploaded as raw Genesis-space (Z-up, WXYZ) values and converted on the GPU.Lifecycle#
Construct with the scene, exported scene-description path, and max viewport size.
Call
build()once after the Genesis scene has been built, passing the entity-to-UUID mapping fromNyxSceneExporter. This starts the renderer, loads the scene, and allocates GPU buffers sized to the current geometry counts.Each frame:
update_scene()for each environment, thenrender()per camera.update()once per frame drives the window event loop and animation clock.destroy()releases the native renderer and GPU buffers.
Constructors
Construct the renderer wrapper.
Methods
Start the native renderer and allocate all GPU buffers.
Shut down the native renderer and release the interop buffers.
Cast a ray through one pixel and return the entity and hit point.
Render one camera and return the resulting RGB image as a CUDA tensor.
Release the loaded scene without shutting down the renderer.
Drive the native renderer's per-frame tick (window + animation clock).
Write one camera's pos + quaternion directly into the CUDA tensors.
Sync one Genesis environment's state to the Nyx GPU buffers.