Iliad User Documentation
Welcome
Release Notes
Version 0.8
Version 0.7
Version 0.6
Version 0.5
Version 0.4
Version 0.3
Version 0.2
Version 0.1
Installation
User guide
Opening ILIAD
Editing a Texture 2D
Editing a Flipbook
Editing a Static Mesh Texture
Interface and Panels
Viewport
Brush Selector
Top Bar
Color Sliders And Color Selector
Stroke Options
Mesh Selector
Tools
Layer stack
Texture Details
Editor Settings | Preferences
ILIAD Painter Editor
ILIAD Stylus Input
ILIAD Flipbook Editor
ILIAD Texture2D Editor
Keyboard Shortcuts
Customise
Odyssey Brushes
Create an Odyssey Brush
Blueprint basics
Nodes
Events
Stamps
Get
Modifiers
Canvas
Input
Block
Stroke
Block
Get Block Info
Adjust Block
Font Block
Making Block and Rectangle
Blend and Fill Block
Color
Break and Make Odyssey Brush Color
Using Unreal Engine Linear Color
Odyssey Brush Color variable
Get Color Info
Other Color nodes
Transform
Flip
Dimension
Other transform
Matrix
Pivot
Alpha and Blending modes
Math conversions
Variables
Overrides
Optimizations
Order of the nodes
Matrices and Macros
Events and Cache (ILIAD 0.5)
Resampling methods
Nearest Neighbour
Bilinear
Bicubic
Area
Anti Aliasing
Parent
Optimizations
Matrices and Macros
How to use macros and matrices.

Matrices and macros

About matrices

Transform nodes such as "Rotate" or "Resize Uniform" will be calculated separately and step by step. If this solution is alright for simple brushes, this can make the calculation process longer when the brush gets more and more complex.

Contrary to these nodes, Matrix nodes will proceed with all changes "at once", thanks to a detailled list of actions. (See the lesson about "Matrix" nodes to know more about them.)

Thanks to matrices, you have then the possibility to create macros.

About macros

Using macros has two advantages. First, they make Blueprints easier to read; second, they can be re-used a multiple times, which makes the conception process faster.

If we look at the default brush "Cartoon Bush", its blueprint uses two nodes "Stamp", and both use the same macro "Resize and Rotate in One Transform". Plus, other macros are in use to alter X / Y coordinates and convert Linear Color into Odyssey Color. (All macros are highlighted in the screenshot below.)

If we double click on the macro "Resize Uniform and Rotate in One Transform" to open it, we can see the brush requires several input, to be connected to "Make Rotation Matrix" and "Make Scale Matrix".

How to create a macro for Odyssey Brushes ?

In the Content Browser, make a right click and click on "Blueprint" > "Blueprint Macro Library". Then, look for "All classes" at the bottom, and search for "Odyssey Brush Asset Base".

Give this asset a name and double click to open it.

Do not forget to give a name to the macro, as the asset can contain several macros.

Adding input and output

Depending on what your trying to achieve, you might need different input that will require either a variable or another node in the Odyssey Brush Blueprint, but in the case this macro will transform your sample, you will need an input and an output "Odyssey Block Reference".

Click on the tiny "+" in the detail panel, next to "Input" :

Just like you would proceed with variables, add an "Odyssey Block Reference". Then, repeat the process on the output.

Then, create an input "Odyssey Brush Reference" to keep the context of the macro. You can now create as many nodes as you need to create your macro. If necessary, you can add other input and output to your macro.

Once your macro is done, save it, go back the Odyssey Brush Blueprint, make a right click and enter the name of your macro to add it. In this example, our macro's name is "Random Scale & Rotation" :

Connect your macro to the node Stamp (input Block) and, if necesary, add nodes and variables to be connected. In the example below, our macro requires a float "Size Variation" and its return value is connected to the node "Fill Block with Color".

Compile the Blueprint and test your brush. In this example, the width and height of the stamp change randomly according to the Size modifier and a float value. Plus, the angle changes randomly on 360°.

If you edit your macro, do not forget to save and recompile the Odyssey Brush Blueprint to make sure all modifications have been taken into account.

In this example, we used a macro to proceed with several transforms in once, thanks to Matrix nodes. However, macros can also be used for other purposes without matrices, such as color changes, modifying the pivot point, etc. Feel free to study ILIAD default brushes to know more about the possibilities offered by macros.