Did you ever wonder how to create polygons and polylines through code in Houdini. It’s a straigtforward concept. But you have to know some things about the way Houdini organizes and stores geometry in memory. In this tutorial Manuel will walk you through the process of creating geometry with VEX in a wrangle. After some theory he’ll show you how to generate a closed polygon. Then you’ll learn how to connect neighbouring points with polylines to create a “plexus” style effect.

The basic sequence of geo creation is the following:

  • Create the points with addpoint()
  • Create an empty primitive to later store the connectivity information
  • Add as many vertices as you like with addvertex() to the primitive
  • Update the point references, these vertices are storing

Update from Vimeo by Zybrand Jacobs:

"Great tutorials guys! Its probably worth adding that you are creating 2 overlapping primitives between near points. Depending on the situation you can optimize the geometry even more by using a >= point number rather than the ==. That should half the primitives but still look the same."

COMMENTS

  • Anonymous 5 years, 7 months ago  | 

    brilliant - you just changed my world. I feel like Houdini is going to the top of my list of 3D tools. Done a ton of interactive coding and 3D coding outside of the usual DCC packages, so this really speaks to me. Muchas Gracias!

Please log in to leave a comment.