USceneCaptureComponent2D

Used to capture a 'snapshot' of the scene from a single plane and feed it to a render target.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/SceneCaptureComponent2D.h

Include

#include "Components/SceneCaptureComponent2D.h"

Syntax

class USceneCaptureComponent2D : public USceneCaptureComponent

Remarks

Used to capture a 'snapshot' of the scene from a single plane and feed it to a render target.

Variables

Name Description

Public variable

uint32: 1

 

bCameraCutThisFrame

True if we did a camera cut this frame.

Public variable

uint32: 1

 

bConsiderUnrenderedOpaquePixelAsFullyTranslucent

Treat unrendered opaque pixels as fully translucent.

Public variable

bool

 

bDisableFlipCopyGLES

Scene captures render an extra flip pass for LDR color on GLES so that the final output is oriented correctly.

Public variable

bool

 

bEnableClipPlane

Enables a clip plane while rendering the scene capture which is useful for portals.

Public variable

bool

 

bEnableOrthographicTiling

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

Public variable

uint32: 1

 

bOverride_CustomNearClippingPlane

Public variable

bool

 

bUseCustomProjectionMatrix

Whether a custom projection matrix will be used during rendering.

Public variable

bool

 

bUseFauxOrthoViewPos

In case of orthographic camera, generate a fake view position that has a non-zero W component.

Public variable

FVector

 

ClipPlaneBase

Base position for the clip plane, can be any position on the plane.

Public variable

FVector

 

ClipPlaneNormal

Normal for the plane.

Public variable

TEnumAsByte< en...

 

CompositeMode

When enabled, the scene capture will composite into the render target instead of overwriting its contents.

Public variable

float

 

CustomNearClippingPlane

Set bOverride_CustomNearClippingPlane to true if you want to use a custom clipping plane instead of GNearClippingPlane.

Public variable

FMatrix

 

CustomProjectionMatrix

The custom projection matrix to use

Public variable

UDrawFrustumCom...

 

DrawFrustum

The frustum component used to show visually where the camera field of view is

Public variable

float

 

FOVAngle

Camera field of view (in degrees).

Public variable

int32

 

NumXTiles

Number of X tiles to render. Ignored in Perspective mode, works only in Orthographic mode

Public variable

int32

 

NumYTiles

Number of Y tiles to render. Ignored in Perspective mode, works only in Orthographic mode

Public variable

float

 

OrthoWidth

The desired width (in world units) of the orthographic view (ignored in Perspective mode)

Public variable

float

 

PostProcessBlendWeight

Range (0.0, 1.0) where 0 indicates no effect, 1 indicates full effect.

Public variable

FPostProcessSet...

 

PostProcessSettings

Public variable

TEnumAsByte< EC...

 

ProjectionType

Public variable

TArray< TWeakPt...

 

SceneViewExtensions

Array of scene view extensions specifically to apply to this scene capture

Public variable

TObjectPtr< cla...

 

TextureTarget

Output render target of the scene capture that can be read in materials.

Public variable

int32

 

TileID

Which tile to render of the orthographic view (ignored in Perspective mode)

Constructors

Name Description

Public function

USceneCaptureComponent2D

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AddOrUpdateBlendable

(
    TScriptInterface< IBlendableInterfa...,
    float InWeight
)

Adds an Blendable (implements IBlendableInterface) to the array of Blendables (if it doesn't exist) and update the weight

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

void

 

CaptureScene()

Render the scene to the texture target immediately.

Public function

void

 

CaptureSceneDeferred()

Render the scene to the texture the next time the main view is rendered.

Public function Virtual

void

 

GetCameraView

(
    float DeltaTime,
    FMinimalViewInfo& OutDesiredView
)

Public function Const

bool

 

GetEnableOrthographicTiling()

Return if orthographic tiling rendering is enabled or not

Public function Const

int32

 

GetNumXTiles()

Return number of X tiles to render (to be used when orthographic tiling rendering is enabled)

Public function Const

int32

 

GetNumYTiles()

Return number of Y tiles to render (to be used when orthographic tiling rendering is enabled)

Public function

void

 

RemoveBlendable

Removes a blendable.

Public function

void

 

ResetOrthographicTilingCounter()

Reset Orthographic tiling counter

Public function

void

 

SetCameraView

(
    const FMinimalViewInfo& DesiredVie...
)

Public function

void

 

UpdateContent()

For backwards compatibility.

Public function

void

 

UpdateDrawFrustum()

Overridden from USceneCaptureComponent

Name Description

Public function Virtual

void

 

UpdateSceneCaptureContents

(
    FSceneInterface* Scene
)

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

OnComponentDestroyed

(
    bool bDestroyingHierarchy
)

Called when a component is destroyed

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual Const

bool

 

RequiresGameThreadEndOfFrameUpdates()

Return true if this component requires end of frame updates to happen from the game thread.

Public function Virtual

void

 

SendRenderTransform_Concurrent()

Called to send a transform update for this component to the rendering thread

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual Const

bool

 

CanEditChange

(
    const FProperty* InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.