Geometry attributes can define any information that is related to the existing mesh. You can also work with your geometry attributes outside of Houdini if you bake them into mesh maps using Bake Texture render node. This article introduces methods how to generate some geometry attributes that can be useful for procedural texturing in Mantra or any other renderer within Houdini. Than you can measure bounding box minimum for your geometry in Y axis and exclude it from whatever number you have in the translate parameter in Y axis. Let say you wish the bottom of your geometry always sit on top of the grid of your scene and never goes below 0 in Y axis. You can than easily change your mind and place the pivot of your geometry for example to the bottom of the geometry by replacing centroid with bounding box (bbox) and choose whether to use min or max values in preffered axis (D_YMIN, D_XMIN…) bbox("./"+opinput(".",0), D_YMIN) Inside the transform node, Pivot Transform tab you can place the pivot of your geometry into the centre of the scene by typing following VEX code for each axis and save this setup as Preset for later: centroid("./"+opinput(".",0), D_X) centroid("./"+opinput(".",0), D_Y) centroid("./"+opinput(".",0), D_Z) Point('./foreach_begin1/', 0, 'lenght', 0) Center Pivot – Match transform to pivot – Safe preset When you are happy with parameters setup let’s randomize Bend parameter and Translate in Y axis parameter inside bend and transform node by writing following VEX code in their field. Drop down node Transform and do the same. Drop down node bend below the example geometry and set it up according your needs. You can now setup parameters for deformation/transformation your example geometry. That way we will be able to use iterations and in every one of the iteration generate random number as specified in the VEX code we’ve previously written in the AttributeWrangle node.Ģ. We need to drop down For-Each Point loop node preset and place the CopyToPoint node inside. It is time for placing everything inside loop node preset.īecause we want to give random bend to each piece of our example geometry that is currently being attached to each point of the line. – Store point number into attribute and create and attributes below the line geo inside AttributeWrangle node using VEX code below. Create few attributes that will drive the bend and length random deformations later on. Use node CopyToPoints to copy your geometry onto points of your line.ģ. Create simple example geometry and then use line node to create line with few points.Ģ. In the video below, I’d like to quickly demonstrate few practical examples on how to use VEX code to make life of Houdini beginner easier and more fun. Copy geometry to points – Give it random deformation – Centre pivot
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |