when i create a new attribute , it will automatically create the local var. For example attribute ‘test’ will have local variable $TEST. But if i add a Cd attribute (using point/prim node) , why there's no local var ? i have to add ‘attribute create’ node and map the Cd into a new attribute using point() to pass the ‘Cd’ value , so then i will have the local var. Is this the best way that i can do ? seems like a long process just to have the associate local var.
Is there any faster steps rather than using/add ‘attrib create’ ? and for what reason that the ‘point’ node is not designed to have local var automatically? for example why there's no varmap like ‘Cd’ -> $CD.
local variable from Cd attribute
12373 7 2-
- metaclay2
- Member
- 89 posts
- Joined: Feb. 2013
- Offline
-
- zdimaria
- Member
- 390 posts
- Joined: Jan. 2012
- Offline
-
- metaclay2
- Member
- 89 posts
- Joined: Feb. 2013
- Offline
zdimaria
a faster way is to use an attribcreate set to point vector Cd, but just uncheck write values. it will create the varmap attrib and at least cuts out having to write the point expression
COOL ! This is saving me from typing the expr. Thanks a lot.
But can anyone explain , why there's no simply a button or parameter in the ‘point’ or ‘primitive’ to turn on/off this local var ? it will be great that this then can be solved in a single click only.
Thanks
-
- koen
- Member
- 798 posts
- Joined: April 2020
- Offline
-
- metaclay2
- Member
- 89 posts
- Joined: Feb. 2013
- Offline
koen
I dont think vectors are ever expressed in a single local variable. In addtion to that, Cd is a special case. I have never needed to define it, most nodes that would know about Cd know about $CR, $CB and $CG for red green and blue respectively.
Cheers,
Koen
yes, true. i'm just curious and can't even find the good reason … why.. like you said Cd is ‘special case’ ? why is it special ? why don't treat it as other custom attribute? why not exposed as local var as $CD so can be called by simply using $CD1 $CD2 $CD3. In fact, when i need to put it in local var, i have to add additional node (like attrib create) which i think this should be solved by a more simple way.
-
- edward
- Member
- 8140 posts
- Joined: July 2005
- Offline
loccitane
like you said Cd is ‘special case’ ? why is it special ?
If you look at the Point SOP, you'll notice that there's a whole slew of specially named local variables which are available by default. The reason for these is because the “varmap” attribute was a much later feature addition in Houdini. Prior to H5, one needed to use the point() expression to access point attribute values (other than the special cases like Cd).
-
- metaclay2
- Member
- 89 posts
- Joined: Feb. 2013
- Offline
edwardloccitane
like you said Cd is ‘special case’ ? why is it special ?
If you look at the Point SOP, you'll notice that there's a whole slew of specially named local variables which are available by default. The reason for these is because the “varmap” attribute was a much later feature addition in Houdini. Prior to H5, one needed to use the point() expression to access point attribute values (other than the special cases like Cd).
Thanks for the information, Seems like a good reason. so you're talking about something like ‘backward compatibility’ , right ? i can see that.
Anyway, it won't hurt anyone if for example Cd will be automatically map to $CD (maybe the engineer :-) ). Just create internal map $CR/CG/CB to $CD1/2/3 will solve the issue (or request). So far i see there will be no future ‘conflict’…. just my simple opinion :-) . It also can be applied to other attrib in ‘point’ sop like uv->$UV etc.
Thanks
-
- Hamidreza Monsef
- Member
- 1 posts
- Joined: July 2016
- Offline
-
- Quick Links




