UVirtualHeightfieldMeshComponent

Component to render a heightfield mesh using a virtual texture heightmap.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

VirtualHeightfieldMesh

Header

/Engine/Plugins/Experimental/VirtualHeightfieldMesh/Source/VirtualHeightfieldMesh/Public/VirtualHeightfieldMeshComponent.h

Include

#include "VirtualHeightfieldMeshComponent.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Blueprintable, ClassGroup=Rendering,
       HideCategories=(Activation, Collision, Cooking, HLOD, Navigation, Mobility, Object, Physics, VirtualTexture))
class UVirtualHeightfieldMeshComponent : public UPrimitiveComponent

Remarks

Component to render a heightfield mesh using a virtual texture heightmap.

Variables

Name Description

Protected variable UProperty Category Transient visibleanywhere

bool

 

bBuildMinMaxTextureButton

Placeholder for details customization button.

Protected variable UProperty Category Transient visibleanywhere

bool

 

bCopyBoundsButton

Placeholder for details customization button.

Protected variable UProperty Category, EditAnywhere, Meta

bool

 

bHiddenInEditor

Allows us to only see this actor in game and not in the Editor.

Protected variable UProperty Category, EditAnywhere, Meta

float

 

Lod0Distribution

Distribution multiplier applied only for LOD 0.

Protected variable UProperty Category, EditAnywhere, Meta

float

 

Lod0ScreenSize

Target screen size for a LOD 0 tile.

Protected variable UProperty Category, EditAnywhere, Meta

float

 

LodBiasScale

Scale applied to LodBias texture.

Protected variable UProperty Category, EditAnywhere, Meta

float

 

LodDistribution

Distribution multiplier applied for each LOD level.

Protected variable UProperty Category, EditAnywhere

UMaterialInterf...

 

Material

The material to apply.

Protected variable UProperty Category, EditAnywhere, Meta BlueprintReadOnly

UHeightfieldMin...

 

MinMaxTexture

Texture object containing minimum and maximum height values.

Protected variable UProperty Category, EditAnywhere, Meta

int32

 

NumForceLoadLods

The number of levels that we force loaded.

Protected variable UProperty Category, EditAnywhere, Meta BlueprintReadOnly

int32

 

NumMinMaxTextureBuildLevels

Number of levels to build in the MinMax Texture.

Protected variable UProperty Category, EditAnywhere, Meta

int32

 

NumOcclusionLods

The number of levels that we calculate occlusion volumes for.

Protected variable UProperty Category, EditAnywhere

TSoftObjectPtr<...

 

VirtualTexture

The RuntimeVirtualTextureVolume that contains virtual texture heightmap.

Protected variable UProperty Transient

ARuntimeVirtual...

 

VirtualTextureRef

UObject ref resolved from VirtualTexture weak ref.

Protected variable UProperty Category Transient visibleanywhere

UObject *

 

VirtualTextureThumbnail

Placeholder for details customization image.

Constructors

Name Description

Public function

UVirtualHeightfieldMeshComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function Const UFunction

void

 

GatherHideFlags

(
    bool& InOutHidePrimitivesInEditor,
    bool& InOutHidePrimitivesInGame
)

Function used by the VirtualTexture delegate to retrieve our HidePrimitives flags.

Public function Const

bool

 

GetHiddenInEditor()

Get the HiddenInEditor flag on this component.

Public function Const

float

 

GetLod0Distribution()

Public function Const

float

 

GetLod0ScreenSize()

Public function Const

float

 

GetLodBiasScale()

Public function Const

float

 

GetLodDistribution()

Public function Const

UMaterialInt...

 

GetMaterial()

Public function Const

UHeightfield...

 

GetMinMaxTexture()

Get the MinMax height texture on this component.

Public function Const

int32

 

GetNumForceLoadLods()

Public function

int32

 

GetNumMinMaxTextureBuildLevels()

Get the number of levels to build in the MinMax Texture.

Public function Const

int32

 

GetNumOcclusionLods()

Public function Const

URuntimeVirt...

 

GetVirtualTexture()

Get the associated runtime virtual texture.

Public function Const

FTransform

 

GetVirtualTextureTransform()

Get the associated runtime virtual texture transform including any texel snap offset.

Public function Const

ARuntimeVirt...

 

GetVirtualTextureVolume()

Get the associated runtime virtual texture volume.

Public function

void

 

InitializeMinMaxTexture

(
    uint32 InSizeX,
    uint32 InSizeY,
    uint32 InNumMips,
    uint8* InData
)

Initialize the MinMax height texture with the passed in size and data.

Public function Const

bool

 

IsMinMaxTextureEnabled()

Returns true if a MinMax height texture is relevant for this virtual texture type.

Protected function

void

 

OnVirtualTextureTransformUpdate

(
    USceneComponent* InRootCompone...,
    EUpdateTransformFlags UpdateTransfo...,
    ETeleportType Teleport
)

Handles when the transform is updated on the associated VirtualTexture.

Public function

void

 

SetMinMaxTexture

(
    UHeightfieldMinMaxTexture* InT...
)

Set a new asset to hold the MinMax height texture.

Overridden from UPrimitiveComponent

Name Description

Protected function Virtual

FPrimitiveSc...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Protected function Virtual Const

UMaterialInt...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Protected function Virtual Const

void

 

GetUsedMaterials

(
    TArray< UMaterialInterface* > ...,
    bool bGetDebugMaterials
)

Retrieves the materials used in this component

Protected function Virtual Const

bool

 

SupportsStaticLighting()

Whether the component type supports static lighting.

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

 

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.

Overridden from UObject

Name Description

Protected function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss