Constructor#

NyxPyRenderer.__init__(scene, scene_file_path, max_width, max_height, n_envs=1, open_window=False, camera_defs=None, render_mode=ERenderMode.FastPathTracer, debug_view=EDebugView.Meshlet)[source]#

Construct the renderer wrapper. Does not start the native renderer.

The native renderer is started inside build(); this constructor only captures parameters and inspects the Genesis solvers so the geometry-count properties can be queried before build.

Parameters:
  • scene (genesis.Scene) – The built Genesis scene. Its solvers (rigid / FEM / PBD / MPM) are queried for geometry counts and per-step state.

  • scene_file_path (str) – Path to the Nyx scene-description JSON produced by NyxSceneExporter. Loaded once during build().

  • max_width (int) – Maximum viewport size in pixels. Nyx pre-allocates framebuffers up to this size; cameras with smaller resolutions render into a sub-region. Set this to the largest res across all cameras that will be registered.

  • max_height (int) – Maximum viewport size in pixels. Nyx pre-allocates framebuffers up to this size; cameras with smaller resolutions render into a sub-region. Set this to the largest res across all cameras that will be registered.

  • n_envs (int, optional) – Number of Genesis parallel environments (i.e. scene._B). Stored for reference; the renderer itself processes one env at a time, with update_scene() selecting the env via its env_index argument.

  • open_window (bool, optional) – If True, open a native GUI window for live preview. Default False (offscreen).

  • camera_defs (list of dict or None, optional) – Per-camera definition dicts (built by NyxCameraSensor.build). When provided, the renderer uses the dict-driven path and skips Genesis Camera objects. Pass None when no Nyx sensors are registered to fall back to the Genesis visualizer’s cameras.

  • render_mode (gs_nyx.nyx_py_renderer.ERenderMode, optional) – Rendering algorithm. Defaults to FastPathTracer.

  • debug_view (gs_nyx.nyx_py_renderer.EDebugView, optional) – Debug visualization channel (e.g. meshlet IDs, normals). Only takes effect when render_mode is the debug mode.