Camera ¶
A camera over every world: fixed pose, per-world poses, or attached to a body (pose in the body frame).
set_pose ¶
set_pose(pose=None, look_at=None) -> None
New pose (7,) or per-world (worlds, 7); or look_at=(eye, target). In the body frame when attached.
render ¶
render(source, state=None, output: str = 'uint8', exposure: float = 0.0, seed: int | None = None)
Render every world of source at state: an alloy.Sim (its current state), a newton.Model, a
SceneData, a scene pack folder or a camera_scene. Example: batch = cam.render(sim).
Returns a wp.array: uint8 (worlds, H, W, 3) for output="uint8", float32 linear for "linear", or a
:class:CameraOutput with rgb, linear, albedo and normal for "all". The arrays are the camera's own
buffers: the next render overwrites them, so copy what you keep. seed changes the noise of this render.
output="depth" (metres), "segmentation", "body_id" or "world_id" gives that image, (worlds,
H, W), from the pixel-centre ray with no colour traced; a tuple such as ("rgb", "depth") a
:class:CameraOutput with those too (alloy.camera.aov; fast camera only).
render_torch ¶
render_torch(source, state=None, output: str = 'uint8', **kw)
Same as :meth:render, as a torch tensor on the same device (needs PyTorch); a tuple output gives a
dict of tensors by channel name.