pcnum found vop and pcimportbyid vops ?

   3127   3   0
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Does anyone know how to correctly use these vops. from my understanding
pc num found replaces PC iterate .So instead of iterating over all points this new vop just iterates over the points in the radius. Is this correct ?
PC import by id , is this to replace the pc import node ?.
If someone can please shove up some examples of how these work with a detailed description i would be greatful as the Houdini help is sadly lacking.

rob
Gone fishing
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Ive done an example of how I thought PC import by id works. In the for loop I cannot see the point of adding a if statement inside the loop as I am not looking for if true do X. I use a PC iterate as a condition for the for loop so its saying for every point do X .

Is this correct ?

Attachments:
rse_test_sesi_pcimportbyid.hip (101.1 KB)

Gone fishing
User Avatar
Member
8591 posts
Joined: July 2007
Online
this is not correct usage, since you are still using it as if you don't know how many points pcopen returns but on top of that you are still reading just first available point from pointcloud and iterating to the next doesn't really mean anything since you are reading by index
and even though your example is seemingly working, you are always getting just value of first found point so your while loop doesn't really matter

the reason why pcnumfound and pcimportbyidx were introduced is so you can loop over points returned by pcopen in a for loop already knowing their count. But I think I read somewhere is that they are not necessarily sorted from closest to furthest so you may not count with that, I didn't tested it though

so here is my understanding of how it should be used (I just changed your example)
but maybe some of the developers can shed some light of real motivation behind this since while loops worked very good so far as well

Attachments:
rse_test_sesi_pcimportbyid_fix.hip (108.7 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
First off thanks for the reply. It makes things far more clear and has helped me understand the difference between the for loop and while loop

Rob
Gone fishing
  • Quick Links