bbi.environment.weather¶
- pydantic model WeatherUpdateParam¶
Bases:
AnimationFrame- field cloud_altitude: Annotated[float, Field(ge=0, le=10000)] | None = None¶
- field cloud_coverage: Annotated[float, Field(ge=0, le=10)] | None = None¶
- field cloud_drift: float | None = None¶
- field fog_distance: float | None = None¶
- field fog_intensity: Annotated[float, Field(ge=0, le=10)] | None = None¶
- field fog_max_opacity: Annotated[float, Field(ge=0, le=1)] | None = None¶
- field rain_intensity: Annotated[float, Field(ge=0, le=10)] | None = None¶
- field rain_screen_droplets: ScreenDropletsPreset | None = None¶
- field screen_droplets_blur: Annotated[float, Field(ge=0, le=1)] | None = None¶
- field screen_droplets_offset_x: Annotated[float, Field(ge=0, le=1)] | None = None¶
- field screen_droplets_offset_y: Annotated[float, Field(ge=0, le=1)] | None = None¶
- field screen_droplets_scale: Annotated[float, Field(gt=0, le=1)] | None = None¶
- field screen_droplets_speed: Annotated[float, Field(ge=-1, le=1)] | None = None¶
- field sun_azimuth: float | None = None¶
- field sun_elevation: float | None = None¶
- field sun_intensity: Annotated[float, Field(ge=0, le=10)] | None = None¶
- class Weather(env_preset: EnvironmentProfile)¶
Bases:
Node,Animatable[WeatherUpdateParam]Class for controlling the weather conditions.
The
Worldhas a default weather accessible viaworld.env.weather.- property sun_intensity: float¶
- property sun_elevation: float¶
- property sun_azimuth: float¶
- property cloud_coverage: float¶
- property cloud_drift: float¶
- property cloud_altitude: float¶
- property fog_intensity: float¶
- property fog_distance: float¶
- property fog_max_opacity: float¶
- property rain_intensity: float¶
- property screen_droplets_blur: float¶
- property screen_droplets_speed: float¶
- property screen_droplets_scroll_offset_x: float¶
- property screen_droplets_scroll_offset_y: float¶
- property screen_droplets_scale: float¶
- property screen_droplets_drips_intensity: float¶
- property rain_screen_droplets: ScreenDropletsPreset¶
- set_sun_intensity(intensity: float) None¶
Set the intensity of the sun.
The initial sun intensity value is 5.0.
- Parameters:
intensity (float) – The intensity of the sun from 0 to 10.
- set_sun_elevation(elevation: float) None¶
Set the elevation angle, the vertical angle between the sun and the horizon.
- Parameters:
elevation (float) – The elevation angle of the sun in degrees.
- set_sun_azimuth(azimuth: float) None¶
Set the azimuth angle, the horizontal angle between the sun and the north direction.
- The default camera has a yaw value of 0. Thus, when the sun azimuth is:
0, the sun is in front of the camera
90, the sun is to the right of the camera
180, the sun is behind the camera
270, the sun is to the left of the camera
- Parameters:
azimuth (float) – The azimuth angle of the sun in degrees.
- set_cloud_coverage(coverage: float) None¶
Set the cloud coverage of the weather.
- Parameters:
coverage (float) – Cloud coverage from 0.0 to 10.0.
- set_cloud_drift(drift: float) None¶
Set the cloud drift of the weather. Represents a time offset for the clouds. Good for getting a good formation
- Parameters:
drift (float) – The cloud drift.
- set_cloud_altitude(altitude: float) None¶
Set the altitude (in meters) of the clouds. :param altitude: The altitude of the clouds from 0 to 10,000 meters. :type altitude: float
- set_fog_intensity(intensity: float) None¶
Set the fog intensity.
- Parameters:
intensity (float) – Fog intensity from 0.0 to 10.0.
- set_fog_distance(distance: float) None¶
Set the distance from the camera where fog starts (the maximum visibile range without fog) in meters.
- Parameters:
distance (float) – The distance from camera where for starts, in meters.
- set_fog_sky_atmosphere_contribution_color_scale(color: Color) None¶
Set the color scale of the sky atmosphere contribution.
- Parameters:
color (Vector4) – The color scale of the sky atmosphere contribution.
- set_fog_max_opacity(opacity: float) None¶
Set the maximum opacity of the fog.
- Parameters:
opacity (float) – Fog max opacity from 0.0 to 1.0.
- set_rain_intensity(intensity: float) None¶
Set the intensity of the rain.
- Parameters:
intensity (float) – Rain intensity from 0.0 to 10.0.
- set_rain_screen_droplets_blur(blur: float) None¶
Set the blur intensity of droplets on the screen.
- Parameters:
blur (float) – The intensity of the blur effect. A value of 0 will default to streaking raindrops. Must be between 0 and 1.
- set_rain_screen_droplets_speed(speed: float) None¶
Set the speed of blurry droplets on the screen.
- Parameters:
speed (float) – How quickly the droplets move across the screen. Must be between -1 and 1.
- set_rain_screen_droplets(screen_droplets: ScreenDropletsPreset) None¶
Set the visibility of rain droplets on the camera lens.
- Parameters:
screen_droplets (ScreenDropletsPreset) – The type of rain droplets effect on the camera lens.
- set_rain_screen_droplets_scroll_offset(offset_x: float, offset_y: float) None¶
Set the starting position of the rain droplets on the screen.
- Parameters:
offset_x (float) – The horizontal scroll offset of the rain droplets on the screen.
offset_y (float) – The vertical scroll offset of the rain droplets on the screen.
- set_rain_screen_droplets_drips_intensity(intensity: float) None¶
Set the drips intensity of the rain droplets on the screen.
- Parameters:
intensity (float) – The drips intensity of the rain droplets on the screen.
- set_rain_screen_droplets_scale(scale: float) None¶
Set the scale of the rain droplets on the screen.
- Parameters:
scale (float) – The scale of the rain droplets on the screen.
- get_max_warmup_frames() int¶
Return the maximum number of warm-up frames for rendering, given the current weather settings.
- execute(frame_id: int, frame_max: int, delta_seconds: float) None¶
Updates the weather conditions 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.