Expertise
Not Specified
Location
Not Specified
Website

## Recent Forum Posts

#### For Each Loop with Voronoi? (copy random pieces onto scattered points)March 7, 2018, 10:19 p.m.

something clicked, thanks a lot!

#### For Each Loop with Voronoi? (copy random pieces onto scattered points)March 7, 2018, 10:56 a.m.

wow thanks a lot Jim!

If you don't mind can you explain further the expression you used here?

fit01(rand(detail(“../meta”,“iteration”,0)),0,12)

is fit01 used to fit to a range?

what is the importance of fetching the # of iterations from the other loop? the number isn't directly used to calculate the random number between 0 and 12, right? That's what the 0,12) part at the end is for?
so is that part used for telling houdini to repeat the copy every time the other for each loop goes through one iteration?

#### For Each Loop with Voronoi? (copy random pieces onto scattered points)March 6, 2018, 11:25 a.m.

Hello everyone,

newbie here I hope you can help me out! I'm trying to copy a different, random piece from a voronoi onto scattered points

I tried following the for each copy tutorial (http://www.sidefx.com/docs/houdini/copy/tutorial_stamping.html) but it doesn't quite apply to what I am trying to do. it says the for each loop is set up to deal with pieces so I figured what I am trying to do should work since voronoi is generating pieces too?

I hit somewhat of a wall, hope someone here can guide me in the right direction.

what I think I should do / need to do is:

1) generate the pieces (using voronoi)
2) generate points to copy pieces to (using a scatter)
3) set up a copy to copy a random piece, not the whole thing (not sure how)
4) every piece needs a number so I can randomly draw one of those numbers to copy the piece (create point or primitive attribute? is that built into the voronoi group outputs? does houdini already do this for me?)

have a good day everyone, I attached the scene file, hope someone can help.