The Magic of Houdini: SOPs That Confound the Melon -- Part 2

In the latest excerpt from the book The Magic of Houdini, Will Cunningham explains Point and Primitive SOPs.
Posted In | Magazines: VFXWorld

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.

    1. Start up Houdini and jump into the default Geometry object.

    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.

    4. Branch a Facet SOP from the grid node. Toggle on the Unique Points parameters.








Comments

  No comments. Be the first to comment below.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Use <!--pagebreak--> to create page breaks.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.