8/23/2023 0 Comments Houdini vex code written tutorialsnote that you can also read attributes from node, which is not connected // to the current node using the "op:" syntax // this is valid for any function which is expecting geo handle (sampling from other volumes.) // note that Houdini network UI will not detect this dependency when Show -> Dependency links display is enabled P3 = point( "op. Copy geometry to points - Give it random deformation - Centre pivot In the video below, Id like to quickly demonstrate few practical examples on how to use VEX code to make life of Houdini beginner easier and more fun. this is one way of reading attributes, this is only valid, when // point count is exactly the same in both inputs, then attribute from // point from second input with the same is retrieved // can also be replaced with since its signature can be guessed as it is // commonly used attribute, however I prefer explicit declaration :) // - vector, - integer, - float, - matrix3, - vector4 // - matrix4, - matrix2, - vector2, - string, //P1 = //P2 = // inputs numbering starts at 0, therefore 1 refers to the second input // this approach is useful for querying attributes from different points (other from the currently processed one) // node input numbering starts from 0 (first input), 1 (second input). you can also reference parameters from external nodes // if there is an expression (Python/hscript) in the parameter, // it will be evaluated float up = chf( "./params_1/move_up") you can also use optioinal argument for time which will enable you to evaluate // the channel at different frame // // once you type ch*() in your code, you can press a button on the right, to // generate a UI parameter for it automatically, you can do the same by hand as well float y = chf( "y_position") * multi-line comments can be typed using this syntax */ // in vex you can evaluate values from parameters on this node // by calling ch*() function, with * representing a signature, check the docs // for the full list, some of them: chv() - vector, chu() - vector2, chs() - string // chramp() - ramp, chp() - vector4, chi() - int, chf() - float, ch4() - matrix, ch3() - matrix3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |