ICE powers of 10 array


In ICE, how would you generate an array like [1, 10, 100, 1000, 10000, 100000, …] without using a Repeat node ?

It might help to look at it this way:

1
10
100
1000
10000
100000

Once you recognize that you are looking at powers of 10, and recall that the basic Math nodes can handle arrays just as well as single values, the rest follows easily:

Using arrays to avoid Repeat part II


Part I is here

Another building block for using arrays instead of Repeat loops: an array that looks like [0,0,0,0, 1,1,1,1, 2,2,2,2, …].

Again, the trick is to use this array as the indices for Select in Array.

Here’s how to build this kind of array:

Here’s a simple example. I get the positions of the objects in a group, and then use those positions to add points in a point cloud. Basically, I have a group of objects, and an array of vectors (the interpolated array). When I add a point, I take an object position and add a vector to it to get the point position.

In pseudo-code:

For each object in group
      for each vector in array
             Add Point
             Point Position = vector + object position 

If that ICE tree is hard to follow, then it may help to use some attributes to store intermediate values(arrays). That way you can separate out some branches of the tree: