FNormalFlowRemesher

Remeshing with "face aligned projection".

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

DynamicMesh

Header

/Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/NormalFlowRemesher.h

Include

#include "NormalFlowRemesher.h"

Syntax

class FNormalFlowRemesher : public UE::Geometry::FQueueRemesher

Remarks

Remeshing with "face aligned projection". This approach to projection attempts to preserve sharp features in the mesh by aligning triangle normals with normals from the original mesh during the projection pass. This class also performs a pass of edge flips aimed at further aligning triangle normals to their originals. This can be helpful in fixing the occasional single "bad edge" along a sequence of feature edges.

Variables

Name Description

Public variable

bool

 

bEnableParallelEdgeFlipPass

Gather candidates for edge flipping in parallel, then do the actual flips sequentially.

Public variable

bool

 

bSmoothInFillAreas

Control whether or not we want to apply mesh smoothing in "free" areas that have not projected to target surface.

Public variable

int

 

FaceProjectionPassesPerRemeshIteration

During each call to RemeshIteration, do this many passes of face-aligned projection.

Public variable

float

 

FillAreaDistanceMultiplier

This is used as a multiplier on MaxEdgeLength to determine when we identify points as being in "free" areas.

Public variable

float

 

FillAreaSmoothMultiplier

This is used as a multiplier on the Remesher smoothing rate, applied to points identified as being in "free" areas.

Public variable

int

 

MaxTriangleCount

Cap on triangle count, to prevent runaway mesh messes. Ignored if zero.

Public variable

double

 

NormalAlignmentSpeed

Drag on normal alignment

Public variable

int

 

NumExtraProjectionIterations

Additional projection iterations after the usual remesh step.

Protected variable

TArray< FVector...

 

ProjectionVertexBuffer

Per triangle-vertex projection positions for face projection pass. (Size >= 3 * MaxTriangleID)

Protected variable

TArray< double ...

 

ProjectionWeightBuffer

Per triangle-vertex weights for face projection pass. (Size >= 3 * MaxTriangleID)

Public variable

double

 

SurfaceProjectionSpeed

Drag on surface projection

Protected variable

TArray< double ...

 

TempWeightBuffer

Constructors

Name Description

Public function

FNormalFlowRemesher

(
    FDynamicMesh3* MeshIn
)

Functions

Name Description

Protected function Const

bool

 

EdgeFlipWouldReduceNormalError

(
    int EdgeID,
    double BadEdgeErrorThreshold,
    double ImprovementRatioThreshold
)

Test to see if flipping an edge would improve "normal error".

Protected function

void

 

InitializeVertexBufferForFacePass()

Similar to InitializeVertexBufferForPass, but also initialize the additional per-vertex weight buffer.

Protected function

void

 

RemeshWithFaceProjection()

Do remeshing with face-aligned projection.

Protected function

void

 

TrackedEdgeFlipPass()

Flip all edges for which EdgeFlipWouldReduceNormalError returns true

Protected function

void

 

TrackedFaceProjectionPass

(
    double& MaxDistanceMoved,
    bool bIsTuningIteration
)

Perform face-aligned projection onto the target mesh. Queue edges whose lengths change because of it.

Protected function

void

 

TrackedFaceProjectionPass_Serial

(
    double& MaxDistanceMoved,
    bool bIsTuningIteration
)

Perform face-aligned projection onto the target mesh. Queue edges whose lengths change because of it.

Overridden from FQueueRemesher

Name Description

Protected function Virtual

void

 

TrackedFullProjectionPass

(
    bool bParallel
)

This is called during RemeshIteration.

Overridden from FRemesher

Name Description

Public function Virtual

void

 

BasicRemeshPass()

"Outer loop" for all remeshing operations