4
$\begingroup$

I'm trying to figure out how I can create an array of objects where each instance has an increasing number instances of that starting object. A simple example:

1 cube 2 cubes (to the right and stacked on top of eachother) 4 cubes (to the right of the 2 cubes and also stacked) 8 cubes 16 cubes and so on...

This continues for x number of instances.

I tried the array modifier with very little luck and also the replicator in animation nodes.

Does anyone know how to achieve this? Help would be much appreciated.

$\endgroup$

2 Answers 2

4
$\begingroup$

Thanks to some help from Jaque Luke (see this post here Animation Nodes: How to unzip a list) I found a slightly different solution: I'm using the Object Instancer, which you can now feed in any Object you like, and first compose a list of target positioning vectors. Then I loop over the list length of those vectors and apply the locations to each Object Instance. A Blend file is here:

The starting point takes a few parameters, allowing you to choose what the distances should be, and also on which column to start. Also, you can pick the object from here:

start

Next, I'm generating the Columns, and also calculate how many rows each column will have:

step 2

I feed that into an extra Sub-Loop to generate the Vectors finally for each column:

column vectors

This however generates a list of a bunch of vectors lists:

lists

To decompose them, I've used the Expression node in this setup:

decompose

Now, all I needed to do was to get the length of this list and use it as a number of iterations for the loop. I loop over each list item (each item is a vector, i.e. the new location of the object), and set the vector accordingly:

final loop

and the result is:

result

$\endgroup$
3
  • $\begingroup$ Hi and sorry for my late reply. (too busy lately) $\endgroup$
    – michaelh
    Aug 14, 2016 at 12:33
  • $\begingroup$ Thank you very much. This is exactly what I was looking for. I understand the overall concept of how you did it. But I'm still trying to understand the details of it. Regardless, this helps a lot! Thanks for the effort! Cheers $\endgroup$
    – michaelh
    Aug 14, 2016 at 12:41
  • $\begingroup$ Got it! Nice out-of-the-box thinking! $\endgroup$
    – michaelh
    Aug 14, 2016 at 12:49
3
$\begingroup$

I tried to find a workaround for this problem,I found one which is not really good,but should be working fine,Using animation nodes.

The Idea is to generate a set of points in the first quadrant,then exclude all the points that are inside of the parabola (x^2 curve) using a loop with a condition. Then there is the loop that put the object it the list that is left with us.

Here is the node tree:

Node tree

And here is the result:

Results

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .