Load the project Double_Border.pxf.
This project applies a two color border to an image and it contains all the necessary nodes to be reused in other projects:
The Attributes node defines 3 attributes: The size of the borders and the colors of the two borders.
The Gradient node.
The Image IO inside the Inputs Node Frame defines the input of the reusable node.
The Image IO inside the Outputs Node Frame defines the output of the reusable node.
The nodes inside the Body of the Algorithm Node Frame define the body of the custom node: The Border nodes. Their exposed attributes are fed by the Attributes Node. Left Click on node to expose its attributes.
This project is saved in a file Double_Border.pxf.
This Double_Border node applies the two borders to the image with the border size and colors defined in the attributes of the Node Graph node.
You will now modify the Double_Border.pxf project to add more borders to the image using multiple loops. Each border will be one size larger than the previous border.
In a new project create a new Reader node with an image and a new Node Graph node. Load the DoubleBorderLoop.pxf project in this node.
Increase the number of iterations in the DoubleBorderLoop node.
There is something wrong. The DoubleBorderLoop node is not applying multiple borders, instead it is creating a larger border.
This happens because by default the Node Graph node applies the same node graph to the same input image, and each iteration makes the border larger.
To fix the effect you need to tell the Node Graph node that the new border has to be applied to image generated in the previous loop.
Load the DoubleBorderLoop.pxf project.
In a new project create a new Reader node with an image and a new Node Graph node. Load the DoubleBorderLoop.pxf project in this node.
Increase the number of iterations in the DoubleBorderLoop node.
Now that you have a node graph project that can be reused, you can create a new custom node and use it in PixaFlux as any other node.
Note: If you installed PixaFlux in the Program Files directory you'll need Administrator access to add the new files to the PixaFlux program directory. This tutorial assumes that PixaFlux was installed in:
c:\Program Files\PixaFlux
Create a new DoubleBorder directory in (PixaFlux)/Resources/Nodes:
C:\Program Files\PixaFlux\Resources\Nodes\DoubleBorder
Create a new info.txt file in the DoubleBorder directory:
C:\Program Files\PixaFlux\Resources\Nodes\DoubleBorder\info.txt
Visit Online GUID Generator and generate a new guid. For example:
6c538cf4-abaf-473e-9ece-e54816b7eb8e
Leave only two 8 hex digit strings:
6c538cf4 abaf473e
Add the 0x hexadecimal number prefix:
0x6c538cf4 0xabaf473e
And copy this hexadecimal identifier to info.txt as the Type:
Type: 0x6c538cf4 0xabaf473e
Add the project file, node name and node group to the file.
Type: 0x6c538cf4 0xabaf473e
Project: Double_Border.pxf
Name: Double Border
Group: Layout
Copy the Double_Border.pxf file to the Resources\Nodes directory.
C:\Program Files\PixaFlux\Resources\Nodes\DoubleBorder\Double_Border.pxf
Create the new icons for the Double Border node and save them to the Resources\Nodes directory, or copy these ones:
Nodes Menu icon. 24 x 24 Pixels:
Node Graph icon. 12 x 12 Pixels:
This are the final directory contents:
Now restart PixaFlux and look for the new Double Border node in the Layout node group:
Create a new Double Border node and connect it to the output of an image node.
Edit the attributes.