second nearest point id with vopsop

   4712   5   0
User Avatar
Member
8 posts
Joined: Sept. 2011
Offline
This topic might have been posted before but I couldn't find out this posted before so I'm posting now.

what I would like to achieve is to plug same number(and same position) of points into vopsop's first and second input and get second nearest point id based on point cloud. (first nearest point is myself.)

I tried to do the same thing with for each sop and I was successful but it was really really really slow and if there is so many points in there it's gonna take forever.

I'm not sure but if there is any way to achieve this with vopsop, it might be much faster than using for each sop.

Any help would be appreciated.
Tatsu3d
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
if the first nearest is yourself, then you can use a pcopen and filter for the id, just set the number of closest points to search for as 1.
.
User Avatar
Member
8 posts
Joined: Sept. 2011
Offline
Then you get yourself. Because I plugged the same node into vopsop.
Tatsu3d
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
you can use pciterate, but an easier method would be to delete the search point, and use the nearpoint expression
.
User Avatar
Member
8599 posts
Joined: July 2007
Offline
just use Point Cloud Import By Index VOP and set index to 1 to get second closest point
it's a good idea to check before if Point Cloud Num Found VOP returns at least 2 so you know that it exists
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8 posts
Joined: Sept. 2011
Offline
Thank you Tamte. Point cloud import by index worked perfectly and it was really simple method. It can be used for many things I guess. Really helpful! Thanks so much
Tatsu3d
  • Quick Links