Navigation
API > API/Runtime > API/Runtime/Engine
Used to capture a 'snapshot' of the scene from a single plane and feed it to a render target.
| Name | USceneCaptureComponent2D |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/SceneCaptureComponent2D.h |
| Include Path | #include "Components/SceneCaptureComponent2D.h" |
Syntax
UCLASS (HideCategories=(Collision, Object, Physics, SceneComponent), ClassGroup=Rendering,
EditInlineNew, Meta=(BlueprintSpawnableComponent), MinimalAPI)
class USceneCaptureComponent2D : public USceneCaptureComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → USceneCaptureComponent → USceneCaptureComponent2D
Implements Interfaces
Derived Classes
USceneCaptureComponent2D derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USceneCaptureComponent2D
(
const FObjectInitializer& ObjectInitializer |
Components/SceneCaptureComponent2D.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AutoPlaneShift | float | Manually adjusts the planes of this camera, maintaining the distance between them. | Components/SceneCaptureComponent2D.h |
|
| bAutoCalculateOrthoPlanes | bool | Automatically determine a min/max Near/Far clip plane position depending on OrthoWidth value | Components/SceneCaptureComponent2D.h |
|
| bCameraCutThisFrame | uint32 | True if we did a camera cut this frame. | Components/SceneCaptureComponent2D.h |
|
| bConsiderUnrenderedOpaquePixelAsFullyTranslucent | uint32 | Whether to only render exponential height fog on opaque pixels which were rendered by the scene capture. | Components/SceneCaptureComponent2D.h |
|
| bEnableClipPlane | bool | Enables a clip plane while rendering the scene capture which is useful for portals. | Components/SceneCaptureComponent2D.h |
|
| bEnableFirstPersonFieldOfView | uint32 | True if the first person field of view should be used for primitives tagged as FirstPerson. | Components/SceneCaptureComponent2D.h |
|
| bEnableFirstPersonScale | uint32 | True if the first person scale should be used for primitives tagged as FirstPerson. | Components/SceneCaptureComponent2D.h |
|
| bEnableOrthographicTiling | bool | Render the scene in n frames (i.e TileCount) - Ignored in Perspective mode, works only in Orthographic mode when CaptureSource uses SceneColor (not FinalColor) If CaptureSource uses FinalColor, tiling will be ignored and a Warning message will be logged | Components/SceneCaptureComponent2D.h |
|
| bIgnoreScreenPercentage | uint32 | When rendering with main view resolution, ignore screen percentage scale and render at full resolution. | Components/SceneCaptureComponent2D.h |
|
| bInheritMainViewCameraPostProcessSettings | uint32 | Inherit the main view camera post-process settings and ignore local default values. | Components/SceneCaptureComponent2D.h |
|
| bMainViewCamera | uint32 | Render with main view camera. | Components/SceneCaptureComponent2D.h |
|
| bMainViewFamily | uint32 | Render with main view family, for example with the main editor or game viewport which mark their view families as "main". | Components/SceneCaptureComponent2D.h |
|
| bMainViewResolution | uint32 | Render with main view resolution, ignoring the dimensions in the resource. | Components/SceneCaptureComponent2D.h |
|
| bOverride_CustomNearClippingPlane | uint32 | Components/SceneCaptureComponent2D.h |
|
|
| bRenderInMainRenderer | bool | Render scene capture as additional render passes of the main renderer rather than as an independent renderer. | Components/SceneCaptureComponent2D.h |
|
| bUpdateOrthoPlanes | bool | Adjusts the near/far planes and the view origin of the current camera automatically to avoid clipping and light artefacting | Components/SceneCaptureComponent2D.h |
|
| bUseCameraHeightAsViewTarget | bool | If UpdateOrthoPlanes is enabled, this setting will use the cameras current height to compensate the distance to the general view (as a pseudo distance to view target when one isn't present) | Components/SceneCaptureComponent2D.h |
|
| bUseCustomProjectionMatrix | bool | Whether a custom projection matrix will be used during rendering. | Components/SceneCaptureComponent2D.h |
|
| bUseFauxOrthoViewPos | bool | Components/SceneCaptureComponent2D.h |
|
|
| ClipPlaneBase | FVector | Base position for the clip plane, can be any position on the plane. | Components/SceneCaptureComponent2D.h |
|
| ClipPlaneNormal | FVector | Normal for the plane. | Components/SceneCaptureComponent2D.h |
|
| CompositeMode | TEnumAsByte< enum ESceneCaptureCompositeMode > | When enabled, the scene capture will composite into the render target instead of overwriting its contents. | Components/SceneCaptureComponent2D.h |
|
| CustomNearClippingPlane | float | Set bOverride_CustomNearClippingPlane to true if you want to use a custom clipping plane instead of GNearClippingPlane. | Components/SceneCaptureComponent2D.h |
|
| CustomProjectionMatrix | FMatrix | The custom projection matrix to use | Components/SceneCaptureComponent2D.h |
|
| DrawFrustum | TObjectPtr< class UDrawFrustumComponent > | The frustum component used to show visually where the camera field of view is | Components/SceneCaptureComponent2D.h | |
| FirstPersonFieldOfView | float | The horizontal field of view (in degrees) used for primitives tagged as FirstPerson. | Components/SceneCaptureComponent2D.h |
|
| FirstPersonScale | float | The scale to apply to primitives tagged as FirstPerson. | Components/SceneCaptureComponent2D.h |
|
| FOVAngle | float | Camera field of view (in degrees). | Components/SceneCaptureComponent2D.h |
|
| MainViewFamily | const FSceneViewFamily * | Transient pointer set during calls to UpdateSceneCaptureContents from UpdateDeferredCaptures | Components/SceneCaptureComponent2D.h | |
| MainViewResolutionDivisor | FIntPoint | Divisor when rendering at Main View Resolution. | Components/SceneCaptureComponent2D.h |
|
| NumXTiles | int32 | Number of X tiles to render. Ignored in Perspective mode, works only in Orthographic mode | Components/SceneCaptureComponent2D.h |
|
| NumYTiles | int32 | Number of Y tiles to render. Ignored in Perspective mode, works only in Orthographic mode | Components/SceneCaptureComponent2D.h |
|
| OrthoWidth | float | The desired width (in world units) of the orthographic view (ignored in Perspective mode) | Components/SceneCaptureComponent2D.h |
|
| Overscan | float | Amount to increase the view frustum by, from 0.0 for no increase to 1.0 for 100% increase | Components/SceneCaptureComponent2D.h |
|
| PostProcessBlendWeight | float | Range (0.0, 1.0) where 0 indicates no effect, 1 indicates full effect. | Components/SceneCaptureComponent2D.h |
|
| PostProcessSettings | FPostProcessSettings | Components/SceneCaptureComponent2D.h |
|
|
| ProjectionType | TEnumAsByte< ECameraProjectionMode::Type > | Components/SceneCaptureComponent2D.h |
|
|
| SceneViewExtensions | TArray< TWeakPtr< ISceneViewExtension, ESPMode::ThreadSafe > > | Array of scene view extensions specifically to apply to this scene capture | Components/SceneCaptureComponent2D.h | |
| TextureTarget | TObjectPtr< class UTextureRenderTarget2D > | Output render target of the scene capture that can be read in materials. | Components/SceneCaptureComponent2D.h |
|
| TileID | int32 | Which tile to render of the orthographic view (ignored in Perspective mode) | Components/SceneCaptureComponent2D.h | |
| UnlitViewmode | ESceneCaptureUnlitViewmode | Option to enable a debug feature which outputs base color to the emissive channel when lighting is disabled via ShowFlag or via Render In Main Renderer, which renders the capture as a Custom Render Pass. | Components/SceneCaptureComponent2D.h |
|
| UserSceneTextureBaseColor | FName | Expose BaseColor as a UserSceneTexture. | Components/SceneCaptureComponent2D.h |
|
| UserSceneTextureNormal | FName | Expose Normal as a UserSceneTexture. | Components/SceneCaptureComponent2D.h |
|
| UserSceneTextureSceneColor | FName | Expose SceneColor (emissive/unlit) as a UserSceneTexture. | Components/SceneCaptureComponent2D.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddOrUpdateBlendable
(
TScriptInterface< IBlendableInterface > InBlendableObject, |
Adds an Blendable (implements IBlendableInterface) to the array of Blendables (if it doesn't exist) and update the weight | Components/SceneCaptureComponent2D.h |
|
void CaptureScene () |
Render the scene to the texture target immediately. | Components/SceneCaptureComponent2D.h |
|
void CaptureSceneDeferred () |
Render the scene to the texture the next time the main view is rendered. | Components/SceneCaptureComponent2D.h | |
virtual void GetCameraView
(
float DeltaTime, |
Components/SceneCaptureComponent2D.h | ||
bool GetEnableOrthographicTiling() |
Return if orthographic tiling rendering is enabled or not | Components/SceneCaptureComponent2D.h | |
int32 GetNumXTiles() |
Return number of X tiles to render (to be used when orthographic tiling rendering is enabled) | Components/SceneCaptureComponent2D.h | |
int32 GetNumYTiles() |
Return number of Y tiles to render (to be used when orthographic tiling rendering is enabled) | Components/SceneCaptureComponent2D.h | |
void RemoveBlendable
(
TScriptInterface< IBlendableInterface > InBlendableObject |
Removes a blendable. | Components/SceneCaptureComponent2D.h |
|
void ResetOrthographicTilingCounter() |
Reset Orthographic tiling counter | Components/SceneCaptureComponent2D.h | |
void SetCameraView
(
const FMinimalViewInfo& DesiredView |
Components/SceneCaptureComponent2D.h | ||
bool ShouldIgnoreScreenPercentage() |
Components/SceneCaptureComponent2D.h | ||
bool ShouldRenderInMainRenderer() |
Components/SceneCaptureComponent2D.h | ||
bool ShouldRenderWithMainViewCamera() |
Components/SceneCaptureComponent2D.h | ||
bool ShouldRenderWithMainViewFamily() |
Components/SceneCaptureComponent2D.h | ||
bool ShouldRenderWithMainViewResolution() |
Components/SceneCaptureComponent2D.h | ||
void UpdateContent() |
For backwards compatibility. | Components/SceneCaptureComponent2D.h | |
void UpdateDrawFrustum() |
Components/SceneCaptureComponent2D.h |
Overridden from USceneCaptureComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Is2D() |
Whether this component is a USceneCaptureComponent2D | Components/SceneCaptureComponent2D.h | |
virtual void UpdateSceneCaptureContents
(
FSceneInterface* Scene, |
Components/SceneCaptureComponent2D.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnComponentDestroyed
(
bool bDestroyingHierarchy |
Called when a component is destroyed | Components/SceneCaptureComponent2D.h | |
virtual void OnRegister() |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | Components/SceneCaptureComponent2D.h | |
virtual bool RequiresGameThreadEndOfFrameUpdates() |
Return true if this component requires end of frame updates to happen from the game thread. | Components/SceneCaptureComponent2D.h | |
virtual void SendRenderTransform_Concurrent () |
Called to send a transform update for this component to the rendering thread | Components/SceneCaptureComponent2D.h | |
virtual void TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. | Components/SceneCaptureComponent2D.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanEditChange
(
const FProperty* InProperty |
Components/SceneCaptureComponent2D.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Components/SceneCaptureComponent2D.h | ||
virtual void Serialize
(
FArchive& Ar |
Components/SceneCaptureComponent2D.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Components/SceneCaptureComponent2D.h |