UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMeshNaniteSettings Struct Reference

#include <EngineTypes.h>

Public Member Functions

 FMeshNaniteSettings ()
 
bool operator== (const FMeshNaniteSettings &Other) const
 
bool operator!= (const FMeshNaniteSettings &Other) const
 

Public Attributes

uint8 bEnabled: 1
 
uint8 bExplicitTangents: 1
 
uint8 bLerpUVs: 1
 
uint8 bSeparable: 1
 
uint8 bVoxelNDF: 1
 
uint8 bVoxelOpacity: 1
 
ENaniteShapePreservation ShapePreservation = ENaniteShapePreservation::None
 
int32 PositionPrecision = MIN_int32
 
int32 NormalPrecision = -1
 
int32 TangentPrecision = -1
 
int32 BoneWeightPrecision = -1
 
uint32 TargetMinimumResidencyInKB = 0
 
float KeepPercentTriangles = 1.0f
 
float TrimRelativeError = 0.0f
 
ENaniteGenerateFallback GenerateFallback = ENaniteGenerateFallback::PlatformDefault
 
ENaniteFallbackTarget FallbackTarget = ENaniteFallbackTarget::Auto
 
float FallbackPercentTriangles = 1.0f
 
float FallbackRelativeError = 1.0f
 
float MaxEdgeLengthFactor = 0.0f
 
int32 NumRays = 64
 
int32 VoxelLevel = 0
 
float RayBackUp = 0.0f
 
int32 DisplacementUVChannel = 0
 
TArray< FMeshDisplacementMapDisplacementMaps
 
FNaniteAssemblyData NaniteAssemblyData
 

Detailed Description

Settings applied when building Nanite data.

Constructor & Destructor Documentation

◆ FMeshNaniteSettings()

FMeshNaniteSettings::FMeshNaniteSettings ( )
inline

Member Function Documentation

◆ operator!=()

bool FMeshNaniteSettings::operator!= ( const FMeshNaniteSettings Other) const
inline

Inequality operator.

◆ operator==()

bool FMeshNaniteSettings::operator== ( const FMeshNaniteSettings Other) const
inline

Equality operator.

Member Data Documentation

◆ bEnabled

uint8 FMeshNaniteSettings::bEnabled

If true, Nanite data will be generated.

◆ bExplicitTangents

uint8 FMeshNaniteSettings::bExplicitTangents

Whether to store explicit tangents instead of using the implicitly derived ones.

◆ bLerpUVs

uint8 FMeshNaniteSettings::bLerpUVs

Whether to interpolate UVs when simplifying. Should be enabled whenever possible. For real UV coordinates this allows calculating the lowest error optimal UVs for new vertices when simplifying, assuming the UVs are used as normal texture coordinates and will interpolate across the face of the triangles.

Disable if data stored in UVs isn't valid to interpolate, for example if indexes are stored in UVs. Lerping an index doesn't make sense and would break the shader trying to use it. Note: If disabled, error from UVs is no longer accounted for when Nanite selects the LOD to render because error due to arbitrary vertex attributes that aren't interpolatable can't be generally reasoned about.

◆ BoneWeightPrecision

int32 FMeshNaniteSettings::BoneWeightPrecision = -1

Blend Weight Precision in bits. -1 is auto. 0 is rigid.

◆ bSeparable

uint8 FMeshNaniteSettings::bSeparable

◆ bVoxelNDF

uint8 FMeshNaniteSettings::bVoxelNDF

◆ bVoxelOpacity

uint8 FMeshNaniteSettings::bVoxelOpacity

◆ DisplacementMaps

TArray<FMeshDisplacementMap> FMeshNaniteSettings::DisplacementMaps

◆ DisplacementUVChannel

int32 FMeshNaniteSettings::DisplacementUVChannel = 0

UV channel used to sample displacement maps

◆ FallbackPercentTriangles

float FMeshNaniteSettings::FallbackPercentTriangles = 1.0f

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

◆ FallbackRelativeError

float FMeshNaniteSettings::FallbackRelativeError = 1.0f

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

◆ FallbackTarget

ENaniteFallbackTarget FMeshNaniteSettings::FallbackTarget = ENaniteFallbackTarget::Auto

Which heuristic to use when generating the fallback mesh.

◆ GenerateFallback

ENaniteGenerateFallback FMeshNaniteSettings::GenerateFallback = ENaniteGenerateFallback::PlatformDefault

Whether fallback mesh should be generated.

◆ KeepPercentTriangles

float FMeshNaniteSettings::KeepPercentTriangles = 1.0f

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

◆ MaxEdgeLengthFactor

float FMeshNaniteSettings::MaxEdgeLengthFactor = 0.0f

Controls the maximum distance allowed between each vertex of the mesh on screen. Can be used to prevent oversimplification of meshes that are intended to be deformed (e.g. animation using World Position Offset, Spline Mesh Component, etc.). Should be left at default of 0 unless explicitly needed to fix oversimplification issues.

◆ NaniteAssemblyData

FNaniteAssemblyData FMeshNaniteSettings::NaniteAssemblyData

Nanite Assembly data set up by the import

◆ NormalPrecision

int32 FMeshNaniteSettings::NormalPrecision = -1

Normal Precision in bits. -1 is auto.

◆ NumRays

int32 FMeshNaniteSettings::NumRays = 64

Number of rays traced per voxel to sample the surface

◆ PositionPrecision

int32 FMeshNaniteSettings::PositionPrecision = MIN_int32

Position Precision. Step size is 2^(-PositionPrecision) cm. MIN_int32 is auto.

◆ RayBackUp

float FMeshNaniteSettings::RayBackUp = 0.0f

◆ ShapePreservation

ENaniteShapePreservation FMeshNaniteSettings::ShapePreservation = ENaniteShapePreservation::None

◆ TangentPrecision

int32 FMeshNaniteSettings::TangentPrecision = -1

Tangent Precision in bits. -1 is auto.

◆ TargetMinimumResidencyInKB

uint32 FMeshNaniteSettings::TargetMinimumResidencyInKB = 0

How much of the resource should always be resident (In KB). Approximate due to paging. 0: Minimum size (single page). MAX_uint32: Entire mesh.

◆ TrimRelativeError

float FMeshNaniteSettings::TrimRelativeError = 0.0f

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

◆ VoxelLevel

int32 FMeshNaniteSettings::VoxelLevel = 0

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