URuntimeVirtualTextureComponent

Component used to place a [URuntimeVirtualTexture](API\Runtime\Engine\VT\URuntimeVirtualTexture) in the world.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "Components/RuntimeVirtualTextureComponent.h"

Syntax

class URuntimeVirtualTextureComponent : public USceneComponent

Remarks

Component used to place a URuntimeVirtualTexture in the world.

Variables

Name Description

Protected variable

bool

 

bBuildDebugStreamingMips

Build the streaming low mips using debug coloring.

Protected variable

bool

 

bBuildStreamingMipsButton

Placeholder for details customization button.

Protected variable

bool

 

bEnableCompressCrunch

Enable Crunch texture compression for the streaming low mips.

Protected variable

bool

 

bEnableScalability

Set to true to enable scalability settings for the virtual texture.

Protected variable

bool

 

bHidePrimitives

Hide primitives in the main pass.

Protected variable

TSoftObjectPtr<...

 

BoundsAlignActor

Actor to align rotation to. If set this actor is always included in the bounds calculation.

Protected variable

bool

 

bSetBoundsButton

Placeholder for details customization button.

Protected variable

bool

 

bSnapBoundsToLandscape

If the Bounds Align Actor is a Landscape then this will snap the bounds so that virtual texture texels align with landscape vertex positions.

Protected variable

bool

 

bUseStreamingLowMipsInEditor

Use streaming low mips when rendering in editor.

Protected variable

FGetHidePrimiti...

 

HidePrimitivesDelegate

Protected variable

FDelegateHandle

 

PieEndDelegateHandle

Delegate handle for our function called on PIE end.

Protected variable

uint32

 

ScalabilityGroup

Group index of the scalability settings to use for the virtual texture.

Public variable

FRuntimeVirtual...

 

SceneProxy

Scene proxy object. Managed by the scene but stored here.

Protected variable

TObjectPtr< UVi...

 

StreamingTexture

Texture object containing streamed low mips. This can reduce rendering update cost.

Protected variable

int32

 

StreamLowMips

Number of streaming low mips to build for the virtual texture.

Protected variable

TObjectPtr< URu...

 

VirtualTexture

The virtual texture object to use.

Constructors

Name Description

Public function

URuntimeVirtualTextureComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Const

uint64

 

CalculateStreamingTextureSettingsHash()

Calculate a hash used to determine if the StreamingTexture contents are valid for use.

Public function

TSoftObjectP...

 

GetBoundsAlignActor()

Get the BoundsAlignActor on this component.

Public function

FGetHidePrim...

 

GetHidePrimitivesDelegate()

Get the delegate used to extend the calculation of the HidePrimitives state.

Public function Const

void

 

GetHidePrimitiveSettings

(
    bool& OutHidePrimitiveEditor,
    bool& OutHidePrimitiveGame
)

Get the full hide primitive state including the evaluating the GetHidePrimitivesDelegate delegate.

Public function Const

uint32

 

GetScalabilityGroup()

Get group index of the scalability settings.

Public function Const

bool

 

GetSnapBoundsToLandscape()

Get if SnapBoundsToLandscape is set on this component.

Public function Const

UVirtualText...

 

GetStreamingTexture()

Get the streaming virtual texture object on this component.

Public function Const

FTransform

 

GetTexelSnapTransform()

Get a translation to account for any vertex sample offset from the use of bSnapBoundsToLandscape.

Public function Const

URuntimeVirt...

 

GetVirtualTexture()

Get the runtime virtual texture object on this component.

Public function

void

 

InitializeStreamingTexture

(
    uint32 InSizeX,
    uint32 InSizeY,
    uint8* InData
)

Initialize the low mip streaming texture with the passed in size and data.

Public function

void

 

Invalidate

(
    FBoxSphereBounds const& WorldBound...
)

This function marks an area of the runtime virtual texture as dirty.

Public function

bool

 

IsBuildDebugStreamingMips()

Public getter for debug streaming mips flag.

Public function Const

bool

 

IsCrunchCompressed()

Public getter for crunch compression flag.

Public function Const

bool

 

IsScalable()

Get if scalability settings are enabled.

Public function Const

bool

 

IsStreamingLowMips()

Get if we want to use any streaming low mips on this component.

Public function Const

bool

 

IsStreamingTextureInvalid()

Returns true if there are StreamingTexure contents but they are not valid for use.

Public function Const

int32

 

NumStreamingMips()

Public getter for virtual texture streaming low mips

Public function

void

 

SetStreamingTexture

(
    UVirtualTextureBuilder* InText...
)

Set a new asset to hold the low mip streaming texture.

Overridden from USceneComponent

Name Description

Protected function Virtual Const

FBoxSphereBo...

 

CalcBounds

(
    const FTransform& LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Protected function Virtual Const

bool

 

IsVisible()

Returns true if this component is visible in the current context

Overridden from UActorComponent

Name Description

Protected function Virtual

void

 

ApplyWorldOffset

(
    const FVector& InOffset,
    bool bWorldShift
)

Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location

Protected function Virtual

void

 

CheckForErrors()

Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog.

Protected function Virtual

void

 

CreateRenderState_Concurrent

(
    FRegisterComponentContext* Con...
)

Used to create any rendering thread information for this component

Protected function Virtual

void

 

DestroyRenderState_Concurrent()

Used to shut down any rendering thread structure for this component

Protected function Virtual

void

 

OnRegister()

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

Protected function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Protected function Virtual

void

 

SendRenderTransform_Concurrent()

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

Overridden from UObject

Name Description

Protected 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.

Typedefs

Name

Description

FGetHidePrimitivesDelegate

Delegate that this virtual texture will call to evaluated the full HidePrimitives state.