This tutorial explains the basic usage of Nodi through an example of creating an attractor.
Sphere
to display the Sphere
node as a suggestion. Click on it to add it.
Sphere
node has properties representing its center position and radius. By editing these properties in the Inspector, you can adjust the shape generated by the Sphere node.
Each node has input parameters and output parameters. By connecting the output of one node to the input of another, you can create data flows and perform modeling.
This structure, composed of nodes that hold data and edges that connect the nodes, is called a node graph.
You can check what type of data a node’s input expects and what data is available from its output by hovering your mouse over the input or output sections.
Number Slider
to the node canvas and connect it to the Sphere
node.Sphere
node to a Move
node, you can change the position of the sphere.
The Move
node accepts geometry data to be moved and a vector representing the translation offset. This vector data can also be modified directly in the Inspector.
At this point, you may notice that two spheres are displayed.Sphere
node and the geometry moved by the Move
node are both being displayed.
If you want to hide certain geometry, you can turn off the visibility setting of the node that outputs that geometry.
Square Grid
node to the node canvas.Square Grid
node allows you to create a grid with square cells by specifying its size and the number of divisions in the x and y directions.
The Square Grid
outputs rectangle curves representing each cell and the positional data of the grid’s vertices. This vertex information can be viewed in the Inspector.
By connecting the position data output of the Square Grid
, which represents its vertices, to the translation vector input of the Move
node, you can arrange spheres in a grid pattern.
Construct Point
node.
Next, calculate the distance between the vertex coordinates output from the Square Grid and the attractor’s position using a Distance
node.
Move
node, use a Scale
node. The Scale
node takes the following inputs:
Move
node to the geometry input of the Scale node,Square Grid
to the center position input.
https://github.com/user-attachments/assets/8adb6512-37cb-4f1e-8c19-50ac482adcac
Finally, connect the output of the Distance
node to the scale factor input of the Scale
node. This completes a node graph where the sphere sizes change based on their distance from the attractor’s position.
However, directly inputting the Distance
values into the scale factor would result in values that are too large. To address this, use a Division
node to scale down the Distance
values before connecting them to the Scale
node.
Construct Point
node. However, the attractor’s position is not relative to the grid size, so when the grid size changes, the attractor’s position becomes misaligned.
For example, if the grid size spans X: 0 to 10 and Y: 0 to 10, and the attractor is positioned at (5, 5), it will be perfectly centered on the grid.
Square Grid
node:
Number
nodes.
MDSlider
node.
The MDSlider
node provides a UI for editing 2D values. The values edited in the Inspector always range from 0.0 to 1.0. The actual output from the MDSlider is calculated based on the configured numerical range using the formula:
output = (max - min) * t + min
where t
is the value in the range of 0.0 to 1.0.
By connecting the previously calculated grid size values as inputs to the MDSlider
, the coordinates output from the MDSlider
will always fall within the range of (0.0 to grid size).
Finally, connect the output of the MDSlider
to the input of the Distance
node. This ensures that the attractor’s position is determined relative to the grid size.