bbi.camera.post_processing

pydantic model SensorPostProcessingUpdateParam

Bases: AnimationFrame

field bloom_intensity: Annotated[float, Field(ge=0.0, le=8.0)] | None = None
field contrast: Annotated[float, Field(ge=0.0, le=2.0)] | None = None
field exposure: Annotated[float, Field(ge=-3.0, le=3.0)] | None = None
field focal_distance: Annotated[float, Field(ge=0.0, le=100.0)] | None = None
field gamma: Annotated[float, Field(ge=0.0, le=2.0)] | None = None
field saturation: Annotated[float, Field(ge=0.0, le=2.0)] | None = None
field temperature: Annotated[float, Field(ge=1500.0, le=15000.0)] | None = None
field tint_hue: Annotated[float, Field(ge=0.0, le=1.0)] | None = None
field tint_saturation: Annotated[float, Field(ge=0.0, le=1.0)] | None = None
field vignette_intensity: Annotated[float, Field(ge=0.0, le=1.0)] | None = None
class SensorPostProcessing(profile: CameraProfile)

Bases: PostProcessing, Animatable[SensorPostProcessingUpdateParam]

The post processing settings for the camera.

property exposure: float

The amount of exposure applied

property bloom_intensity: float

The intensity of the bloom applied

property temperature: float

The temperature in Kelvin

property saturation: float

Color saturation level

property contrast: float

Color contrast level

property gamma: float

Color gamma level

property focal_distance: float

The focal distance (in metres) of the camera

property tint_hue: float

Tint hue

property tint_saturation: float

Tint saturation

property vignette_intensity: float

Vignette intensity

property film_grain_amount: float

The current film grain amount applied to the post processing settings.

property film_grain_scale: float

The current film grain scale applied to the post processing settings.

property film_grunge_density: float

The current film grunge density applied to the post processing settings.

property blur_radius: float

The current blur radius applied to the post processing settings.

property light_leaks_enabled: bool

Whether light leaks are enabled in the post processing settings.

set_exposure(amount: float) None

Set the final exposure compensation.

0 means no adjustment. -1 means 2x darker. -2 means 4x darker. 1 means 2x brighter. 2 means 4x brighter.

Parameters:

amount (float) – The amount of exposure to apply. Range is -3.0 to 3.0.

set_bloom_intensity(intensity: float) None

Sets the bloom intensity.

Parameters:

intensity (float) – The intensity. Range is 0.0 to 8.0.

set_temperature(temperature: float) None

Sets the temperature in Kelvin.

Lower values make final scene warmer (orange), while higher values make them cooler (blue).

Parameters:

temperature (float) – The temperature. Range is 1500.0 to 15000.0.

set_saturation(saturation: float) None

Sets the color saturation level.

Saturation refers to the intensity of colors in an image. Higher saturation means more vibrant colors, while lower saturation means more muted colors.

Parameters:

saturation (float) – Saturation amount. Range is 0.0 to 2.0.

set_contrast(contrast: float) None

Sets the contrast level.

Contrast refers to the difference in brightness or color between elements in an image. Higher contrast increases the distinction between light and dark areas, while lower contrast results in a flatter appearance.

Parameters:

contrast (float) – Contrast amount. Range is 0.0 to 2.0.

set_gamma(gamma: float) None

Sets the gamma level.

Gamma correction controls the overall brightness of an image by adjusting how the middle range of brightness values (midtones) are represented. This is a non-linear operation that particularly affects the mid-range tones while preserving blacks and whites. A higher gamma value makes midtones appear darker, while a lower value makes them brighter.

Parameters:

gamma (float) – Gamma amount. Range is 0.0 to 2.0.

set_focal_distance(distance: float) None

Sets the focal distance (in metres) for depth of field effects.

Focal distance determines the distance from the camera at which objects appear sharpest. Objects at this distance will be in perfect focus, while objects closer or farther away may appear blurred. 0 is a special case of infinite depth of field.

Parameters:

distance (float) – The distance. Range is 0.0 to 100.0.

set_tint_hue(hue: float) None

Sets the tint hue.

Parameters:

hue (float, int) – The hue. Range is 0.0 to 1.0.

set_tint_saturation(saturation: float) None

Sets the tint saturation.

Parameters:

saturation (float, int) – The saturation. Range is 0.0 to 1.0.

set_vignette_intensity(intensity: float) None

Sets the vignette intensity.

Parameters:

intensity (float) – The intensity. Range is 0.0 to 1.0.

set_blur(radius: float) None

Sets the blur.

Parameters:

radius (float) – The normalized radius. Range is 0.0 to 1.0.

set_light_leaks(enabled: bool) None

Sets the light leaks.

Parameters:

enabled (bool) – Whether the light leaks are enabled.

set_film_grain_amount(amount: float) None

Sets the film grain.

Parameters:

amount (float) – The amount. Range is 0.0 to 1.0.

set_film_grain_scale(scale: float) None

Sets the film grain.

Parameters:

scale (float) – Size of the grain. Range is 0.0 to 1.0.

set_film_grunge(density: float) None

Sets the film grunge.

Parameters:
  • enabled (bool) – Whether the film grunge is enabled.

  • density (float) – The density. Range is 0.0 to 1.0.

reset() None

Resets the current post processing settings to the state at world start.

This would only reset the current state of the post processing settings. To clear any set keyframes, run scenario.clear_keyframes(world.camera.post_processing).

execute(frame_id: int, frame_max: int, delta_seconds: float) None

Updates the sensor post processing settings 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.