foreach sop help

   1852   2   1
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
im trying to use a foreach to build one volume, but i dont know how to get it to use the results of the last iteration in the current one. i know how to do this in a solver over time, but i need to do this on every frame.

in the hip ive attached, im trying to get foreach1 to return only 1 volume, with all of the boxes sampled into it.

thanks

Attachments:
foreachvolhelp.hipnc (95.0 KB)

.
User Avatar
Member
789 posts
Joined: April 2020
Offline
I did not get a change to look at your file, but I have attached an example that uses the volume that was the result of the previous iteration in the current one.

The trick is the “merge results” toggle on the foreach sop. With this on, each iteration gets the same original input, while turning this off provides a feedback loop, the result of the current interation is the input to the next.

Hope that helps.

Koen

Attachments:
fracture.hipnc (141.3 KB)

User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
yeah this helps a lot, thank you!
.
  • Quick Links