The Magic of Houdini: SOPs That Confound the Melon -- Part 2
This is the next in a series of excerpts from the Thomson Course Technology book The Magic of Houdini by Will Cunningham. In the next few months VFXWorld readers will learn the basics of the dominant tool that has been used in the creation of some of the most awe-inspiring animation and cinematic effects ever made.
Understanding Point and Primitive SOPs
This section could probably occupy the contents of an entire book all on its own because these two SOPs have real, ultimate power. The big difference between the two is that, as the names imply, one lets you access point attributes, whereas the other lets you access primitive attributes. The amazing part about them is that they allow you to get down and dirty and apply and modify attributes on a per point (or per primitive) basis if desired. So, you could say, "Primitive number 5,573, I hereby decree that you will be purple." Or "Point number 102,972, I hereby decree that you will have a velocity in X of 110,199." In addition, you can utilize the power of various local variables to affect all points (or primitives) on an individualized basis. Let's check out a simple example of each.
2. Jump into it and drop a Grid SOP.
3. Append a Point SOP and add + rand($PT) * 0.4 to the ty channel so that it reads $TY + rand($PT) * 0.2. The local variable TY says to take the position in Y of each point individually in the grid. The PT variable is the point number for each point. So, each point will be get a different, random amount of noise because it will feed the rand() expression its own point number. Then multiply that value by 0.4 to scale it down a little bit. Take that value and add it to the original position, which is stored in $TY. Your grid should look like the one shown in Figure 1.1. Start up Houdini and jump into the default Geometry object.
4. Branch a Facet SOP from the grid node. Toggle on the Unique Points parameters.

![[Figure 1] The grid with some noise applied.](http://www.awn.com/files/imagepicker/1/houdini01_fig0593.jpg)























Post new comment