Static Unique Point ID on Changing Topology?

   9988   8   2
User Avatar
Member
271 posts
Joined: March 2012
Offline
Hi all,
I've been trying to do something that involves a Solver SOP and changing topology and point count of a model. Now, I ran into issues as soon as my point count changed, as there are a bunch of wrangle nodes that do stuff based on stored point numbers.
So, is there are unique ID that I can use instead of point number? Something that remains constant, regardless of changing geometry?

tldr: When point count changed, it messes up stuff I've done (because it's based on stored point numbers). Is there an alternative that remains constant?
User Avatar
Member
2540 posts
Joined: June 2008
Offline
You could try sorting your points which might let your existing setup continue to work as long as the count is always going up.

Otherwise you may be faced with re-writing how your configuration works.

You may want to consider operating on groups of points that way if a point ends up in a group it is a valid candidate for an operation no matter what it's point id is.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
271 posts
Joined: March 2012
Offline
Enivob
You could try sorting your points which might let your existing setup continue to work as long as the count is always going up.

Unfortunately the point count is always going down in this particular case. I'm trying to store the original point number in an attribute.

Also, the group method wont work as I'm matching pairs of points one another. So each store the point ID of the other.

Things just got a lot more complicated
User Avatar
Member
271 posts
Joined: March 2012
Offline
…so, I guess what I need to know how to do is: how do I make a point, on dynamic geometry, contain a reference to another point?
User Avatar
Member
2540 posts
Joined: June 2008
Offline
If you describe your original “something”, that task you are trying to solve, that might help. There may be another approach to solving this problem.

Otherwise you are faced with a custom code task, right? Say you get a point to track another point, what happens to that point's association when the point count goes down? What happens in your system at that time? What value does the point have when the point it is referencing no longer exists?

You could scatter points within the geometry and then you always control the point count no matter what the shape of the geometry. Open up the point cloud under code to review locations and make associations as needed for your “something” goal.

I think groups could still work as well. Also colorizing points is a way to reference them. Say your master point has a color of red and the seeking points are all colored blue. You could group on red and blue. If one group is empty then you know you have no more points to match against.

More than likely your original setup is not Houdini-centric? Perhaps you used a similar technique in another 3D app and are trying to port it over and that is causing the problem.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
I often start my networks by adding an attribute which stores the original id's in an attribute, then just reference that instead. Try this:

Add a point wrangle at the beginning of your network
Set this in the code snippet:

i@origid = @ptnum;

Then reference i@origid instead

Does that work?
-G
User Avatar
Member
271 posts
Joined: March 2012
Offline
grayOlorin
I often start my networks by adding an attribute which stores the original id's in an attribute, then just reference that instead. Try this:

Add a point wrangle at the beginning of your network
Set this in the code snippet:

i@origid = @ptnum;

Then reference i@origid instead

Does that work?

Yes, this is what I did in the end. Although it was a little more complex as I'm trying to keep track of points that are dynamically paired.
So a point will contain an attribute to it's paired partner stored oriiginal point ID (id). To find the stored point ID I had to use the following function:
int id = findattribval(0, “point”, “id”, i@paired_pt);

Which seems to work well
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Well done! The find attribute Val functions are pretty useful for sure!
-G
User Avatar
Member
271 posts
Joined: March 2012
Offline
Just wanted to also say thank you to Enivob. I'd be really screwed if it wasn't for folks on here and odforce.

My current issue is matching pairs of points, over here: https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=42928 [sidefx.com]

Thanks again to all who posted
  • Quick Links