G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FMeshNaniteSettings Struct Reference

Settings applied when building Nanite data. More...

Public Member Functions

Functions
void SetbPreserveArea (bool Value)
 Whether to try and maintain the same surface area at all distances. Useful for foliage that thins out otherwise.
bool GetbEnabled () const
 If true, Nanite data will be generated.
void SetbEnabled (bool Value)
 If true, Nanite data will be generated.
bool GetbPreserveArea () const
 Whether to try and maintain the same surface area at all distances. Useful for foliage that thins out otherwise.
FMeshNaniteSettings & opAssign (FMeshNaniteSettings Other)
bool GetbExplicitTangents () const
 Whether to store explicit tangents instead of using the implicitly derived ones.
void SetbExplicitTangents (bool Value)
 Whether to store explicit tangents instead of using the implicitly derived ones.
bool GetbLerpUVs () const
 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.
void SetbLerpUVs (bool Value)
 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.

Public Attributes

NaniteSettings
float32 FallbackPercentTriangles
 Percentage of triangles to keep from source mesh for fallback. 1.0 = no reduction, 0.0 = no triangles.
int NormalPrecision
 Normal Precision in bits. -1 is auto.
int TangentPrecision
 Tangent Precision in bits. -1 is auto.
uint TargetMinimumResidencyInKB
 How much of the resource should always be resident (In KB). Approximate due to paging. 0: Minimum size (single page). MAX_uint32: Entire mesh.
float32 KeepPercentTriangles
 Percentage of triangles to keep from source mesh. 1.0 = no reduction, 0.0 = no triangles.
float32 TrimRelativeError
 Reduce until at least this amount of error is reached relative to size of the mesh.
ENaniteGenerateFallback GenerateFallback
 Whether fallback mesh should be generated.
ENaniteFallbackTarget FallbackTarget
 Which heuristic to use when generating the fallback mesh.
int PositionPrecision
 Position Precision. Step size is 2^(-PositionPrecision) cm. MIN_int32 is auto.
float32 FallbackRelativeError
 Reduce until at least this amount of error is reached relative to size of the mesh.
float32 MaxEdgeLengthFactor
 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.
int DisplacementUVChannel
 UV channel used to sample displacement maps.
TArray< FMeshDisplacementMap > DisplacementMaps
Variables
bool bPreserveArea
bool bExplicitTangents
bool bLerpUVs
bool bEnabled

Detailed Description

Settings applied when building Nanite data.

Member Function Documentation

◆ GetbEnabled()

bool GetbEnabled ( ) const

If true, Nanite data will be generated.

◆ GetbExplicitTangents()

bool GetbExplicitTangents ( ) const

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

◆ GetbLerpUVs()

bool GetbLerpUVs ( ) const

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 arbitary vertex attributes that aren't interpolatable can't be generally reasoned about.

◆ GetbPreserveArea()

bool GetbPreserveArea ( ) const

Whether to try and maintain the same surface area at all distances. Useful for foliage that thins out otherwise.

◆ opAssign()

◆ SetbEnabled()

void SetbEnabled ( bool Value)

If true, Nanite data will be generated.

◆ SetbExplicitTangents()

void SetbExplicitTangents ( bool Value)

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

◆ SetbLerpUVs()

void SetbLerpUVs ( bool Value)

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 arbitary vertex attributes that aren't interpolatable can't be generally reasoned about.

◆ SetbPreserveArea()

void SetbPreserveArea ( bool Value)

Whether to try and maintain the same surface area at all distances. Useful for foliage that thins out otherwise.

Member Data Documentation

◆ bEnabled

bool bEnabled

◆ bExplicitTangents

bool bExplicitTangents

◆ bLerpUVs

bool bLerpUVs

◆ bPreserveArea

bool bPreserveArea

◆ DisplacementMaps

TArray<FMeshDisplacementMap> DisplacementMaps

◆ DisplacementUVChannel

int DisplacementUVChannel

UV channel used to sample displacement maps.

◆ FallbackPercentTriangles

float32 FallbackPercentTriangles

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

◆ FallbackRelativeError

float32 FallbackRelativeError

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

◆ FallbackTarget

ENaniteFallbackTarget FallbackTarget

Which heuristic to use when generating the fallback mesh.

◆ GenerateFallback

ENaniteGenerateFallback GenerateFallback

Whether fallback mesh should be generated.

◆ KeepPercentTriangles

float32 KeepPercentTriangles

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

◆ MaxEdgeLengthFactor

float32 MaxEdgeLengthFactor

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.

◆ NormalPrecision

int NormalPrecision

Normal Precision in bits. -1 is auto.

◆ PositionPrecision

int PositionPrecision

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

◆ TangentPrecision

int TangentPrecision

Tangent Precision in bits. -1 is auto.

◆ TargetMinimumResidencyInKB

uint TargetMinimumResidencyInKB

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

float32 TrimRelativeError

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