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 sceen size for LOD 0. A larger value uniformly increases the geometry resolution on screen.

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 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, Meta

int32

 

NumSubdivisionLods

The number of levels of geometry subdivision to apply before the LOD 0 from the source virtual texture.

Protected variable UProperty Category, EditAnywhere, Meta

int32

 

NumTailLods

The number of levels of geometry reduction to apply after the Max LOD from the source virtual texture.

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

 

GetLodDistribution()

Public function Const

UMaterialInt ...

 

GetMaterial()

Public function Const

UHeightfield ...

 

GetMinMaxTexture()

Get the MinMax height texture on this component.

Public function

int32

 

GetNumMinMaxTextureBuildLevels()

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

Public function Const

int32

 

GetNumOcclusionLods()

Public function Const

int32

 

GetNumSubdivisionLods()

Public function Const

int32

 

GetNumTailLods()

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.

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback