Welcome to 'VEX Isn't Scary'! This is a beginner tutorial series for learning to code in Houdini using VEX and is a companion series to the 'Houdini Isn't Scary' tutorial series. No prior understanding of coding or VEX concepts is necessary. Everything from variables to if-statements to functions are explained in this series. By the end of the series, you will be able to code in Houdini and have some carry over knowledge into other coding languages. Let's dive right in!
PART 1 | Basics
Gain a broad overview of what VEX is, how it works and the terminology that is necessary to understand it. Learn some basic coding using the Attribute Wrangle node then tackle variables and initialization as well as the necessary conventions that are used in VEX.
PART 2 | Conditionals
This lesson reiterates a lot of what you learned in Part 1 but now with the inclusion of Conditionals. Conditionals let you to control the logical flow of the code. You will explore the anatomy of an if-statement and how you can use conditionals to do things that are difficult to do with any other node in Houdini.
PART 3 | Functions
Next you will begin using Functions. Functions are pieces of code that you can call upon to shorten your code and make your life easier. They are a core part of VEX and can be used for a wide variety of actions. In this part, you use a few functions including set( ), rand( ) and removepoint( ). You will also learn about geometry handles and the existence of global variables such as@Frame.
PART 4 | Channel Functions
Channel Functions are special functions that Attribute Wrangle recognizes. You can create UI tools such as sliders, text-fields and ramps (to name a few). You will understand the common way to create a Channel Function as well as how to edit the parameter interface to better reflect the type of data you need. Next you will further explore another global variable - @Time.
PART 5 | Loops
Explore more of the conditionals – loops. Loops are useful for running over multiple instances of something or for repeating code under particular conditions. Break down how the For-each, For and While loops work at their core. You will learn about when to use each one, and end with creating a basic infection solver.
PART 6 |Clarification
In part 6, you will learn about some of the areas that you may be uncertain about. This includes theway variables function within conditionals, how else-if statements can act as switch cases, howdetail attributes can control geometry independent values and how you can control your geometryand renders with common attributes.
In these lessons, you learned the main aspects of VEX. However, to understand VEX at a practical level, it is a good idea to work through a full VEX based project from start to finish. Below is a link to this kind of project.