Categories
Blender

Add a Distance Parameter for Multiple Instances in Geometry Nodes in Blender

In this tutorial, we are going to set up a parameter for the Distance between instance objects. We already have set up the number of instance objects and the size of the grid which can change the distance between the instance objects. But, in this tutorial, we are going to make distance a parameter but also keep the number of vertices affecting the size of grid. Blender version 2.93 is used.

In this tutorial, we are going to set up a parameter for the Distance between instance objects. We already have set up the number of instance objects and the size of the grid which can change the distance between the instance objects. But, in this tutorial, we are going to make distance a parameter but also keep the number of vertices affecting the size of grid. Blender version 2.93 is used.

Link for the previous tutorial: Instance objects using a grid in this tutorial.

Note that, essentially, size of the grid changes the distance between instance objects along a single axis.

From the previous tutorial, the Vertices (X and Y) parameters of the Group Input node are going to the Size and Vertices input of the Grid node. Because of this, the distance between instance objects and the number of instance objects can be changed by only one parameter, i.e. Vertices X and Vertices Y of the Group Input.

So, we need two parameters:

  • A parameter, that will change the number of instance objects and the size of grid, which is being done by Vertices (X and Y) parameter. This has been covered in the previous tutorial.
  • A parameter that will change the distance between instance objects.

We add another parameter, Distance. The Distance parameter would not directly connect to the Size input of the grid. Rather, first it will be multiplied by the number of vertices and then connect to the Size input of grid. By using this method, we can change the size with changing number of instance objects and change the distance as appropriate.

Multiplying Vertices with Distance using Math node

Add a Math node by clicking Add > Utilities > Math. Change the operation to Multiply. Select and hold any one input value of Math node and connect it to the blank parameter of the Group Input. Press N and change the name of parameter to Distance X.

First, we will be doing the setting for X axis. Connect Vertices X to one input of new Math (Multiply) node. And the other one will be Distance X. Finally, connect the output value of the Math node to the Size X input of Grid.

Repeat the same procedure for Y axis.

Now, we can change the distance and vertices.

In the next part, we are going to change the instance origin.

Change the instance origin using Geometry nodes.

Further next parts for the tutorial:

  1. Combine nodes into a group.
  2. Adjust the distance between vertices or instance objects.

Move Camera in Blender Ice-Cream cone in Blender Make Random numbers in Excel Earthquake animation in Blender Filter using Slicer in Excel