Link Search Menu Expand Document

Refine

PCGEx | Cluster : Refine

Algorithmic edge refinement

The Refine node algorithmically prunes edges in a graph to enforce specific properties, allowing selection of refinement type and optional sanitization to restore edges based on predefined conditions.


Vtx
Endpoints of the input Edges
Edges
Edges associated with the input Vtxs
Heuristics
Heuristic nodes, if required by the selected refinement.
Edge Filters
Point filter input used by some refinements
Sanitization Filters
Point filter input used to preserve edges as a sanitization step
Vtx
Endpoints of the output Edges
Edges
Edges associated with the output Vtxs

Table of content


The Cluster Refine node lets you refine connections inside individual clusters, a.k.a Edge pruning.

Refining only removes edges and does not create new ones.

details/edge-refine/edge-refine-lead.png

The filters determine which edge can be pruned. Any filter that doesn’t pass will ensure the edge is preserved.

Properties


Property Description
Settings
Refinement This property lets you select which kind of refinement you want to apply to the input clusters.
Specifics of the instanced module will be available under its inner Settings section, if any.
Output Only Edges As Points If enabled, this node will output edges as raw points, without the usually associated cluster.
This can be significantly faster and less greedy depending on your need for the output edges.

Sanitization

The sanitization property lets you enforce some general conditions within the graph. Note that is applied after the refinement.
Note that this is not mutually exclusive with filters: sanitization happens has a post-process after the “raw” refinement is completed.

Sanitization Description
None No sanitization.
Shortest If a node has no edge left, restore the shortest one.
Longest If a node has no edge left, restore the longest one.
Filters Use per-point filters to ensure edge preservation.

Note that the sanitization options offer no guarantee that the initial interconnectivity will be preserved!


Available Refining modules


🝔 Minimum Spanning Tree

Implementation of Prim’s Minimum Spanning Tree algorithm.

🝔 Remove by Collision

Removes edges by doing linetrace and checking for collisions.

🝔 Remove Overlap

Removes overlapping edges

🝔 Keep Highest Score

Keeps edges with the highest heuristic scores

🝔 Keep by Filter

Keeps edges that pass the input filters.

🝔 Keep Lowest Score

Keeps edges with the lowest heuristic scores

🝔 Remove by Filter

Removes edges that pass the filters

🝔 Remove Highest Score

Removes edges with the highest heuristic scores

🝔 Remove Lowest Score

Removes edges with the lowest heuristic scores

🝔 Keep Longest

Keeps the longest edge of each node

🝔 Keep Shortest

Keeps the shortest edge of each node

🝔 Remove Longest

Removes the longest edge of each node

🝔 Remove Shortest

Removes the shortest edge of each node


Cluster Output Settings

See Working with Clusters.

Property Description
Edge Position If enabled, edge point’ position will be the result of that value used as a lerp between its start and end Vtx point.
Pruning  
Min Vtx Count If enabled, only ouputs clusters that have more ( > ) Vtx than the specified number.
Max Vtx Count If enabled, only ouputs clusters that have less ( < ) Vtx than the specified number.
Min Edge Count If enabled, only ouputs clusters that have more ( > ) Edge than the specified number.
Max Edge Count If enabled, only ouputs clusters that have less ( < ) Edge than the specified number.
Misc  
Refresh Edge Seed If enabled, Edge points gets a fresh seed.
Build and Cache Cluster If enabled, pre-build and cache cluster along with the point data.
This has a slight memory cost associated to it, but can offer tremendous performance improvement.
If disabled, cluster processors that comes down the line have to rebuild clusters from point data, which is very costly as they are also tested for errors and possible disconnections in the process.
Expand Clusters If enabled, also build & cache another layer of cache data.
This can have a significant memory cost, as well as a minimal performance overhead, but can greatly improve certain specific operations down the line.

Available Filters


🝖 Group (AND/OR)

The Group Filter allows setting up complex AND/OR branches.

🝖 Compare (Numeric)

The Numeric Comparison Filter compares the arithmetic value of two attributes

🝖 Compare (String)

The Compare String Filter compares two strings

🝖 Bool

The Bool Filter does a simple bool comparison

🝖 Dot Product

The Dot Product Filter compares the dot product of two direction vectors

🝖 Within Range

The Within Range Filter checks if a value is inside a given range

🝖 Modulo Comparison

The Modulo Comparison Filter compares the module value of two attributes against a third operand

🝖 Bounds

The Bounds Filter check if a point is inside or outside provided bounds

🝖 Bitmask

The Bitmask Filter compares a bitmask against another

🝖 Mean Value

The Mean Value Filter compares per-point values of an attribute against the mean statistical value of that same attribute.

🝖 Self Compare (Numeric)

The Numeric Comparison Filter compares the arithmetic value of two attributes

🝖 Self Compare (String)

The Compare String Filter compares two strings

🝖 Adjacency

Check if adjacent node meet specific conditions

🝖 Edge Direction

Check if adjacent node meet specific conditions

🝖 Neighbors Count

Check a node’ neighbors count