# Create an object at each vector in a list in Sverchok?

If I have a list of vectors, is it possible to create an object (e.g. a cube) centred on each vector in the list, using Sverchok? If so, how can this be done?

There is a lot of steps to make this happen, but it is pretty simple, so here it goes:

1. Make sure that you put your list in a .txt file - for this example call it PointList.txt, and it will use the CSV format.

2. Load this file into Blender.
Note: In this format every line in the file is one point location in X,Y,Z:

3. In the 3D Viewport Add a Cube - Shift+A >> Mesh >> Cube.

4. In the Node Editor Add a Text Input Node - Shift+A >> Text >> Text in.

5. Set your Text Input Node to have the following settings & Click Load:

Csv, User defined Dialect, "," Delimiter, "." Decimalmark

6. Next Add a Vectors In Node - Shift+A >> Vector >> Vector in and connect your Text Input Node to like the following:

Col 0 -> X, Col 1 -> Y, Col 2 -> Z

7. Next Add a Matrix In Node - Shift+A >> Matrix >> Matrix in and connect your Vectors Output of your Vectors In Node to Matrix In Node at its Location socket:

8. Next Add a Sv Instancer Node - Shift+A >> Scene >> Mesh instancer. Then ensure that your Object Name is set to the name of the Cube that you added in Step 3. above, click "use" and connect the two Matrix Sockets between the Nodes like the following:

Result:

To help you convert your data format, here is a screenshot of how to convert the format that you have shown in your comment:

• Hrm... this totally doesn't work for me. I don't know why. The output of Vectors In (using a stethoscope is [[(0,0,0), (5,0,0),... ]]1. I have the cube at the origin. I see some alpha objects in the outliner view, but not in the 3D view.. Commented Mar 25, 2016 at 9:34
• Oooh, cool, I found another way to do it. Cube -> Object In -> Viewer Draw, and then route the matrix to the Viewer Draw as well. i.e. not using an instancer node. Commented Mar 25, 2016 at 10:30
• Hrm.. I think I would like to get the instancer working though - it seems like your method generates actual blender objects, where the viewer-draw method just generates Sverchok "Ghosts", which have to be baked before they can be rendered... Commented Mar 26, 2016 at 0:26
• @naught101 - Look at the end of my answer, as it will help you get your data points converted to the "CSV" format of my answer. Commented Mar 26, 2016 at 23:43
• That wasn't the problem (If you put a stethoscope after your vectors in, you'll see the format is correct). I have no idea why it wasn't working, but I just re-did it from scratch, and it worked this time... Commented Mar 27, 2016 at 3:57

You just wanted to have instance duplications?

I usually use Viewer Draw to see the preview. And the "Matrix" input is what you want to use for this.

Provide the Mesh Data and the Matrix (transform) will be where the duplication or instances will be placed. If you have list of Vectors already, whether it is via Text Input or being generated using another node, you just plug in the Vector List into the Matrix In.

If you want "real objects" in 3D View right away, you can use BMesh MK2 Viewer node. That will generate actual objects.