VEX / VOPs Basics: PCFind

comments 10
Featured Video Play Icon

One of the top three questions we’ve been asked during season one was “How does PCFind work?!” and indeed the question is important as so many setups rely on the ability to find close points.

This week’s tutorial is not so much about a certain setup or effect but more about the basic understanding of how pcfind works in VEX and VOPs. Getting a deeper understanding of this function will also benefit you in several upcoming tutorials we’ve got prepared for you.

Share on FacebookTweet about this on TwitterPin on PinterestEmail this to someoneShare on LinkedInShare on Google+


  1. Masterheavy says

    very nice !
    what if we would like to animate?
    do we have to put that wrangle node in a sop solver?

  2. @master heavy
    you can create a float channel parameter on wrangle node and replace the float value inside the function with a channel reference for example :

    pcfind(0, “P”, pos, ch(“radius”), ch(“max_number” ));

    then you can key frame the actual parameter or drive it with any expression.

    • Masterheavy says

      thx for the reply but i would like to avoid keyframing parameters. and channel referencing in wrangle nodes is great.
      maybe i did not expressed myself clearly – my thoughts was animating the startobject – so animating pos without loosing the pos we already got in the first frame eg. the frame before.

      • yep in that case you can use solver. I am a fan of stuff like growing patterns and branching stuff, and I found out that by storing previous frame values to utilize over next frame inside solver is a very decent way.

  3. solar says

    Very clear, nicely done 🙂 For increased clarity you may want to stay away from referring to point numbers as IDs, since “id” is a common attribute name. Great work as always!

    • Moritz says

      You’re totally right. Thanks for pointing it out. The proper term would have been “point number” apologies for that – gonna try and stick to it in future recordings 🙂


  4. David says

    Love your stuff, one thing i noticed is that if you run over the the sample point instead of every point on the grid you should get quite a significant performance boost as houdini would only need to calculate the pcfind function once instead of 100×100 times.

    Anyway, keep up the good work and thank you for your hard work! 🙂

    • Moritz says

      You’re absolutely right, David – thanks for the input. As mentioned in the comments on vimeo I decided to do it this (admittedly extremely inefficient) way as this would yield almost the exact syntax as what I’m going to use in a few upcoming tuts.


Leave a Reply

Your email address will not be published. Required fields are marked *