# Animation Nodes: Object Instancer | Update instances & Splines from object origin

Experimenting again with animation nodes, I'd like my scene like:

1. Have a cube in the center which I can copy n times with the Object Instancer node

2. The cube has a Modifier (Wireframe) and its rotation keyframed

3. Make the relationship lines from the cube to its instances visible by splines

4. Update the instances when Modifier and rotation of the source cube change

I have problems with getting 3. and 4. working:

• I managed to make splines between the instances visible but not from the source cube origin to its instances (like the relationship lines in the viewport. How should I do that?
• The changed and animated value from the source cubes Wireframe Modifier are not applied to its instances "on the fly". Same goes for the rotation. I added 2 Triggers in the Toolpanel for the Node editor which do not have an effect. What do I miss here?

Any help appreciated :-)

# Relationship Splines

Create edges using the Create Edges Node from a list filled with the location of the source object and the locations of the instanced objects, then use the Splines From Edges node to create splines from the edges, output the splines and you will have the relationship lines.

# Instances Modifier Values

To understand why your values don't update, you have to understand how the Object Instancer Node works. By default (When only Copy From Source option is enabled) Animation Nodes create a number of empty objects equal to the number of instances and set their mesh to the mesh of the source object. Subsequently, non of the object properties (including modifiers and constraints) are retained, simply because object are created not copied. If Copy Full Object option is enabled, Animation Nodes will get the object's properties, modifiers and constraints from the source object and set them to the instances.

It is important to note, however, that Animation Nodes will first check the objects that were created in a previous execution using the instancer node and if they matched the number of required objects, the node have no effect and just return the objects. If the number of objects were less than the required amount, it will create more and if they were more that the required amount, it will delete the extra. So even if you change any of the object properties or set different meshes, the node won't see the changes and won't take action. The only way to reset the properties is to set the number of instances to zero and set them back to the required amount.

So, to edit the values on realtime, you have to do that manually using the Attribute Nodes, that is, get the value of the property of the source and set it to the instances.

In the previous example, we set the thickness of the modifier modifiers["Wireframe"].thickness.

• Thank you so much for your detailed explanation, this is exactly what I did miss/not understand before. – ho.s May 12 '18 at 19:29