A problem with VEX

   689   4   1
User Avatar
Member
22 posts
Joined: 9月 2023
Offline
You can see from the pic that I used vex to create new points from original points at 2 primitives and put both original and new points in 4 groups.

However, the geometryspread sheet showed that the 2 new groups had SAME ptnum 8,9,10,11.

I am wondering why it is not 0,1,2,3--8,9,10,11 and 4,5,6,7--12,13,14,15?

Thank you in advance!

Attachments:
mmexport1702566930437.png (1.1 MB)

User Avatar
Member
4544 posts
Joined: 2月 2012
Offline
Hi,

addpoint returns interim point numbers. If you want to group them using their finalized point numbers, use the setpointgroup VEX function:
https://www.sidefx.com/docs/houdini/vex/functions/setpointgroup.html [www.sidefx.com]
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
102 posts
Joined: 6月 2023
Offline
animatrix_
Hi,

addpoint returns interim point numbers. If you want to group them using their finalized point numbers, use the setpointgroup VEX function:
https://www.sidefx.com/docs/houdini/vex/functions/setpointgroup.html [www.sidefx.com]

Unclear. What are interim numbers? in setpointgroup you also need to specify the point number, which is taken from addpoint. So what's the difference?
User Avatar
Member
102 posts
Joined: 6月 2023
Offline
Yeah, I understood the problem.
During Wrangle execution, numpt is constant, in this case 7, for all primitives. Therefore, addpoint always returns starting from 8 for each primitive, and after executing the Wrangle, Houdini itself renumbers the points, we do not see this.
It turns out that inside the primitive you cannot get a list of new points.
User Avatar
Member
4544 posts
Joined: 2月 2012
Offline
HGaal
animatrix_
Hi,

addpoint returns interim point numbers. If you want to group them using their finalized point numbers, use the setpointgroup VEX function:
https://www.sidefx.com/docs/houdini/vex/functions/setpointgroup.html [www.sidefx.com]

Unclear. What are interim numbers? in setpointgroup you also need to specify the point number, which is taken from addpoint. So what's the difference?

Have you looked at the help card?
https://www.sidefx.com/docs/houdini/vex/functions/addpoint.html [www.sidefx.com]
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links