Hi all,
I'm hoping someone can share some ideas/techniques on how to maintain a point's ID as the group it belongs to grows in number.
I've attached a simple example - in essence, using a delete SOP, I am deleting all the points of a group that aren't selected by an animated bounding object.
Is it possible to force the points to keep their initial ID numbers? You'll see in my example the IDs change per frame.
Eventually I want to export this to Maya to use for instancing… if the IDs continually change, then I can't instance animated objects.
Thanks for any input!
Help with freezing point IDs?
4147 4 1-
- etudenc
- Member
- 15 posts
- Joined: July 2010
- Offline
-
- tmdag
- Member
- 168 posts
- Joined:
- Offline
-
- etudenc
- Member
- 15 posts
- Joined: July 2010
- Offline
tmdag
You cannot maintain point numbers (You cannot have point no. 0, 2, 4 without 1, 3 etc) but You could create an attribute let say ‘id’ where you would copy your initial point numbers $PT and then operate with id attribute
Thanks for the reply, tmdag. Actually I am not trying to skip point numbers - I just want point 1 to stay point 1, no matter what gets added or subtracted from the group.
With your solution, I'm not clear on how to copy the point numbers to the new ones. I assume I'd use an attr create sop and then an attr transfer sop… is that right?
Thanks!
-
- tmdag
- Member
- 168 posts
- Joined:
- Offline
I know that you are not trying to skip point numbers but if for eg. point number “0” is deleted, then other point need to get that “0” number - that is why point numbers changes. So I have suggested creating some attribute where you could store your point numbers.
after your scatter, put ‘add attribute’ node, name it for eg. “my_id” (could be anything, it doesn't matter at this stage), in value put $PT.
After your delete sop you can still access your “my_id” attribute with original point numbers and based on that attribute perform other operations.
after your scatter, put ‘add attribute’ node, name it for eg. “my_id” (could be anything, it doesn't matter at this stage), in value put $PT.
After your delete sop you can still access your “my_id” attribute with original point numbers and based on that attribute perform other operations.
Albert
-
- etudenc
- Member
- 15 posts
- Joined: July 2010
- Offline
tmdagAh OK, I'll give that a try.
I know that you are not trying to skip point numbers but if for eg. point number “0” is deleted, then other point need to get that “0” number - that is why point numbers changes. So I have suggested creating some attribute where you could store your point numbers.
after your scatter, put ‘add attribute’ node, name it for eg. “my_id” (could be anything, it doesn't matter at this stage), in value put $PT.
After your delete sop you can still access your “my_id” attribute with original point numbers and based on that attribute perform other operations.
Thanks again!
-
- Quick Links

