Camera#
A Camera sets the pose, projection, resolution, sampling period,
and outputs to capture. The renderer produces the images, so one camera
configuration can work across supported physics and rendering backends.
Isaac Lab batches camera views from cloned environments into tiled render passes. Each requested output is returned as one GPU buffer with a separate image per view.
For a retina-like image that is dense where a movable gaze points, see the experimental foveated camera.
For silent black or corrupted RTX camera images when scaling the workload, see Large RTX camera workloads can return black or corrupted images.
Rendering model#
renderer_cfg selects the renderer. A plain
RendererCfg requests the runtime default. Use a concrete configuration
when the renderer must be fixed:
Renderer configuration |
Requires Isaac Sim |
Characteristics |
|---|---|---|
Yes |
Replicator and RTX rendering through Isaac Sim |
|
No |
Kit-less RTX rendering through |
|
No |
Kit-less Warp rasterization through Newton |
For an environment that exposes renderer presets, select the renderer at launch instead of editing
the scene configuration. Pass physics= and renderer= together, since the renderer must match
your setup path. The command below is for the kit-less Newton path; for Isaac Sim, use
physics=isaacsim_physx renderer=isaacsim_rtx with --extra isaacsim. See
Select and configure a Renderer for each pairing:
uv run isaaclab train --rl_library rsl_rl \
--task Isaac-Cartpole-Camera-Direct \
physics=newton_mjwarp renderer=newton_warp presets=rgb
uv run isaaclab train --rl_library rsl_rl ^
--task Isaac-Cartpole-Camera-Direct ^
physics=newton_mjwarp renderer=newton_warp presets=rgb
Images are not written to disk by default. Set env.write_image_to_file=true to write
cartpole_<data_type>.png in the current working directory.
See Backends and Presets for preset discovery and Renderer outputs at a glance for a same-scene comparison of the renderer outputs.
With OVRTX, separate camera sensors share the scene and renderer when their renderer
configurations match. Each sensor owns its own render products. A render product renders the
images of a group of environments into one tiled image. For example, env_0/head_camera and
env_1/head_camera render into one product, while env_0/wrist_camera and
env_1/wrist_camera render into another.
The sensors can use different resolutions and output types, and their poses update independently. Define all camera prims before initializing the simulation so they are included in the scene exported to OVRTX.
Configure a camera#
A camera can spawn a pinhole or fisheye camera prim, or bind to a camera already on the stage.
offset uses the convention declared on OffsetCfg:
world: forward+X, up+Z.ros: forward+Z, up-Y.opengl: forward-Z, up+Y.
import isaaclab.sim as sim_utils
from isaaclab.sensors import CameraCfg
from isaaclab_newton.renderers import NewtonWarpRendererCfg
front_camera = CameraCfg(
prim_path="{ENV_REGEX_NS}/Robot/base/front_camera",
update_period=0.05,
height=240,
width=320,
data_types=["rgb", "depth", "normals"],
spawn=sim_utils.PinholeCameraCfg(
focal_length=24.0,
horizontal_aperture=20.955,
clipping_range=(0.1, 20.0),
),
offset=CameraCfg.OffsetCfg(
pos=(0.45, 0.0, 0.1),
rot=(0.0, 0.0, 0.0, 1.0),
convention="world",
),
renderer_cfg=NewtonWarpRendererCfg(),
)
A renderer instance is reused only when cameras use equal renderer configurations of the same concrete configuration type. Different renderer settings create distinct instances. Camera configurations, including output types and backgrounds, remain per sensor.
Read camera data#
camera.get_world_poses(convention="opengl") reads the current world poses without capturing images
or changing cached measurement poses. This includes motion of the camera’s parent body even when
update_latest_camera_pose=False. It accepts the same orientation conventions as
set_world_poses and returns device tensors for positions and quaternions.
output maps each requested name to a
ProxyArray. For N camera views, height H, width W, and
C channels, each output has shape (N, H, W, C). Use torch for a cached zero-copy Torch
view or warp for the underlying Warp array:
camera_data = scene["front_camera"].data
rgb = camera_data.output["rgb"].torch
depth = camera_data.output["depth"].torch
intrinsics = camera_data.intrinsic_matrices.torch
Camera pose and intrinsic buffers are also ProxyArray objects. pos_w has shape (N, 3),
intrinsic_matrices has shape (N, 3, 3), and camera quaternions have shape (N, 4) in
(x, y, z, w) order. Set update_latest_camera_pose=True only when current pose data is needed;
updating it adds frame-query overhead.
Output types#
The active renderer validates data_types and allocates the channel count and data type declared
by its RenderBufferSpec.
Name |
Channels and type |
Meaning |
|---|---|---|
|
3 / 4, |
Low-dynamic-range color |
|
3, |
Scene-linear high-dynamic-range color |
|
4, |
Material base color |
|
1, |
Distance [m] along the camera optical axis |
|
1, |
Euclidean distance [m] from the optical center |
|
3, |
Local surface normal |
|
2, |
Image-space motion; positive |
|
4 |
Semantic color or ID per pixel |
|
4 |
Semantically labeled instance color or ID per pixel |
|
4 |
USD-prim instance color or ID per pixel |
depth is an alias of distance_to_image_plane. Colorized segmentation uses RGBA uint8;
non-colorized segmentation uses one int32 ID channel. Label and prim-path mappings are stored in
camera_data.info[output_name].
Isaac RTX RGB output. The animation shows the six material spheres falling onto the table.#
Isaac RTX depth output. Display colors encode optical-axis distance; the sensor returns metric values [m].#
Renderer support#
Supported outputs vary by renderer. See the table below and the visual comparison for examples.
Output |
Isaac RTX |
OVRTX |
Newton Warp and OptiX |
|---|---|---|---|
|
Yes |
Yes |
Yes |
|
Yes |
Yes |
Yes |
|
Yes |
Yes |
Yes |
|
Isaac Sim 6.0+ |
Yes |
Yes |
|
Yes |
Yes |
No |
semantic and instance segmentation |
Yes |
Yes |
Yes |
|
Yes |
No |
No |
|
Isaac Sim 6.0+ |
Yes |
No |
Querying an unsupported output fails during camera initialization. Renderer configuration controls semantic filters, segmentation colorization, and depth clipping where those options are backend-specific.
Isaac RTX normals output. Red, green, and blue encode the surface normal X, Y, and Z components.#
Isaac RTX semantic segmentation. One color represents each class: the six spheres share one class, while the table and backdrop use separate classes.#
Isaac RTX instance segmentation. Each sphere receives its own color, distinguishing objects that share the same semantic class.#
Background color#
When background_color is None, each renderer uses its default
background. Set a normalized RGB tuple to use a solid color for pixels that miss all geometry:
from isaaclab.utils import replace
mask_camera = replace(front_camera, background_color=(0.0, 0.0, 0.0))
The setting is per camera. Cameras with renderer-default and solid backgrounds can coexist in one scene.
Camera tensor processors#
tensor_processors computes camera outputs from the renderer’s outputs. Each entry is a
TensorProcessorCfg whose func is a
TensorProcessor class with named inputs and outputs. The camera asks the
renderer for the inputs no earlier processor produces, constructs each processor at the first capture with
its configuration and the camera buffers, and runs the processors in list order on every capture.
Their outputs are added to output; a processor can also replace a render output it
reads. Camera resets call each processor’s reset with the reset environments, and camera teardown calls its
close.
import torch
import warp as wp
from isaaclab.utils.tensor_processors import TensorProcessor, TensorProcessorCfg
from isaaclab.utils.warp import ProxyArray
class ShadeDepth(TensorProcessor):
"""Shade a depth image into a gray rgb image: near is white, 10 m and farther is black."""
def __init__(self, cfg, data):
super().__init__(cfg)
depth = data["distance_to_image_plane"].torch # (N, H, W, 1)
self._rgb = ProxyArray(wp.zeros((*depth.shape[:3], 3), dtype=wp.uint8, device=str(depth.device)))
def __call__(self, data, env_mask=None):
depth = data["distance_to_image_plane"].torch
shade = (255 * (1 - depth / 10).clamp(0, 1)).to(torch.uint8)
self._rgb.torch.copy_(shade.expand(-1, -1, -1, 3))
return {"rgb": self._rgb}
front_camera.tensor_processors = [
TensorProcessorCfg(func=ShadeDepth, inputs=["distance_to_image_plane"], outputs=["rgb"]),
]
Here the renderer also renders distance_to_image_plane for the processor, and camera.data.output["rgb"]
holds the processor’s result instead of a rendered image. The render outputs that processors read, here distance_to_image_plane, are published as
well. data_types adds render outputs that no processor reads; an entry that a processor
produces, like rgb here, is not rendered. A processor returns exactly the names in its outputs; the camera
raises an error otherwise. Processor outputs appear in output and
info from the first capture on; before it, only the render outputs exist.
A processor class may define a prepare_camera(cfg, stage, camera_prim_paths, renderer_cfg) class method. Camera
construction calls it before the scene is cloned or exported; it returns the configuration to use, or None to
remove the processor.
With update_period > 0, environments that reset at different times become due on different steps, but each
capture renders every environment. The camera calls each processor with env_mask, a boolean mask of the
environments due for the capture, whose frame and timestamp advance. Stateful processors (frame stacking, temporal
filters, video generation) use it to advance only those rows.
With asynchronous rendering, images may be delayed or repeated, and processors receive env_mask=None.
Use synchronous rendering (async_rendering=False) for processors that advance frame history.
Post-render image signal processing#
tensor_processors optionally computes outputs from the renderer’s outputs.
The shipped processor is PPISP (Physically Plausible Image Signal Processing), which converts the
scene-linear rgb_hdr output through responsivity, exposure, vignetting, color correction, and a
camera response function into rgb and rgba. The camera requests rgb_hdr from the renderer.
PPISP is stateless and supports asynchronous rendering with both PpispProcessorCfg and deprecated isp_cfg.
PpispProcessorCfg accepts PpispCfg for explicit
coefficients or coefficients imported from a USD camera, or CameraISPMode to
discover ppisp:* attributes on a camera prim.
from isaaclab.sensors.camera import CameraISPMode, ExposureCfg
from isaaclab.utils import replace
from isaaclab_ppisp import PpispCfg, PpispProcessorCfg
neutral = ExposureCfg(mode="neutral")
explicit = PpispProcessorCfg(isp_cfg=PpispCfg(inputs={"exposureOffset": 1.5}))
explicit_isp = replace(front_camera, data_types=["rgb"], tensor_processors=[explicit], exposure=neutral)
discovered = PpispProcessorCfg(isp_cfg=CameraISPMode.AUTO_CAMERA)
discovered_isp = replace(front_camera, data_types=["rgb"], tensor_processors=[discovered], exposure=neutral)
AUTO_CAMERA checks the first matched camera prim. AUTO_ANY falls back to the first PPISP
camera anywhere on the stage. Discovery happens once during camera construction; if it finds no
PPISP attributes, the camera logs a warning and runs without PPISP. It then keeps the renderer’s
color output, and CameraCfg.exposure still applies. CameraCfg.isp_cfg is deprecated and
forwards its value to this processor; with Isaac RTX and OVRTX it also sets neutral exposure, and a
discovery mode that finds no PPISP attributes changes nothing.
A static configuration is shared by all cloned views in one camera batch; controller weights may predict per-view exposure and color parameters, while the remaining coefficients stay shared. ISP configuration and discovered USD attributes are fixed for the camera lifetime.
Important
PPISP applies its own exposure, so with Isaac RTX and OVRTX the camera needs
exposure=ExposureCfg(mode="neutral"); otherwise camera construction raises an error rather than
change the exposure. Neutral exposure disables RTX auto-exposure, authors unit exposure:* values,
and applies the OmniRtxCameraAutoExposureAPI_1 and OmniRtxCameraExposureAPI_1 schemas on every
matched camera prim, so RTX does not expose the image a second time. It applies to every color output
of the camera. Do not combine PPISP with separately authored RTX tonemapping settings. The Newton Warp
and OptiX renderers apply no exposure, so they do not need the setting.
Run the ppisp-camera example for a complete PPISP workflow. It supports
--renderer newton_warp (Newton Warp, the default) and --renderer isaac_rtx (Isaac RTX).
The example runs 0 warmup steps for Newton Warp and 32 for Isaac RTX before saving images; override
this with --warmup_steps.
uv run --extra isaacsim isaaclab example ppisp-camera \
--renderer newton_warp --max_steps 60
uv run --extra isaacsim isaaclab example ppisp-camera \
--input_scene /path/to/scene.usd --renderer isaac_rtx \
--camera_prim_path /usd/path/to/camera --max_steps 60
uv run --extra isaacsim isaaclab example ppisp-camera ^
--renderer newton_warp --max_steps 60
uv run --extra isaacsim isaaclab example ppisp-camera ^
--input_scene C:/path/to/scene.usd --renderer isaac_rtx ^
--camera_prim_path /usd/path/to/camera --max_steps 60
--input_scene accepts a local path or URL to a USD or USDZ scene containing the Gaussian PPISP
setup. If omitted, the example uses the Samples/Scene_ParticleField/valiant_auto.usdz
sample from ISAAC_NUCLEUS_DIR.
--camera_prim_path is an optional absolute USD prim path in the input scene; in both commands
above, replace /usd/path/to/camera with the path of a camera in your scene. The prim must exist,
have type Camera, and carry ppisp:* attributes. If omitted, the example selects the first
camera with PPISP attributes. For both renderers, the input scene must have a defaultPrim and
the camera must be a descendant of it (for example, a camera at /World/Cameras/front_cam requires
/World as the defaultPrim).
Images are saved to output/ppisp_camera in the current working directory; use --output_dir
to change it. --max_steps sets the number of steps after warmup (default: 120), and
--save_interval sets the image-saving interval in steps (default: 20).
For all options, run uv run --extra isaacsim isaaclab example ppisp-camera --help.
Performance and validation#
Image memory and rendering cost scale with the number of environments, resolution, channel count, and requested outputs. Start camera-based tasks with a small environment count, verify shapes and renderer support, and then scale while monitoring GPU memory. Avoid requesting buffers that the task does not consume.
Tiled rendering batches the cloned views into shared render passes, but it does not remove the memory
cost of the de-tiled outputs or downstream vision models. The camera follows the shared sensor
update_period contract; choose a period that matches the observation cadence instead of rendering
at every physics step by default.
A runnable camera example is available as camera:
uv run --extra isaacsim isaaclab example camera
For saving output to disk, see Saving rendered images and 3D re-projection. For renderer selection and customization, see Select and configure a Renderer.