BatchRenderer#
A high-throughput renderer that renders many parallel environments together on the GPU, for large-scale data collection and reinforcement-learning observation generation. Enable it with gs.Scene(renderer=gs.renderers.BatchRenderer(use_rasterizer=True)); set use_rasterizer=False to path-trace instead. It requires the gs-madrona package.
With n_envs > 1, camera outputs gain a leading batch dimension, for example rgb with shape (n_envs, height, width, 3). It takes its lights at runtime through scene.add_light(...) rather than from VisOptions. For installation, lighting, and a runnable example, see Rendering.
Options#
Implementation#
- class genesis.vis.batch_renderer.BatchRenderer(visualizer, renderer_options, vis_options)[source]#
Bases:
RBCThis class is used to manage batch rendering
- render(rgb=True, depth=False, segmentation=False, normal=False, antialiasing=False, force_render=False)[source]#
Render all cameras in the batch.
- Parameters:
rgb (bool, optional) – Whether to render the rgb image.
depth (bool, optional) – Whether to render the depth image.
segmentation (bool, optional) – Whether to render the segmentation image.
normal (bool, optional) – Whether to render the normal image.
antialiasing (bool, optional) – Whether to apply anti-aliasing.
force_render (bool, optional) – Whether to force render the scene.
- Returns:
rgb_arr (tuple of arrays) – The sequence of rgb images associated with each camera.
depth_arr (tuple of arrays) – The sequence of depth images associated with each camera.
segmentation_arr (tuple of arrays) – The sequence of segmentation images associated with each camera.
normal_arr (tuple of arrays) – The sequence of normal images associated with each camera.
- property lights#
- property cameras#
- property seg_idxc_map#
See also#
Rasterizer: the standard single-scene rasterizer.
Examples: rendering observations for RL.