Yorkst Posted October 25, 2015 Share Posted October 25, 2015 (edited) 1)What are VEX attributes available to node? When I middle-click POP kill node, it displays p@P @age i@dead i@has_previous i@id @life v@previous i@sourceptnum v@v I also can use a random name in VEX expression: dead = i@fnjfrjrjnjn; It will compile and be set to zero. But i@ptnum attribute is not zero and equals to id probably equals to HScript $PT. Spreadsheet also doesn't list it. Where does it come from? 2)What do VEX variables represent? I found @ptnum here: https://web.archive.org/web/20150203054824/http://www.sidefx.com/docs/houdini14.0/vex/snippets It is the only place in the docs, where it's mentioned. I can understand meaning of some of variables from name, but is there a reference? What are @dPdz, @backtrack, @orient? Edited October 25, 2015 by Yorkst Quote Link to comment Share on other sites More sharing options...
marles Posted October 26, 2015 Share Posted October 26, 2015 Hey Yorkst, i'm not sure to understand what you're asking, are you asking what mean each attribut in vex syntax that you can find in the popnet ? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted October 26, 2015 Share Posted October 26, 2015 (edited) Omitting plenty of disturbing details, 1) All node's attributes can be acessed using expressions. 1.1) In Wrangle or VOP nodes all node's attributes available, plus all global variables existing in VOP network for this geometry (wrangles are assets with corresponding vopnet nodes inside) are available too. To understand what you can access in Point Wrangle, for example, MMB on geometry and see what attributes are there, then drop Point VOP and see what variables provided by Geometry VOP Global Parameters node. Note that some of them still required to be computed by user, otherwise they will return something default, like zeros for @Cd, -1 for @id or fresh computed normal for @N. dead = i@fnjfrjrjnjn; This automatically creates attribute with zero as default, then assigns it's value to variable dead. 2) Global variables defined for each context. Besides help, there is nice VCC command for exact context info (that one for cvex): vcc --list-context cvex Actually, cvex is a poor one who has no global variables defined. However, there are still globals presented in cvex's vopnets, but instead of atomic Global Variables node there is an asset called Geometry VOP Global Parameters with bunch of Parameter nodes inside, which is the way you can access any arbitrary attribute on geometry. So, all globals are sitting somewhere or computed automatically. Maybe VCC checks for special names like "N" or "OpInput2" and tells Houdini to pre-compute normals if they are not exist and make operator path of second input. There is no anything special about it in generated VEX code, so, when this code compiles, normals already had pre-computed. HScript's $PT may have similar value as ptnum, but it is local variable, a different thing. They defined only for certain nodes (they are local) and don't exist everywhere. Edited October 26, 2015 by f1480187 Quote Link to comment Share on other sites More sharing options...
Yorkst Posted October 26, 2015 Author Share Posted October 26, 2015 Thank you for the detailed description, f1480187! Didn't find the link with contexts by typing "ptnum" in built-in search. @marles Yes. The link in previous post plus help for each reference seem to cover most of it. What about @backtrack and @orient? Are those locals? Quote Link to comment Share on other sites More sharing options...
mestela Posted October 26, 2015 Share Posted October 26, 2015 Orient is described under instancing attributes: http://www.sidefx.com/docs/houdini15.0/copy/instanceattrs You're right, it doesn't come up in the online search, strange. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.