Navigation
API > API/Plugins > API/Plugins/CameraCalibrationCore
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- ULensDistortionModelHandlerBase
- UAnamorphicLensDistortionModelHandler
- USphericalLensDistortionModelHandler
References
| Module | CameraCalibrationCore |
| Header | /Engine/Plugins/VirtualProduction/CameraCalibrationCore/Source/CameraCalibrationCore/Public/LensDistortionModelHandlerBase.h |
| Include | #include "LensDistortionModelHandlerBase.h" |
Syntax
UCLASS&40;Abstract&41;
class ULensDistortionModelHandlerBase : public UObject
Remarks
Asset user data that can be used on Camera Actors to manage lens distortion state and utilities
Variables
| Type | Name | Description | |
|---|---|---|---|
| FCameraFilmbackSettings | CameraFilmback | Filmback settings of the camera that is being used for distortion | |
| FLensDistortionState | CurrentState | Current state as set by the most recent call to Update() | |
| FString | DisplayName | Display name, used to identify handler in-editor details panels | |
| TObjectPtr< UMaterialInstanceDynamic > | DistortionDisplacementMapMID | MID used to draw the distortion displacement map | |
| TObjectPtr< UTextureRenderTarget2D > | DistortionDisplacementMapRT | UV displacement map used to distort an undistorted image | |
| TObjectPtr< UMaterialInstanceDynamic > | DistortionPostProcessMID | Dynamically created post-process material instance for the currently specified lens model | |
| FGuid | DistortionProducerID | UObject that is producing the distortion state for this handler | |
| TSubclassOf< ULensModel > | LensModelClass | Lens Model describing how to interpret the distortion parameters | |
| float | OverscanFactor | Computed overscan factor needed to scale the camera's FOV (read-only) | |
| TObjectPtr< UMaterialInstanceDynamic > | UndistortionDisplacementMapMID | MID used to draw the undistortion displacement map | |
| TObjectPtr< UTextureRenderTarget2D > | UndistortionDisplacementMapRT | UV displacement map used to undistort a distorted image |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| float | Use the current distortion state to compute the overscan factor needed such that all distorted UVs will fall into the valid range of [0,1] | ||
| void | CreateDisplacementMaps
(
const FIntPoint DisplacementMapResolution |
Create two displacement maps, for distortion and undistortion, using the input resolution | |
| bool | DrawDistortionDisplacementMap
(
UTextureRenderTarget2D* DestinationTexture |
Draw the distortion displacement map associated with the current state to the DestinationTexture | |
| bool | DrawUndistortionDisplacementMap
(
UTextureRenderTarget2D* DestinationTexture |
Draw the undistortion displacement map associated with the current state to the DestinationTexture | |
| FLensDistortionState | Get the current distortion state (the lens model and properties that mathematically represent the distortion characteristics | ||
| FString | Get the display name of this lens distortion model handler | ||
| TArray< FVector2D > | GetDistortedUVs
(
TConstArrayView< FVector2D > UndistortedUVs |
Computes the distorted version of UndistortedUVs based on the current state | |
| UTextureRenderTarget2D * | Get the UV displacement map used to distort an undistorted image | ||
| UMaterialInstanceDynamic * | Get the post-process MID for the currently specified lens model | ||
| FGuid | Get the UObject that produces the distortion state for this handler | ||
| FVector2D | GetFxFy () |
Get the normalized focal length (unitless) | |
| const TSubclassOf< ULensModel > & | Get the specified lens model that characterizes the distortion effect | ||
| float | Returns the last overscan factor that was set | ||
| FVector2D | Get the normalized center of projection of the image, in the range [0.0f, 1.0f] | ||
| UTextureRenderTarget2D * | Get the UV displacement map used to undistort a distorted image | ||
| bool | IsModelSupported
(
const TSubclassOf< ULensModel >& ModelToSupport |
Returns true if the input model is supported by this model handler, false otherwise. | |
| void | Draws the current distortion state to the internal displacement map | ||
| void | SetCameraFilmback
(
const FCameraFilmbackSettings& InCameraFilmback |
Specify the filmback settings of the CineCamera that is being used for distortion | |
| void | SetDisplayName
(
FString InDisplayName |
Set the display name of this lens distortion model handler | |
| void | SetDistortionProducerID
(
const FGuid& InDistortionProducerID |
Set the UObject that produces the distortion state for this handler | |
| void | SetDistortionState
(
const FLensDistortionState& InNewState |
Update the lens distortion state, recompute the overscan factor, and set all material parameters | |
| void | SetOverscanFactor
(
float OverscanFactor |
Updates overscan factor and applies to material instances |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeChainProperty
(
FPropertyChangedChainEvent& PropertyChangedEvent |
This alternate version of PostEditChange is called when properties inside structs are modified. | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |