get proper prim num

   4245   3   0
User Avatar
Member
30 posts
Joined: July 2010
Offline
I have scattered some points on a polygon surface and for every point I want to find the ID of the prim that the point reside on it. I think I can find the number with bruteforce foreach sop but anyone knows more implicit way.

cheers

mosari
User Avatar
Member
755 posts
Joined: Oct. 2008
Offline
Try this

Attachments:
Clipboard01.jpg (15.5 KB)
primnum.hipnc (42.6 KB)

User Avatar
Member
30 posts
Joined: July 2010
Offline
Thank you Soothsayer. it simply works

mosari
User Avatar
Member
43 posts
Joined: May 2013
Offline
I just stumbled on this thread, and I am looking at the downloaded file, and trying to understand why it works. Can someone correct my thinking here:

1) box node - we create a box

2) facet node - we break the points up from 8 to 24 unique points per box face.

3) att node - we create an attribute that holds the face number on each prim.

4) attribpromote2 node - we transfer those prim number attributes to the 24 points.

5) scatter1 - we scatter points on the prims(?). Why/how does our new attribute get assigned to the points we scatter? Why do we have to promote the attribute to points, if the scatter is operating on the primitives? Maybe each primitive is passing on it's points' attributes to the scatter points it is helping to create?
  • Quick Links