Link Search Menu Expand Document

Filter Ecosystem

Combine multiple filters

The Uber Filter node is a one-stop node for all your filtering needs.


Table of content


PCGEx comes with its own filter ecosystem, that is used by a lot of nodes to check if specific conditions or requirements are met on a node in order to process it. It also has two standalone, very powerful nodes that lets you combine any number of filters in the same spot.

PCGEx’ filter system is slightly slower than the regular filters but saves a LOT of the extra nodes that would be required to achieve the same results.


Filtering Nodes


Uber Filter

Combine multiple filters

Uber Filter (Collection)

Combine multiple filters


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

🝖 Within Range

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

🝖 Dot Product

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

🝖 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


Optimizing

All filters come with a Priority property: that property is used internally to order filters in ascending order.
The default filtering behavior is to exit the test loop as soon as possible, whether it has an OR or AND behavior. Because of that, you should always order the tests that are the most likely to fail first.

Not all filters are created equal, and some can be much more expensive than other to test against. Simple comparisons are cheap, but on the other end a filter like 🝖 Bounds involves various transformations to be accurate.
On the other end, 🝖 Mean Value is a simple comparison but needs to first process all the available values to build statistics; hence there is no way to really compress the bulk of its cost.