Navigation
API > API/Plugins > API/Plugins/Water
Water Mesh Component responsible for generating and rendering a continuous water mesh on top of all the existing water body actors in the world The component contains a quadtree which defines where there are water tiles. A function for traversing the quadtree and outputing a list of instance data for each tile to be rendered from a point of view is included
| Name | UWaterMeshComponent |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterMeshComponent.h |
| Include Path | #include "WaterMeshComponent.h" |
Syntax
UCLASS (MinimalAPI, ClassGroup=(Rendering, Water),
HideCategories=(Object, Activation, "Components|Activation", Collision, Lighting, HLOD, Navigation, Replication, Input, MaterialParameters, TextureStreaming),
EditInlineNew)
class UWaterMeshComponent : public UMeshComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UMeshComponent → UWaterMeshComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UWaterMeshComponent() |
WaterMeshComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FarDistanceMaterial | TObjectPtr< UMaterialInterface > | WaterMeshComponent.h |
|
|
| FarDistanceMeshExtent | float | WaterMeshComponent.h |
|
|
| ForceCollapseDensityLevel | int32 | At above what density level a tile is allowed to force collapse even if not all leaf nodes in the subtree are present. | WaterMeshComponent.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsEnabled | bool | If the system is enabled | WaterMeshComponent.h | |
| bNeedsRebuild | bool | Dirty flag which will make sure the water mesh is updated properly | WaterMeshComponent.h | |
| bUseFarMeshWithoutOcean | bool | Forces the water mesh to always render the far mesh, regardless if there is an ocean or not. | WaterMeshComponent.h |
|
| FarDistanceMeshHeightWithoutOcean | double | Absolute world space height of the far mesh when there is no ocean. | WaterMeshComponent.h |
|
| LODCountBiasScalability | int32 | Cached CVarWaterMeshLODCountBias to detect changes in scalability | WaterMeshComponent.h | |
| LODScale | float | World scale of the concentric LODs | WaterMeshComponent.h |
|
| LODScaleBiasScalability | float | Cached CVarWaterMeshLODScaleBias to detect changes in scalability | WaterMeshComponent.h | |
| MaterialToMID | TMap< TObjectPtr< UMaterialInterface >, TObjectPtr< UMaterialInstanceDynamic > > | Maps from materials assigned to each water body to actually used MIDs. | WaterMeshComponent.h |
|
| QuadTreeResolution | FIntPoint | The current quad tree resolution derived from the extent of the water zone and the water mesh tile size (Extent / TileSize). | WaterMeshComponent.h |
|
| TessellationFactor | int32 | Highest tessellation factor of a water tile. | WaterMeshComponent.h |
|
| TessFactorBiasScalability | int32 | Cached CVarWaterMeshTessFactorBias to detect changes in scalability | WaterMeshComponent.h | |
| TileSize | float | World size of the water tiles at LOD0. | WaterMeshComponent.h |
|
| UsedMaterials | TSet< TObjectPtr< UMaterialInterface > > | Unique list of materials used by this component | WaterMeshComponent.h |
|
| WaterQuadTree | FWaterQuadTree | Tiles containing water, stored in a quad tree | WaterMeshComponent.h | |
| WaterQuadTreeBuilder | FWaterQuadTreeBuilder | WaterMeshComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector2D GetDynamicWaterMeshCenter() |
WaterMeshComponent.h | ||
FIntPoint GetExtentInTiles() |
WaterMeshComponent.h | ||
FVector2D GetGlobalWaterMeshCenter() |
WaterMeshComponent.h | ||
float GetLODScale() |
WaterMeshComponent.h | ||
int32 GetTessellationFactor() |
WaterMeshComponent.h | ||
float GetTileSize() |
WaterMeshComponent.h | ||
const TSet< TObjectPtr< UMaterialInterface > > & GetUsedMaterialsSet() |
WaterMeshComponent.h | ||
FMaterialRelevance GetWaterMaterialRelevance
(
ERHIFeatureLevel::Type InFeatureLevel |
Use this instead of GetMaterialRelevance, since this one will go over all materials from all tiles | WaterMeshComponent.h | |
FMaterialRelevance GetWaterMaterialRelevance
(
EShaderPlatform InShaderPlatform |
WaterMeshComponent.h | ||
const FWaterQuadTreeBuilder & GetWaterQuadTreeBuilder() |
WaterMeshComponent.h | ||
bool IsEnabled() |
WaterMeshComponent.h |
|
|
bool IsLocalOnlyTessellationEnabled() |
WaterMeshComponent.h | ||
void MarkWaterMeshGridDirty() |
WaterMeshComponent.h | ||
void SetDynamicWaterMeshCenter
(
const FVector2D& NewCenter |
WaterMeshComponent.h | ||
void SetTileSize
(
float NewTileSize |
WaterMeshComponent.h | ||
void Update() |
WaterMeshComponent.h |
Overridden from UPrimitiveComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CollectPSOPrecacheData
(
const FPSOPrecacheParams& BasePrecachePSOParams, |
WaterMeshComponent.h | ||
virtual FPrimitiveSceneProxy * CreateSceneProxy() |
WaterMeshComponent.h | ||
virtual int32 GetNumMaterials() |
WaterMeshComponent.h | ||
virtual void GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
WaterMeshComponent.h | ||
virtual void SetMaterial
(
int32 ElementIndex, |
WaterMeshComponent.h | ||
virtual bool ShouldRenderSelected() |
WaterMeshComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsNavigationRelevant() |
WaterMeshComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostInitProperties() |
WaterMeshComponent.h | ||
virtual void PostLoad() |
WaterMeshComponent.h |