Jump to content

Setup Stop Conditions on For Each Loop node


demileto

Recommended Posts

Hi,

I want to setup a stop condition on For Each Loop node to work more like a "While Loop" way, (do the loop until a condition change); but I can't get to work with an attribute that dynamically updates inside the loop (as would work on VEX).

7f01a8116e1aae8eeeadd0d6a6cab564.png


A bit of context:
Basically what I want is that dynamically and randomly, Houdini creates a bunch of lines connecting some points under certain rules.

Here's a kind of algorithm.

72b2917e129ddba94a87685566e6896b.png
The idea is to repeat this, to draw N random lines that I want.

I have pretty much of the job done, but there are two key moments when I need this "While loop".
The first of them is to limit the amount of Orange Points connected before connects Pink Point, and this would be doing the loop only until the distance between the last Orange point and the Pink Point be less than N float number.
The second, is to serve as amount of lines to draw; do the loop until N lines are actually drawn.

For accomplish this, I created two detail attributes that updates inside the loops but I can't get to set them as Stop Conditions for Loops

 

I found this thread on this forum but i don't know how to implement that on my workflow

I upload the hip file

I'll appreciate any help.

test_lines_AtoB 3.hip

Edited by demileto
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...