Take Control of Your Arrays With the Modulo Operator in Houdini

3D Artist David Kahl shows a nice trick for dealing with Arrays within Side Effects Houdini. The trick is to use a Modulo Operator. Sometimes you might find yourself in a situation when you might need to loop over your Array to do some operation with every entry. Other times you might want to do something specific with only one point. This can also be helpful when you have a random entry in your array and you need to address the neighbor of that entry.

Whatever the case, a modulo operation can make your life much easier. A Modulo operation is a generalized computing term. It’s basically a remainder calculation. It can be used to find the remainder after the division of one number by another. In Houdini, modulus can give you the remainder on integer division.

“Sometimes you are in a situation where you have to run through your array but instead of just end at the last element you need to continue with the first element” Kahl mentions, “…You can easily do that by utilizing the modulo operator.”

Want to select specific points using only VEX logic? David once ran through how you can find points in geometry by using VEX on point Clouds in Houdini. You can find that tutorial here

Leave a Reply