Hi,
I have a simple question.
What's the difference between “@” and “$”? For example, @N.x vs $NX
I had a sphere with polygon and added a ‘point’ node.(see attachments)
And then I added ‘Normal.’ The default values were @N.x, @N.y, @N.z. But as you can see in the geometry spreadsheet it gave me all 0s. But when I changed those to $NX, $NY, $NZ it gave me correct normal values. Is this a bug? I have the latest Houdini running on Mac OSX 10.11.
Thanks,
HB
adding Normal
3918 2 0- garin2
- Member
- 37 posts
- Joined: Aug. 2012
- Offline
- Enivob
- Member
- 2537 posts
- Joined: June 2008
- Offline
The @ symbol denotes an attribute added to a context, such as Points, Primitives, Detail (global to the object). When you reference an attribute and it does not exist Houdini creates the attribute for you and sets it to zero.
$ variables are built-in values that you can use.
So you created a new attribute which got set to zero.
Then you referenced a global value via the $.
$ variables are built-in values that you can use.
So you created a new attribute which got set to zero.
Then you referenced a global value via the $.
Edited by Enivob - June 3, 2016 08:21:53
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- garin2
- Member
- 37 posts
- Joined: Aug. 2012
- Offline
Thanks Enivob,
If it's not too much trouble can you give me an example when you use @(attribute) over $(global value?)?
If I understood correctly “@(attributes)” are the innate properties of an object and “$(global value)” are the properties that can be determined globally, like 3rd point of view? Is that why point positions, @P.x and $TX has no difference?
Thank,
Hb
If it's not too much trouble can you give me an example when you use @(attribute) over $(global value?)?
If I understood correctly “@(attributes)” are the innate properties of an object and “$(global value)” are the properties that can be determined globally, like 3rd point of view? Is that why point positions, @P.x and $TX has no difference?
Thank,
Hb
-
- Quick Links