Jump to content

For each primitive I need a point infection system.


Recommended Posts

Hi

I need your help with something. For a project I have a faceted plane and for each facet:

- I scatter some points
- sort the points in x+ direction
- make a group for each point that is point nr. 0
- set infection start for each point that is in that 0 group.

That works all fine! Now here's the problem. When I wire in my for each end into the solver the infection starts spreading correctly but (of course) it infects all it's neighbors even when it's not from the same original primitive.
In an ideal world I would place my solver at the very end of the for each block so that it solves it for each primitive (but that doesn't work sadly) But in theory that's exactly what I need!

Is there someone that can bring me on the right track and solve this for me? My idea is to maybe create a point group for each primitive's scattered points and tell that to the solver somehow? But I have no idea how... 

I've attached the hip file to the thread and want to thank everyone in advance for their reply!



 

For_each_primitive_point_infection_system.hipFetching info...

Link to comment
Share on other sites

  On 1/18/2023 at 5:47 PM, fencer said:
Expand  

 

  On 1/18/2023 at 10:11 PM, Ziyad said:

Alternatively you could store the iteration number from the for-each loop as a point attribute, then use that inside the solver to only infect points with matching iteration number. Hope this helps!   

For_each_primitive_point_infection_system.hiplc 252.92 kB · 2 downloads

Expand  

Thank you so much for both your reply's. These work really well! 

Link to comment
Share on other sites

  On 1/19/2023 at 9:31 AM, ThomasPara said:

You can speed up this solution alot if you get rid of the "foreach" network and dont search for nearby points inside the solver. The iteration-time on your solution will remove any kind of creativity.

For_each_primitive_point_infection_system_solution.hip 236.04 kB · 1 download

Expand  

This is an incredible setup! I've learned a lot from your file. Sometimes I think of ways to do it like that, but then I have just no idea where to start. Thank you so much for this

  • Thanks 1
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...