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
Available Filters
🝖 Modulo Comparison
The Modulo Comparison Filter compares the module value of two attributes against a third operand
🝖 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
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.