Skip to content

Voxel Graph Nodes Reference

Function Separator

You only need to use this node when the plugin asks you to through an error. See Flow Merge 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:

Image

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:

Image

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:

Image

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:

Image

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:

Image

This will translate to something like that:

Image

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

Image