Friday, October 24, 2014

Building a Procedural Fence in Houdini

One of the first concepts we were introduced to about Houdini at the beginning of the month was the way that everything works in nodes and you can build models procedurally. The instructor showed us this with a fence that looked like any other, but then when he pulled a curve, the fence formed to that curve and gained the appropriate number of pickets to fill the gap. That got me really excited to use Houdini, but we weren't quite there yet. First there was Softimage, a program that I really wrestled with at first. This is where we modeled the various pieces of the fence. This was mostly done by just drawing curves and revolving them around an axis. this was the main tool I used because I was pretty intimidated by the program at the time.


After building the pieces, I exported them out as .obj files to be used in Houdini. Almost every little change in Houdini can be expressed by a node and you can go back and alter those changes. I started out with a simple curve (curve node). I then gave that curve more points (resample node). After that I grouped the corner points into one group and the in between points into another (group node), these point groups represent which get the posts and which get the pickets. To import those OBJs in you need a file node. I then merged them all together to get the final result (merge node). 


That was actually a pretty abridged version of the process, there are a lot of other nodes that play a very important role in making this work, and here they are. You can see the ones I previously mentioned make up a little under half of this network. But these networks can get pretty big the more complex the process gets.


The beauty of this node based system, like I mentioned earlier, is that you can go back and make alterations fairly quickly, much faster than a traditional package. In just 10 seconds the fence from above can turn into this.


As you can see, the pickets between the posts have now increased in size to accommodate the change. And all I had to do was go into the curve tab and change the distance between the points. Though I did not do this you can also replace the models entirely with differently by just importing in different ones. The applications are many when working like this. Say your working on a game that involves managing homes and as the player gets more houses, the fence expands. Instead of modeling every possible sized fence, you can do this and just change a value in the code as the player gains more houses. I'm really glad we were exposed to Houdini because It really dose seem to be an effective workflow.

No comments:

Post a Comment