bbi.camera.screen_droplets

pydantic model ScreenDropletsUpdateParam

Bases: AnimationFrame

field blur: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=1)])] | None = None
field preset: ScreenDropletsPreset | None = None
field scale: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=3)])] | None = None
field scroll_offset_x: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=1)])] | None = None
field scroll_offset_y: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=1)])] | None = None
field speed: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=-1), Le(le=1)])] | None = None
class ScreenDroplets(joseph_service: JosephService, camera_id: str)

Bases: Node, Animatable[ScreenDropletsUpdateParam]

Class handling rain droplets on the lens of a single camera.

Keyframe these settings on the camera’s screen droplets node, for example scenario.set_keyframe(world.camera.screen_droplets, 10, blur=0.3).

property preset: ScreenDropletsPreset
property blur: float
property speed: float
property scroll_offset_x: float
property scroll_offset_y: float
property drips_intensity: float
property scale: float

Get current scale of the instance.

set_preset(preset: ScreenDropletsPreset) → None

Set the visibility of rain droplets on this camera’s lens.

Parameters:

preset (ScreenDropletsPreset) – The type of rain droplets effect on the camera lens.

set_blur(blur: float) → None

Set the blur intensity of droplets on this camera’s lens.

Parameters:

blur (float) – The intensity of the blur effect. A value of 0 means no blur, while a value of 1 means maximum blur.

set_speed(speed: float) → None

Set the speed of blurry droplets on this camera’s lens.

Parameters:

speed (float) – How quickly the droplets move across the screen. Must be between -1 and 1.

set_scroll_offset_x(offset_x: float) → None

Set the horizontal starting position of the rain droplets on this camera’s lens.

Parameters:

offset_x (float) – The horizontal scroll offset of the rain droplets on the screen.

set_scroll_offset_y(offset_y: float) → None

Set the vertical starting position of the rain droplets on this camera’s lens.

Parameters:

offset_y (float) – The vertical scroll offset of the rain droplets on the screen.

set_drips_intensity(intensity: float) → None

Set the drips intensity of the rain droplets on this camera’s lens.

Parameters:

intensity (float) – The drips intensity of the rain droplets on the screen.

set_scale(scale: float) → None

Set the scale of the rain droplets on this camera’s lens.

Parameters:

scale (float) – The scale of the rain droplets on the screen.

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

Updates the droplet 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.