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 duringbuild().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
resacross 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
resacross 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, withupdate_scene()selecting the env via itsenv_indexargument.open_window (bool, optional) – If
True, open a native GUI window for live preview. DefaultFalse(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 GenesisCameraobjects. PassNonewhen 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_modeis the debug mode.