unreal.LensDistortionModelHandlerBase

class unreal.LensDistortionModelHandlerBase(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

Asset user data that can be used on Camera Actors to manage lens distortion state and utilities

C++ Source:

  • Plugin: CameraCalibrationCore

  • Module: CameraCalibrationCore

  • File: LensDistortionModelHandlerBase.h

Editor Properties: (see get_editor_property/set_editor_property)

  • camera_filmback (CameraFilmbackSettings): [Read-Write] Filmback settings of the camera that is being used for distortion

  • current_state (LensDistortionState): [Read-Write] Current state as set by the most recent call to Update()

  • display_name (str): [Read-Only] Display name, used to identify handler in-editor details panels

  • distortion_post_process_mid (MaterialInstanceDynamic): [Read-Only] Dynamically created post-process material instance for the currently specified lens model

  • lens_model_class (type(Class)): [Read-Only] Lens Model describing how to interpret the distortion parameters

  • overscan_factor (float): [Read-Only] Computed overscan factor needed to scale the camera’s FOV (read-only)

property camera_filmback: CameraFilmbackSettings

[Read-Write] Filmback settings of the camera that is being used for distortion

Type:

(CameraFilmbackSettings)

property current_state: LensDistortionState

[Read-Only] Current state as set by the most recent call to Update()

Type:

(LensDistortionState)

property distortion_post_process_mid: MaterialInstanceDynamic

[Read-Only] Dynamically created post-process material instance for the currently specified lens model

Type:

(MaterialInstanceDynamic)

get_distortion_displacement_map() TextureRenderTarget2D

Get the UV displacement map used to distort an undistorted image

Return type:

TextureRenderTarget2D

get_undistortion_displacement_map() TextureRenderTarget2D

Get the UV displacement map used to undistort a distorted image

Return type:

TextureRenderTarget2D

is_model_supported(model_to_support) bool

Returns true if the input model is supported by this model handler, false otherwise.

Parameters:

model_to_support (type(Class)) –

Return type:

bool

property lens_model_class: Class

[Read-Only] Lens Model describing how to interpret the distortion parameters

Type:

(type(Class))

property overscan_factor: float

[Read-Only] Computed overscan factor needed to scale the camera’s FOV (read-only)

Type:

(float)

set_distortion_state(new_state) None

Update the lens distortion state, recompute the overscan factor, and set all material parameters

Parameters:

new_state (LensDistortionState) –