UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMeshApproximationSettings Struct Referenceabstract

#include <MeshApproximationSettings.h>

Public Member Functions

 UPROPERTY (BlueprintReadWrite, EditAnywhere, Category=ShapeSettings, meta=(DisplayName="Approximation Accuracy (meters)", ClampMin="0.001")) float ApproximationAccuracy
 
 UPROPERTY (BlueprintReadWrite, EditAnywhere, Category=ShapeSettings, meta=(DisplayName="Gap Filling Distance (meters)", ClampMin="0.001", EditCondition="bFillGaps")) float GapDistance=0.1f
 
 UPROPERTY (BlueprintReadWrite, EditAnywhere, Category=SimplifySettings, meta=(DisplayName="Geometric Deviation (meters)", ClampMin="0.0001", EditCondition="SimplifyMethod == EMeshApproximationSimplificationPolicy::GeometricTolerance")) float GeometricDeviation=0.1f
 
ENGINE_API bool operator== (const FMeshApproximationSettings &Other) const
 
ENGINE_API bool operator!= (const FMeshApproximationSettings &Other) const
 

Public Attributes

EMeshApproximationType OutputType = EMeshApproximationType::MeshAndMaterials
 
int32 ClampVoxelDimension = 1024
 
bool bAttemptAutoThickening = true
 
float TargetMinThicknessMultiplier = 1.5f
 
bool bIgnoreTinyParts = true
 
float TinyPartSizeMultiplier = 0.05f
 
EMeshApproximationBaseCappingType BaseCapping = EMeshApproximationBaseCappingType::NoBaseCapping
 
float WindingThreshold = 0.5f
 
bool bFillGaps = true
 
EOccludedGeometryFilteringPolicy OcclusionMethod = EOccludedGeometryFilteringPolicy::VisibilityBasedFiltering
 
bool bOccludeFromBottom = true
 
EMeshApproximationSimplificationPolicy SimplifyMethod = EMeshApproximationSimplificationPolicy::GeometricTolerance
 
int32 TargetTriCount = 2000
 
float TrianglesPerM = 2.0f
 
EMeshApproximationGroundPlaneClippingPolicy GroundClipping = EMeshApproximationGroundPlaneClippingPolicy::NoGroundClipping
 
float GroundClippingZHeight = 0.0f
 
bool bEstimateHardNormals = true
 
float HardNormalAngle = 60.0f
 
EMeshApproximationUVGenerationPolicy UVGenerationMethod = EMeshApproximationUVGenerationPolicy::PreferXAtlas
 
int InitialPatchCount = 250
 
float CurvatureAlignment = 1.0f
 
float MergingThreshold = 1.5f
 
float MaxAngleDeviation = 45.0f
 
bool bGenerateNaniteEnabledMesh = false
 
ENaniteFallbackTarget NaniteFallbackTarget = ENaniteFallbackTarget::Auto
 
float NaniteFallbackPercentTriangles = 1.0f
 
float NaniteFallbackRelativeError = 1.0f
 
bool bSupportRayTracing = true
 
bool bAllowDistanceField = true
 
int32 MultiSamplingAA = 0
 
int32 RenderCaptureResolution = 2048
 
FMaterialProxySettings MaterialSettings
 
float CaptureFieldOfView = 30.0f
 
float NearPlaneDist = 1.0f
 
bool bUseRenderLODMeshes = false
 
bool bEnableSimplifyPrePass = true
 
bool bEnableParallelBaking = true
 
bool bPrintDebugMessages = false
 
bool bEmitFullDebugMesh = false
 

Member Function Documentation

◆ operator!=()

bool FMeshApproximationSettings::operator!= ( const FMeshApproximationSettings Other) const

Inequality.

◆ operator==()

bool FMeshApproximationSettings::operator== ( const FMeshApproximationSettings Other) const

Equality operator.

◆ UPROPERTY() [1/3]

