Jump to content

How to keep track of points with changing point number (add)


Recommended Posts

Hello people of Houdini!


I am having a problem and I am struggling to find a solution. I simulated some points, they start of as a small number and accumulate over time. Now, I want each point to have a unique point number. Normally, when dealing with a changing point number, I create an ID attribute at frame one. But so far, I have only ever encountered scenarios where the points got less and less over time, not more and more. I am not sure how to approach this and it is driving me crazy. I don't really want to resimulate my points and turn off the spawning over time, but I need to keep track of which point is which. 

If someone has an answer to this issue, I am super grateful for any input. 

Thank you so much in advance!

Link to comment
Share on other sites

Could you reverse your sim and write the IDs from the last frame all the way through to the first frame. Save that to disk and reverse it again when you read it back in. That should give you consistent IDs.

-b

Link to comment
Share on other sites

1 hour ago, bonsak said:

Could you reverse your sim and write the IDs from the last frame all the way through to the first frame. Save that to disk and reverse it again when you read it back in. That should give you consistent IDs.

-b

Yes, I could. It is a bit painful but defiantly an idea :) thank you!

Link to comment
Share on other sites

  • 3 years later...
On 16/06/2018 at 9:06 PM, bonsak said:

Could you reverse your sim and write the IDs from the last frame all the way through to the first frame. Save that to disk and reverse it again when you read it back in. That should give you consistent IDs.

-b

can you explain how would I go about doing this ? took the last frame and added ids, but could not figure out how to copy these ids to interpolating geometry, something to do with a solver sop no ?

cheers!

Edited by ZMARDINI
Link to comment
Share on other sites

I typically turn off reaping, which is what reuses point numbers and gums things up. This means all your particles will never die, and have a unique ID, assuming there is no point replication taking place. This doesn't invalidate the @dead attribute. So I let particles spawn, then after the popnet run a wrangle to remove any dead ones.

  • Like 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...