Qualifying a vector in an Attribute Wrangle

   11818   7   1
User Avatar
Member
789 posts
Joined: April 2020
Offline
Hello all,

in an attribute wrangle node, I have:

v@x=set(1.0,0.0,0.0);


Which creates a float3 attribute, however, it is not qualified as a vector. Looking at this page: http://www.sidefx.com/docs/houdini14.0/vex/snippets [sidefx.com] the v before the @ should have taken care of this.

Is there another way to make sure an attribute gets qualified as a vector ?

Thanks,
Koen

Attachments:
vector1.jpeg (63.8 KB)

User Avatar
Member
8554 posts
Joined: July 2007
Offline
v@, f@, p@, … set just size of the attribute, not the qualifier
to set the qualifier use:
http://www.sidefx.com/docs/houdini14.0/vex/functions/setattribtypeinfo [sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
789 posts
Joined: April 2020
Offline
great,

thanks!
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi Tomas,
Am I correct that with the old vop sop workflow this was done internally with the add attribute node ? . I would really like to know the reason why if I am correct,what advantage it brings, and does it really matter.

Rob
Edited by - Feb. 8, 2015 03:39:01
Gone fishing
User Avatar
Member
789 posts
Joined: April 2020
Offline
Thomas' reply made it work, but I dont think it's the most elegant solution. I think it's worth an RFE to add this to the v@ type classification.

Cheers,
koen
User Avatar
Member
6 posts
Joined: Sept. 2012
Offline
yes the addAttribute in a point Vop does that if set the Type Info. The vex code generated uses the setattribtypeinfo function.


circusmonkey
Hi Thomas,
Am I correct that with the old vop sop workflow this was done internally with the add attribute node ? . I would really like to know the reason why if I am correct,what advantage it brings, and does it really matter.

Rob
Julien D
User Avatar
Member
8554 posts
Joined: July 2007
Offline
it's worth some RFEs for sure, however given how much powerful and flexible CVEX context is, I see hiding VOPSOP and focusing on improving AttribVop and CVEX as a big plus instead of hindrance
I may not feel the difference as I mostly use wrangles and VEX directly, but I feel that VOP differences are easily fixable so submit an RFE for setting qualifier in Bind Export based on Type menu, that can be useful

v@ to create vector representation can be tricky as v@ represents all f3 attributes, not only vector, but normal, float3, color
p@ is position, quaternion and f4
etc.

so whatever houdini would set may not be what you want
and if we would have separate letter for each of them: f3@, v@, c@, n@, p@, q@, f4@, …
then we would have hard time accessing them as you would need to specify exact letter to get the attribute
I quite like how it is, but I agree there can be some simplified syntax for qualifier definition when creating an attribute using v@ or p@ binding for the first time
like vv@ would create vector qualifier
vn@ normal
vc@ color
v@ default float 3
pp@ position
pq@ quaternion
p@ default float 4

but any of such defined attribs should be then accessed through default v@ or p@ bindings

just a bunch of thoughts
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi, Tomas, This is the very subject I talked about with support and I submitted a RFE for it a few weeks ago with reference to having the functionality of the add attribute in the bind export. Coming from a more
artistic slant it seems a step back wards as you end up adding more nodes to get the same functionality. There may be a technical reason but its never even crossed my mind to get into another level of detail.
Please do submit a few RFE's as your vex skills are highly regarded !

Rob
Gone fishing
  • Quick Links