$NY vs @N.y

   2597   2   0
User Avatar
Member
143 posts
Joined: March 2014
Offline
Hello,

Perhaps I'm not understanding the use of attributes vs global variables, but isn't $NY supposed to be the same as @N.y? In the images I'm using both $NY and @N.y in a point sop to change the direction of normals depending on their current normal Y direction, but I get different results for each case. When using @N.y, all of the normals point up incorrectly; using $NY, I get the result I need.

Thanks,
Caesar

Attachments:
NY.PNG (124.8 KB)
N.y.PNG (97.4 KB)

User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
Hello.
In Houdini some nodes have some values so that let you directly give data about your input geometry.
In this case Houdini called them local variables i.e $NY or $TY etc.
Attributes in Houdini show as somethings like @P or @N.y etc.
Attributes mainly use by VEX and local variables mainly use by Houdini's nodes and you can get them from Houdini documentation.
In your case $N is a local variable in point SOP that can be access directly to each point normal.
However if you want access to same result by @N.y, you should call point expression function.
for instance:
if(point(“../pointSOP”, $PT, “N”, 1) < 0, -1, 1))
And now you should get the same result as you expected.
I know that can be a little bit confusing but with trial and error you will realize it.
User Avatar
Member
143 posts
Joined: March 2014
Offline
Thanks Nima!
  • Quick Links