Natsura Switch
Conditional branching node. Routes growth to different subgraphs based on attributes, thresholds, or mappings.
The Switch node gates growth flow, acting like an if/else statement for your graph.
- Conditional Routing: Chooses between multiple input graphs based on conditions evaluated per internode.
- State-Driven: Enables logic like "if age > 5, switch to flowering logic".
- Adaptive: Allows recipes to react to their own attributes or environment.
== Concept ==
=== Gating Logic ===
Switch evaluates a list of conditions in order. The first condition that evaluates to true determines which input graph is executed for that specific internode. If no conditions match, the default path is taken.
=== Use Cases ===
- Transitions: Bud to Shoot to Flower.
- Environment: Grow tall in sun, grow wide in shade.
- Variation: Randomly choose between different branch structures.
- Lifecycle Modeling: Manage discrete stages such as vegetative growth, flowering, and senescence.
- Environmental Adaptation: Switch behaviors based on light exposure, proximity, or other signals.
Parameters
Extra Conditions
operation
sepparm#_2
Threshold
Float
Attribute
Condition
Label
Threshold
Attribute
Map
Expression
snippet_condition
sepparm
Related
- Grow Node — Creates the internodes that Switch routes.
- Split Node — Unconditional parallel branching.
- Wrangle Node — Creates attributes for Switch conditions.
- Simulate Node — Processes the procedural graph to generate plant structures.