Jump to content

How to make point number constant :)


~nature~

Recommended Posts

Hi,everyone,Is there a way to keep the point number constant when do some "kill action"?

e.g I need to delete some particle points in SOPs,but the left point number is changed after the deletion which is very bad because the following op can only depend on the constant $PT.

Thanks very much in advance :P

ptnum.hipnc

Link to comment
Share on other sites

Where $PT fails, $ID may do the job,it keeps constant.

sanostol,thanks very much for your quick reply,but the $ID may fail in some SOP expression,such as point().

that is,is there a way to query the point attribute or $PT via $ID in SOPs as poppointid and poppointnum do in POPs ? :P

Link to comment
Share on other sites

sanostol,thanks very much for your quick reply,but the $ID may fail in some SOP expression,such as point().

that is,is there a way to query the point attribute or $PT via $ID in SOPs as poppointid and poppointnum do in POPs ? :P

After POP network place attribCreateSOP, as a name put id and into first value slot put something like this point(opinputpath(".", 0), $PT, "id", 0). Now you can use $ID==100 or similar expression in your deleteSOP.

Edited by SWANN
Link to comment
Share on other sites

F**k :), can't edit my post so here is example.

Hi,SWANN,thanks very much,but with $ID==100,how can I obtain the specific $PT or some other point attribute which is associate with ID 100,because $PT may keeps changing per frame.this possible problem derives from here :P

Link to comment
Share on other sites

how can I obtain the specific $PT or some other point attribute which is associate with ID 100,because $PT may keeps changing per frame

What you mean by specific ? From your setup I don't understand how you want delete points, could you share some more info please ?

EDIT: You don't have to use ID. You can use Create Attrib called NUM and as value use $PT. It will store your point numbers in this node exactly how they are and in following nodes no matter what changes happens you will get acces to $PT how it was before delete, point NUM will not change.

Edited by SWANN
Link to comment
Share on other sites

What you mean by specific ? From your setup I don't understand how you want delete points, could you share some more info please ?

EDIT: You don't have to use ID. You can use Create Attrib called NUM and as value use $PT. It will store your point numbers in this node exactly how they are and in following nodes no matter what changes happens you will get acces to $PT how it was before delete, point NUM will not change.

Thanks very much again,SWANN :P , I delete the points so that the non-deleted ones can be fed into sopsolver for the "accumulation" purpose at each frame,because the colliding particle will be collided next frame once it stopped at this frame.

for the specific point,I mean the actual particle which is identified with its ID number,that is for the ID 100 particle,it may carry the point number 15 at this frame and different point number at some other frame due to the possible deletion. I want to find some efficient method to track the ID 100 particle or points in SOPs so that I can obtain its point attributs at any frame in the simulation.but with the same $PT I cannot obtain the same point info at different frame if $PT keeps changing :P

Link to comment
Share on other sites

  • 2 weeks later...

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