Order of the Nodes

As a nodal-based system, Odyssey Brushes proceed with a calculation before rendering a result. Each node is read and processed one by one, and if you don’t pay attention, you can easily lose performances.

As an example, let’s imagine you want your stamp to give a specific color to your stamp, rotate it depending on the direction angle of your stroke, and connect the size to “Get Size Modifier”.

You decide then to create an Odyssey Brush that looks like this:

../../_images/odysseybrush-optimization-order-bad.png

If you use the corresponding nodes in that order, the following process will occur:

../../_images/odysseybrush-optimization-order-bad-explanation.png

This order might cause some slowdown, because Fill Block with Color must be applied at each step. Plus, since a stamp must always be placed in a block, if the stamp gets rotated, the block will be virtually bigger in order to include the whole stamp. Therefore, resizing the brush might create errors, as the block will vary depending on the rotation. Here is the result of this “bad” Blueprint:

../../_images/odysseybrush-optimization-order-bad-result.png

You notice the size of the stamp will change because of the rotation.

To optimize the brush - and have a proper result - it is necessary to rearrange the nodes :

../../_images/odysseybrush-optimization-order-good.png

With this arrangement, the Blueprint will immediately reduce the size (which will reduce the number of pixels to manage), then apply the rotation based on a stamp that already has the right size (resampling the block won’t affect the result, contrary to the bad method) and the filling the block with color will be finally applied at the very end of the process.

../../_images/odysseybrush-optimization-order-good-explanation.png

If we test the brush, we can see there is no longer any issues.

../../_images/odysseybrush-optimization-order-good-result.png