FMeshApproximationSettings::UPROPERTY ( BlueprintReadWrite  ,
EditAnywhere  ,
Category  = ShapeSettings,
meta  = (DisplayName="Approximation Accuracy (meters)", ClampMin="0.001") 
)

Approximation Accuracy in Meters, will determine (eg) voxel resolution

◆ UPROPERTY() [2/3]

FMeshApproximationSettings::UPROPERTY ( BlueprintReadWrite  ,
EditAnywhere  ,
Category  = ShapeSettings,
meta  = (DisplayName="Gap Filling Distance (meters)", ClampMin="0.001", EditCondition="bFillGaps") 
)
pure virtual

Distance in Meters to expand/contract to fill gaps

◆ UPROPERTY() [3/3]

FMeshApproximationSettings::UPROPERTY ( BlueprintReadWrite  ,
EditAnywhere  ,
Category  = SimplifySettings,
meta  = (DisplayName="Geometric Deviation (meters)", ClampMin="0.0001", EditCondition="SimplifyMethod == EMeshApproximationSimplificationPolicy::GeometricTolerance") 
)
pure virtual

Allowable Geometric Deviation in Meters when SimplifyMethod incorporates a Geometric Tolerance

Member Data Documentation

◆ bAllowDistanceField

bool FMeshApproximationSettings::bAllowDistanceField = true

Whether to allow distance field to be computed for this mesh. Disable this to save memory if the generated mesh will only be rendered in the distance.

◆ BaseCapping

Optional methods to attempt to close off the bottom of open meshes

◆ bAttemptAutoThickening

bool FMeshApproximationSettings::bAttemptAutoThickening = true

if enabled, we will attempt to auto-thicken thin parts or flat sheets

◆ bEmitFullDebugMesh

bool FMeshApproximationSettings::bEmitFullDebugMesh = false

If true, write the full mesh triangle set (ie flattened, non-instanced) used for mesh generation. Warning: this asset may be extremely large!!

◆ bEnableParallelBaking

bool FMeshApproximationSettings::bEnableParallelBaking = true

If false, texture capture and baking will be done serially after mesh generation, rather than in parallel when possible. This will reduce the maximum memory requirements of the process.

◆ bEnableSimplifyPrePass

bool FMeshApproximationSettings::bEnableSimplifyPrePass = true

If true, a faster mesh simplfication strategy will be used. This can significantly reduce computation time and memory usage, but potentially at the cost of lower quality output.

◆ bEstimateHardNormals

bool FMeshApproximationSettings::bEstimateHardNormals = true

If true, normal angle will be used to estimate hard normals

◆ bFillGaps

bool FMeshApproximationSettings::bFillGaps = true

If true, topological expand/contract is used to try to fill small gaps between objects.

◆ bGenerateNaniteEnabledMesh

bool FMeshApproximationSettings::bGenerateNaniteEnabledMesh = false

Whether to generate a nanite-enabled mesh

◆ bIgnoreTinyParts

bool FMeshApproximationSettings::bIgnoreTinyParts = true

If enabled, tiny parts will be excluded from the mesh merging, which can improve performance

◆ bOccludeFromBottom

bool FMeshApproximationSettings::bOccludeFromBottom = true

If true, then the OcclusionMethod computation is configured to try to consider downward-facing "bottom" geometry as occluded

◆ bPrintDebugMessages

bool FMeshApproximationSettings::bPrintDebugMessages = false

If true, print out debugging messages

◆ bSupportRayTracing

bool FMeshApproximationSettings::bSupportRayTracing = true

Whether ray tracing will be supported on this mesh. Disable this to save memory if the generated mesh will only be rendered in the distance.

◆ bUseRenderLODMeshes

bool FMeshApproximationSettings::bUseRenderLODMeshes = false

If true, LOD0 Render Meshes (or Nanite Fallback meshes) are used instead of Source Mesh data. This can significantly reduce computation time and memory usage, but potentially at the cost of lower quality output.

◆ CaptureFieldOfView

float FMeshApproximationSettings::CaptureFieldOfView = 30.0f

◆ ClampVoxelDimension

