Navigation
API > API/Plugins > API/Plugins/GeometryAlgorithms
Implementation/adaptation of "Dynamic Skeletonization via Variational Medial Skeletal Sampling" by Huang et al with some surface-focused additions optionally uses raycasts to guide refinement, and fast winding to guide medial-sphere projection
| Name | FSkeletonViaSampling |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/GeometryAlgorithms/Public/Skeletonization/MeshMedialAxisSampling.h |
| Include Path | #include "Skeletonization/MeshMedialAxisSampling.h" |
Syntax
struct FSkeletonViaSampling
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bSplitClustersIfEdgesIntersectSurface | bool | Whether to test medial skeleton edges for intersection w/ the input surface, and try to refine where these intersections are found. | Skeletonization/MeshMedialAxisSampling.h | |
| ErrorScaleNearEdgeSurfaceIntersection | double | Factor to scale vertex error near skeleton-edge/input-surface intersections. | Skeletonization/MeshMedialAxisSampling.h | |
| GaussNewtonConvergenceThreshold | double | Stop optimization if the norm of the change in sphere parameters is less than this. | Skeletonization/MeshMedialAxisSampling.h | |
| MaxGaussNewtonIterations | int32 | Maximum number of gauss-newton iterations to apply to improve sphere fit. | Skeletonization/MeshMedialAxisSampling.h | |
| MaxSpheres | int32 | Main user parameters. | Skeletonization/MeshMedialAxisSampling.h | |
| MaxSplitFractionPerIteration | double | Maximum fraction of current cluster count to split per iteration (if > 0) Functionally similar to MaxSplitPerIteration but scales better with larger cluster counts | Skeletonization/MeshMedialAxisSampling.h | |
| MaxSplitPerIteration | int32 | Additional parameters most users should not need to change these. | Skeletonization/MeshMedialAxisSampling.h | |
| MinClusterErrorToSplit | double | Do not split a cluster if its max error is below this threshold. | Skeletonization/MeshMedialAxisSampling.h | |
| MinClusterSizeToKeep | int32 | Clusters with fewer vertices than this will be discarded. | Skeletonization/MeshMedialAxisSampling.h | |
| MinClusterSizeToOptimize | int32 | Minimum number of vertices in a cluster below which we will not optimize (because the optimization may not capture a good medial sphere if it has too few samples) | Skeletonization/MeshMedialAxisSampling.h | |
| MinFractionOfMaxErrorToSplit | double | Minimum vertex error to allow a cluster split, as fraction of current maximum vertex error This helps to avoid splitting relatively low-error regions when there is significantly-higher error elsewhere since the higher error region will often split into multiple clusters that should all be split before the low error region | Skeletonization/MeshMedialAxisSampling.h | |
| OptimizeSpheresForIterationsPostClusterChange | int8 | Number of full passes (top-level skeleton building iterations) to keep optimizing spheres after the cluster vertex assignments have changed This allows us to 'sleep' the spheres for clusters where vertices have not changed. | Skeletonization/MeshMedialAxisSampling.h | |
| PosErrorWt | double | Weight for the position error term. Relative to plane error term, so normal and position error weights sum to 1. Should be in the (0,1] range. | Skeletonization/MeshMedialAxisSampling.h | |
| ShrinkMedial | FShrinkMedialBall | Settings for the medial ball shrinking, used to initialize medial spheres and to project spheres into the surface. | Skeletonization/MeshMedialAxisSampling.h | |
| Simplifier | TOptional< FSkeletonSimplifier > | Optional simplifier, to be run after generating the initial skeleton. Saves re-computing some values compared to running the simplifier separately after. | Skeletonization/MeshMedialAxisSampling.h | |
| UseLocalClusterVertexReassignmentAtClusterCount | int32 | Number of clusters at which to switch to local cluster assignment updates, rather than global searches. If < 0, always use global search. | Skeletonization/MeshMedialAxisSampling.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMedialSkeleton ComputeSkeleton
(
const TMeshAABBTree3< FDynamicMesh3 >& MeshBVH, |
Compute mesh skeleton This version will compute vertex normals for you, and will optionally consider near-coincident boundary vertices as welded | Skeletonization/MeshMedialAxisSampling.h | |
FMedialSkeleton ComputeSkeleton
(
const TMeshAABBTree3< MeshType >& MeshBVH, |
Compute mesh skeleton Current Supported Mesh Types: FDynamicMesh3, FTriangleMeshAdapterd | Skeletonization/MeshMedialAxisSampling.h | |
FMedialSkeleton ComputeSkeleton
(
const TMeshAABBTree3< MeshType >& MeshBVH, |
Compute mesh skeleton This version will compute vertex normals for you, and will optionally consider near-coincident vertices as welded Current Supported Mesh Types: FDynamicMesh3, FTriangleMeshAdapterd | Skeletonization/MeshMedialAxisSampling.h |