image.png

When I started learning Houdini, this loop node confused me. It was created not through the tab menu but through an added button on the loop block. It also doesn’t contain or manipulate any geometry inside.

However, understanding the metadata loop SOP is the key to unlocking perfect randomization per loop. With it, you can use the iteration attributes it outputs as seed values for offsets, seeds, whatever you need to drive randomization.

The metadata node stores these three detail attributes:

Screenshot 2025-01-17 174440.png

It updates these values based on which iteration the loop is working on. This is extremely powerful because these changing numbers can be used in seed attributes for random functions (or anything else you need).

For example, I can randomize how far I transform a sphere in a loop by feeding the iteration value into a rand() function:

int iteration = detail(1, "iteration", 0);
[email protected] += fit01(rand(iteration),0, 2);

Screenshot 2025-01-17 175108.png

Or simply increase the height of each sphere based on its iteration: