Voxel Plugin
1.2 Legacy
1.2 Legacy
  • Getting Started
    • Quick Start
      • Examples
    • World Generation
      • C++ World Generators
      • Voxel Graph Quick Start
      • Floating Islands
  • Core Systems
    • VoxelWorlds
      • Import Content
      • Voxel Data Items
      • Collisions and Navmesh
      • World Size and Level Of Details
      • Save and Load
      • Multiplayer
      • Easy Systems RPG
    • Voxel Graphs
      • Voxel Graph General Concepts
      • Voxel Graphs Tips and Tricks
      • Voxel Graph Nodes Reference
      • Voxel Graph Outputs
      • Voxel Graph Parameters
      • Custom Graph Nodes
    • Voxel Spawners
    • Materials
      • Multi Index Materials
  • Technical Notes
    • Performance and Profiling
    • Console Commands
    • Blueprint API
    • Release Notes
      • Release Notes 1.1
      • Release Notes 1.2
    • UE5.1 - Material Crash
Powered by GitBook
On this page
  • Function Separator
  • Flow Merge

Was this helpful?

  1. Core Systems
  2. Voxel Graphs

Voxel Graph Nodes Reference

PreviousVoxel Graphs Tips and TricksNextVoxel Graph Outputs

Last updated 1 year ago

Was this helpful?

Function Separator

You only need to use this node when the plugin asks you to through an error. See for more info.

Flow Merge

The flow merge node allows to do nice stuff like computing only one input of a lerp if the alpha is 0 or 1:

One could think it's easy to implement: just need to check from which exec we are coming, and use the corresponding value. However, consider the following case:

Depending on whether or not the bottom branch was taken, Expensive stuff needs to be recomputed.

To solve that, flow merge nodes are replaced in a graph compilation pass, and expanded like in the following:

Here when executing the Set Color node it knows which data is already computed, and which it needs to compute.

So in short, a flow merge node duplicates everything that's after it.

However, consider the following graph:

The Set Color node will be duplicated 2 to the power of 4 = 16 times. If you have 10 flow merge nodes following each others (which happens quite often), you end up with 1024 duplications. This leads to exponential file size and compilation times.

To solve that, you can add a function separator:

This will translate to something like that:

Do not worry, if a node is duplicated too many times the plugin will warn you!

Flow Merge