Hi,
I want to use:
http://www.sidefx.com/docs/houdini/vex/functions/xyzdist.html [www.sidefx.com]
And I see that it can be limited to work on specific primitive groups but in my case I want to run it only on 1 primitive each time it's called. I can see that technically I could make a group per primitive but that would seem clunky and expensive.
Is there another way to do this? Seems like I might be able to make an expression to specify the primitive.
Otherwise, should I used a different method to find closest position (not point) on a primitive?
Thanks
Can xyzdist VEX function be used on specific primitives without making a group per prim?
1953 2 1- philipchild
- Member
- 31 posts
- Joined: Dec. 2006
- Offline
- jlait
- Staff
- 6129 posts
- Joined: July 2005
- Offline
Groups can be ad hoc groups, so don't need to be created ahead of time.
So you can use the group “53” (note a string holding 53, not the integer 53) to find distance to primitive 53. sprintf(“%d”, primnum) can be used to generate such a group.
A big warning, however: internally it will have to create a group for all those primitives. So while it won't be as clunky, there may be more expense than you expect if every point creates a different group.
So you can use the group “53” (note a string holding 53, not the integer 53) to find distance to primitive 53. sprintf(“%d”, primnum) can be used to generate such a group.
A big warning, however: internally it will have to create a group for all those primitives. So while it won't be as clunky, there may be more expense than you expect if every point creates a different group.
- philipchild
- Member
- 31 posts
- Joined: Dec. 2006
- Offline
-
- Quick Links