Hi everybody,
I'm digging myself into VOPs (after spending two days with Vex).
It's seems that there not many tutorials and even less node examples.
I have a couple of very simple questions.
1) How do I convert an int into a string? I found lots of converts but none to string. I've even tried the print VOP, but that adds some text to the string, so it's useless.
2) I would like to add an attribute to each primitive (OrgPos) and store the position of the first point in the prim. I've tried a primitive VOP but there I don't seem to have access to the individual points. I've tried a point VOP but then I can't write an attribute to the prim...? How would I do that? And how would I access the first point of the prim?
Thanks in advance!
Günther
VOP questions
1118 4 1-
- Sybaris
- Member
- 41 posts
- Joined: 4月 2020
- Offline
-
- Sybaris
- Member
- 41 posts
- Joined: 4月 2020
- Offline
-
- animatrix_
- Member
- 4858 posts
- Joined: 2月 2012
- Offline
Hi,
For #2 I don't think the equivalent VEX function is available in VOPs, which is primpoints:
https://www.sidefx.com/docs/houdini/vex/functions/primpoints.html [www.sidefx.com]
For #1, the usual method is to use itoa VEX function:
https://www.sidefx.com/docs/houdini/vex/functions/itoa.html [www.sidefx.com]
But this too doesn't exist in VOPs.
For #2 I don't think the equivalent VEX function is available in VOPs, which is primpoints:
https://www.sidefx.com/docs/houdini/vex/functions/primpoints.html [www.sidefx.com]
For #1, the usual method is to use itoa VEX function:
https://www.sidefx.com/docs/houdini/vex/functions/itoa.html [www.sidefx.com]
But this too doesn't exist in VOPs.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]

-
- Sybaris
- Member
- 41 posts
- Joined: 4月 2020
- Offline
-
- tamte
- Member
- 9127 posts
- Joined: 7月 2007
- Offline
Sybaris
2) I would like to add an attribute to each primitive (OrgPos) and store the position of the first point in the prim. I've tried a primitive VOP but there I don't seem to have access to the individual points.
ptnum output from geometryvopglobal1 contains point number of the first point of current primitive
so you can connect that to Import Point Attribute VOP to get it's P
Sybarisyou can use Set Attribute VOP to write to any element of any class
I've tried a point VOP but then I can't write an attribute to the prim...?
(primnum output from geometryvopglobal1 would be first primitive of current point which is trickier than doing it in Prim VOP SOP if a point shares multiple primitives, which I sense is not your case though)
but in case you are missing any funciton you can us Snippet VOP for inline wrangle snippet or even Inline VOP
Edited by tamte - 2023年6月12日 12:04:10
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Quick Links