Math Boolean implements Ken Perlin's "soft" or "fuzzy" boolean operators. Unlike standard logical nodes that return a binary 0 or 1 (False/True), this node treats input values as continuous probabilities or degrees of membership in the [0, 1] range. This allows you to perform logical operations like Intersection, Union, and Difference on smooth gradients and textures without losing their softness or anti-aliasing.
Usage & Behavior
This node is essential for procedurally combining masks. Because it works on Vectors, it can handle three separate masks (X, Y, Z) simultaneously. It is mathematically superior to simply multiplying or adding textures because it preserves the correct probability volume (e.g., Union avoids "over-bright" artifacts that occur when simply adding two overlapping gradients).
Key Features
- Fuzzy Logic: Handles smooth gradients gracefully without hard clipping.
- Vector Support: Processes RGB/XYZ channels in parallel.
- 4 Modes: Covers all essential set theory operations.
Deep Dive: Fuzzy vs. Hard Logic
In standard boolean logic, 0.5 AND 0.5 often rounds to 1 AND 1 = 1. In Fuzzy logic, it represents probability.
- Intersection (A * B): Probability that both A and B are true.
- Union (A + B - A*B): Probability that either A or B is true. Unlike a simple "Add", this prevents values from exceeding 1.0 if both inputs are valid.
- Difference (A * (1 - B)): Probability that A is true AND B is false.
- Complement (1 - A): Probability that A is false.
Parameters
- INTERSECTION: Returns elements common to both inputs (AND). Visually, this keeps only the overlapping area.
- UNION: Returns elements present in either input (OR). Visually, this merges shapes together.
- DIFFERENCE: Returns elements from Input 1 that are NOT in Input 2 (SUBTRACT). Visually, this cuts Input 2 out of Input 1.
- COMPLEMENT: Returns the inverse of Input 1 (NOT). Input 2 is ignored.
Quick Recipes
Common logic setups.
Mask Cutout
- Mode DIFFERENCE
- Input 1 Base Shape
- Input 2 Cutout Shape
Merge Maps
- Mode UNION
- Input 1 Dirt Mask
- Input 2 Scratch Mask
Smart Invert
- Mode COMPLEMENT
- Input 1 Texture
