Jump to content

pcopen vs pcfind?


magneto

Recommended Posts

Hi,

 

Which one is better and faster? I like pcfind as it feels nicer to use but you don't get some of the functionality found in pcopen such as "free" "point.distance" since it's already calculated in both anyway I imagine.

 

Which one do you prefer using and why?

 

 

Thanks :)

Link to comment
Share on other sites

Pcfind returns an array,  [] , while limits like radius and max number are still here. Can't say about speed comarison. Anyway it works just fine, let's say for bind export, and calling the attribute later. Find closest points before some deformation, do an average of positions after deformation, so on.

Edited by amm
  • Like 1
Link to comment
Share on other sites

i'm used to pcopen, so that's what i use.  the pcopen method seems like the "old" method tho.  pcfind's syntax hasn't sunk in yet, but i should probably start using that since it opens up the ability to use pcfind_radius() which has no pcopen equivalent.

 

it'd be interesting to see if there's any difference in speed.  it's not hard at all to make pcopen crawl, so finding a test case would be trivial.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I did a speed test and when I didn't use the results pcfind was super fast which was suspicious, but after I save the number of elements found in an attribute, pcfind was about 15% slower than pcopen. Nothing unusual. pcfind is nicer to use but pcopen has a few nice functions like pcfilter that gives you a nice averaging of attribute values. It's not as easy to do for pcfind as you have to do it for many attribute types yourself.

 

What about pgfind? Anyone used it before?  :)

  • Like 1
Link to comment
Share on other sites

  • 7 years later...

Just in case anyone is coming across this after some years: pcfind is appx twice as fast. It uses a different type of search (BVK vs kd-tree), which divides the search area quicker. pcfind doesn't have pcfilter, but if you want the speed you can implement that with not too much trouble. Pragmaticvfx  explains it well in the first few videos.

Link to comment
Share on other sites

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