What is an Instance?
An instance is the reference to an existing object. This object exists only once.
An instance is therefore comparable to the Duplicate Linked function.
- The advantage of this: The resource consumption remains low, because the geometry exists only once.
- The disadvantage of this: The instances all look the same, because the geometry exists only once.
What does the 'Instance on Points' Node do?
So the node Instance on Points
creates multiple references of the given object at the given positions.
Before that happens, the given object is converted to an instance, unless an instance is passed directly.
Unfortunately, when using the node, it is not possible to use procedurally created objects with different values per point. The object is created once, then transformed into an instance and moved to the desired position.
Ergo: One and the same object is always used per point, no matter what additional parameters are fed into the procedural node group.
(Instantiation of an object in a 3x3 grid)
The instances created in this way can then only be transformed (for example with Transform Instances
, Rotate Instances
and Scale Instances
, but also with Set Position
).
However, it is no longer possible to change the parameters as they were available at the time the object was created.
But if a change of the individual points of such an instance is subsequently necessary or desired, these instances can also be converted back into a mesh.
This is done with the node Realize Instances
. However, it is not possible to selectively convert a single object, but all instances are always converted.
Note: If the originally instantiated objects were curves or points, they will be available again afterwards as individual curves or points.
In this way, individual parts of the geometry can be edited afterwards, which can be quite sufficient in some simpler situations, but is not purposeful in the case of complex node groups with individual parameters.
But how can procedurally created Objects be used?
This question can be answered currently only partially satisfactorily, since the node does not permit as mentioned a parameterization of individual objects when instantiating, and on the other hand also no loop node exists.
But: The node Instance on Points
can process also several instances instead of a single instance!
This is made possible by simply supplying several instances instead of a single instance at the input Instance and additionally selecting the option Pick Instance.
(Instantiation of multiple instances with the option Pick Instance)
In order to be able to individually select the objects/geometries to be instantiated, they must be collectively transformed into selectable instances. This is done with the node Geometry to Instance
:
However, the indices and the order of the provided objects are important:
For example, if the number of provided objects is 2, and the number of points at which to instantiate is 9, the following object are chosen:
- 0,1,0,1,0,1,0,1,0 (index always starts counting at 0)
- or as seen in this example A,B,A,B,A,B,A,B,A.
This order is of course maintained for more than 9 objects and repeated accordingly.
The situation is different, if a variable value is also used for Instance Index. Then exactly that object is always selected for instantiation whose index matches the value passed:
To the Point
In plain language this means:
The currently only available "workaround" therefore means that each variation of the object created with the procedural node group must first be created, because only then can be selected from several objects in the first place!
There are two possibilities:
- Either one creates the variations within Geometry Nodes
- Or you use a Collection which contains the variations
Using Geometry Nodes
Here, the required number of objects with different seed values is created before instantiation, then collected with Geometry to Instance
and then passed to the node Instance on Points
.
Using a collection
Here the objects are in a Collection and each has the node group with its own seed values added as Geometry Nodes modifiers. Using Collection Info
this collection is read and passed directly for instantiation.
It is important here that the Separate Children option is enabled!
Note that the order mentioned before is equal to the index of the instance and this order is determined by the name of the object, because the sorting is alphabetical here!
If the examples shown above are then visualized, the whole thing looks like this:
Creation of procedurally generated objects instantiated at different points with Geometry Nodes.
Or if you then add a higher density and random values for scaling and rotation, it can already look like this with nine different variants:
Update for Blender 4.0+
Since Blender 4.0 there are Repeat Zones, which are comparable to a For-Loop.
A new instance of the procedural node group is created for each loop and individual parameters can be used for each run.
A solution for this could look like this:
Here I use the number of points of the grid for the number of loops/iterations. The node group in this example has an input for Seed. In the first run, I use the value $0$ for this and with each subsequent run, this value is filled with a new random value between $0$ and $100$. Of course, there are different ways of generating these values per run, but how you set this up also depends on your procedural node group and which parameters you need here.
After the geometry has been created by the procedural node group, I convert it into an instance and add it to the existing geometry (which is empty at the beginning). At the output of the Repeat Zone, this geometry contains various instances that can be used directly with Instance on Points
(Pick Instance must be activated).