bbi.camera¶
The camera module provides classes for camera control and post processing effects.
- class Camera(transform: Transform, fov: float, resolution: tuple[int, int], sensor_preset: CameraProfile)¶
Bases:
BasePerspectiveCamera,Animatable[CameraUpdateParam]A Camera that is used to view the 3D world.
- Parameters:
transform (Transform) – The transform of the camera.
fov (float) – The field of view in degrees.
resolution (tuple[int, int]) – The resolution of the capture output.
- property preset_id: str¶
- attach_to(parent: Node, rule: TransformAttachmentRule = TransformAttachmentRule.KEEP_WORLD) None¶
Attach the asset to another node inheriting its transform operations.
- Parameters:
parent (Node) – The parent node to attach the asset to.
rule (TransformAttachmentRule, optional) – How to handle transforms and welding when attaching, defaults to TransformAttachmentRule.KEEP_WORLD.
- attach_to_root() None¶
Attach the asset to its root node .
- set_thermal_mode(enabled: bool) None¶
Enables or disables thermal mode for the camera.
- Parameters:
enabled (bool) – Whether to enable or disable thermal mode.
- execute(frame_id: int, frame_max: int, delta_seconds: float) None¶
Updates the Camera state to the specified frame.
- Parameters:
frame_id (int) – The frame ID.
frame_max (int) – Max frame count in the current loop.
delta_seconds (float) – The target real-time in seconds between frames. This is used to calculate physical displacement for certain assets.
- class BaseCamera(transform: Transform, resolution: tuple[int, int], sensor_preset: CameraProfile)¶
Bases:
Node- property resolution: tuple[int, int]¶
The resolution of the capture output.
- property post_processing: SensorPostProcessing¶
The post processing settings for the camera.
- set_transform(transform: Transform) None¶
Set the transform of the instance. For efficiency, this method is preferred over setting individual transform components.
- Parameters:
transform (Transform) – The transform.
- set_resolution(resolution: tuple[int, int]) None¶
Sets the resolution of the capture output.
- Parameters:
resolution (tuple[int, int]) – The resolution of the capture output.
- set_preset(preset_id: str) None¶
Applies a preset to the camera.
- Parameters:
preset_id (str) – The ID of the preset to apply.
- apply_preset(preset_id: str) None¶
DEPRECATED: Use set_preset instead.
Apply a preset to the camera.
- Parameters:
preset_id (str) – The ID of the preset to apply.
- class BaseOrthographicCamera(transform: Transform, ortho_width_m: float, resolution: tuple[int, int], sensor_preset: CameraProfile)¶
Bases:
BaseCamera- property ortho_width: float¶
The width of the orthographic camera in meters.
- set_ortho_width(ortho_width: float) None¶
Set the width of the orthographic camera in meters.
- class BasePerspectiveCamera(transform: Transform, fov: float, resolution: tuple[int, int], sensor_preset: CameraProfile)¶
Bases:
BaseCamera- property fov: float¶
The field of view in degrees.
- set_fov(fov: float) None¶
Sets the field of view.
- Parameters:
fov (float) – The field of view in degrees.
- set_transform(transform: Transform) None¶
Set the transform of the instance. For efficiency, this method is preferred over setting individual transform components.
- Parameters:
transform (Transform) – The transform.
- set_image_stabilization(enabled: bool) None¶
Capture a still scene for each frame.
When the camera is attached to a moving object (for example, a boat with buoyancy damping), the motion is captured during render and may blur the final composited image. Enabling image stabilization holds the scene steady for the duration of each capture, producing a sharp render regardless of what the camera’s mount is doing.
Disable to preserve motion blur in your renders.
- Parameters:
enabled – If True, the scene is held steady during frame capture. Default False.
- class SatelliteCamera(fov: float, resolution: tuple[int, int], sensor_preset: CameraProfile, gsd: float = _DEFAULT_GSD)¶
Bases:
BasePerspectiveCamera,Animatable[SatelliteCameraUpdateParam]A camera that is set up with functions to support a satellite-based workflow.
- Parameters:
fov (float) – The field of view in degrees.
resolution (tuple[int, int]) – The resolution of the capture output.
gsd (float) – The Ground Sample Distance (GSD) of the camera in meters per pixel.
- VERTICAL = -89.9¶
- HARD_MIN_LOOK_ANGLE = 0¶
- MIN_LOOK_ANGLE = 0.09999999999999432¶
- MAX_LOOK_ANGLE = 90¶
- property gsd: float¶
The Ground Sample Distance (GSD) of the camera in meters per pixel.
- property ground_target: tuple[float, float]¶
The x and y position of the camera’s ground target.
- property look_angle: float¶
The look angle of the camera in degrees.
- property azimuth: float¶
The azimuth of the camera in degrees.
- set_resolution(resolution: tuple[int, int]) None¶
Sets the resolution of the capture output.
- Parameters:
resolution (tuple[int, int]) – The resolution of the capture output.
- set_gsd(value: float) None¶
Sets the Ground Sample Distance (GSD) of the camera in meters per pixel.
- Parameters:
value (float) – The GSD value.
- set_ground_target(xy: tuple[float, float]) None¶
Sets the x and y position of the camera’s ground target.
This is not necessarily the camera’s final x- and y-position. Instead, the camera will rotate about this ground target to point at it.
- Parameters:
xy (tuple[float, float]) – The x and y position.
- set_look_angle(value: float) None¶
Sets the look angle of the camera.
A look angle of zero is looking straight down, and a look angle of 90 is looking straight ahead.
- Parameters:
value (float) – The look angle in degrees.
- set_azimuth(value: float) None¶
Sets the azimuth that the camera is pointing at.
- Parameters:
value (float) – The azimuth in degrees.
- set_off_nadir_skew(x_skew: float, y_skew: float)¶
Set camera off-nadir skew in x and y directions.
- Parameters:
x_skew (float) – The off-nadir skew in the x direction normalized to individual Asset radius.
y_skew (float) – The off-nadir skew in the y direction normalized to individual Asset radius.
- execute(frame_id: int, frame_max: int, delta_seconds: float) None¶
Updates the SatelliteCamera state to the specified frame.
- Parameters:
frame_id (int) – The frame ID.
frame_max (int) – Max frame count in the current loop.
delta_seconds (float) – The target real-time in seconds between frames. This is used to calculate physical displacement for certain assets.