Pcfind very slow?

   1647   3   2
User Avatar
Member
385 posts
Joined: 7月 2018
Offline
I was experimenting with pcfind and made this simple scene.
i have a few points on a grid and i search foreach one of them to find closest points

i think i must be doing something backwards in order for it to be this slow. shouldnt this be more responsive?
check my demo scene to see for your self

Attachments:
pcfind.hip (84.0 KB)
Capture.JPG (272.0 KB)

User Avatar
Member
72 posts
Joined: 4月 2016
Offline
Try setting the “Run Over” parameter to “Detail (only once)”. When it is set to “Points” you are do the work for each point in the second input, for each point in the first input (which is 10,000 times!).
User Avatar
Member
8595 posts
Joined: 7月 2007
Offline
it pretty much looks backwards
all you need is
int pnts[] = pcfind(1,"P",@P,chf("radius"),1);
if (len(pnts)>0){
    v@Cd = 0;
}

or
int pt = nearpoint(1,@P,chf("radius"));
if (pt != -1){
    v@Cd = 0;
}
Edited by tamte - 2019年10月30日 15:57:08
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
385 posts
Joined: 7月 2018
Offline
thanks! both solutions worked!overthinking is always a problem
  • Quick Links