Hi Houdini lovers
I have a poly geometry and I scatter a bunch of points on it.
Now I want to select the primitives that those scattered points are on them.
What is the fastest and easiest way to do it?
Cheers
select primitive based on scattered points
2420 4 1- Seiffouri
- Member
- 41 posts
- Joined: 5月 2010
- Online
- asnowcappedromance
- Member
- 512 posts
- Joined: 7月 2009
- Offline
there's a couple ways of doing it, you could i.e. transfer a color from the scattered points to the prims based on distance and then write in a Group SOP in the expression field something like $CR > .9 (your primgeo needs to be black before you transfer a red color to it).
Or
You go fancy and use a combinations of expressions and python,
check out the file that I attached!
cheers,
Manu
Or
You go fancy and use a combinations of expressions and python,
check out the file that I attached!
cheers,
Manu
- Seiffouri
- Member
- 41 posts
- Joined: 5月 2010
- Online
- asnowcappedromance
- Member
- 512 posts
- Joined: 7月 2009
- Offline
I put some explanations into the code so you know what's going on there.
As for the pointdist() expression, -1 means that you look at all primitives instead of only one, and 3 means to return the nearest primitive that is found.
In order to know about the expression syntax, open a textport window in Houdini and type “exhelp pointdist” !
As for the pointdist() expression, -1 means that you look at all primitives instead of only one, and 3 means to return the nearest primitive that is found.
In order to know about the expression syntax, open a textport window in Houdini and type “exhelp pointdist” !
- Seiffouri
- Member
- 41 posts
- Joined: 5月 2010
- Online
-
- Quick Links