int32 FMeshApproximationSettings::ClampVoxelDimension = 1024

Maximum allowable voxel count along main directions. This is a limit on ApproximationAccuracy. Max of 1290 (1290^3 is the last integer < 2^31, using a bigger number results in failures in TArray code & probably elsewhere)

◆ CurvatureAlignment

float FMeshApproximationSettings::CurvatureAlignment = 1.0f

This parameter controls alignment of the initial patches to creases in the mesh

◆ GroundClipping

Configure how the final mesh should be clipped with a ground plane, if desired

◆ GroundClippingZHeight

float FMeshApproximationSettings::GroundClippingZHeight = 0.0f

Z-Height for the ground clipping plane, if enabled

◆ HardNormalAngle

float FMeshApproximationSettings::HardNormalAngle = 60.0f

◆ InitialPatchCount

int FMeshApproximationSettings::InitialPatchCount = 250

Number of initial patches mesh will be split into before computing island merging

◆ MaterialSettings

FMaterialProxySettings FMeshApproximationSettings::MaterialSettings

Material generation settings

◆ MaxAngleDeviation

float FMeshApproximationSettings::MaxAngleDeviation = 45.0f

UV islands will not be merged if their average face normals deviate by larger than this amount

◆ MergingThreshold

float FMeshApproximationSettings::MergingThreshold = 1.5f

Distortion/Stretching Threshold for island merging - larger values increase the allowable UV stretching

◆ MultiSamplingAA

int32 FMeshApproximationSettings::MultiSamplingAA = 0

If Value is > 1, Multisample output baked textures by this amount in each direction (eg 4 == 16x supersampling)

◆ NaniteFallbackPercentTriangles

float FMeshApproximationSettings::NaniteFallbackPercentTriangles = 1.0f

Percentage of triangles to keep from source Nanite mesh for fallback. 1.0 = no reduction, 0.0 = no triangles.

◆ NaniteFallbackRelativeError

float FMeshApproximationSettings::NaniteFallbackRelativeError = 1.0f

Reduce Nanite fallback mesh until at least this amount of error is reached relative to size of the mesh.

◆ NaniteFallbackTarget

ENaniteFallbackTarget FMeshApproximationSettings::NaniteFallbackTarget = ENaniteFallbackTarget::Auto

Which heuristic to use when generating the Nanite fallback mesh.

◆ NearPlaneDist

float FMeshApproximationSettings::NearPlaneDist = 1.0f

◆ OcclusionMethod

Type of hidden geometry removal to apply

◆ OutputType

EMeshApproximationType FMeshApproximationSettings::OutputType = EMeshApproximationType::MeshAndMaterials

Type of output from mesh approximation process

◆ RenderCaptureResolution

int32 FMeshApproximationSettings::RenderCaptureResolution = 2048

If Value is zero, use MaterialSettings resolution, otherwise override the render capture resolution

◆ SimplifyMethod

Mesh Simplification criteria

◆ TargetMinThicknessMultiplier

float FMeshApproximationSettings::TargetMinThicknessMultiplier = 1.5f

Multiplier on Approximation Accuracy used for auto-thickening

◆ TargetTriCount

int32 FMeshApproximationSettings::TargetTriCount = 2000

Target triangle count for Mesh Simplification, for SimplifyMethods that use a Count

◆ TinyPartSizeMultiplier

float FMeshApproximationSettings::TinyPartSizeMultiplier = 0.05f

Multiplier on Approximation Accuracy used to define tiny-part threshold, using maximum bounding-box dimension

◆ TrianglesPerM

float FMeshApproximationSettings::TrianglesPerM = 2.0f

Approximate Number of triangles per Square Meter, for SimplifyMethods that use such a constraint

◆ UVGenerationMethod

◆ WindingThreshold

float FMeshApproximationSettings::WindingThreshold = 0.5f

Winding Threshold controls hole filling at open mesh borders. Smaller value means "more/rounder" filling


The documentation for this struct was generated from the following files: