The Magic of Houdini: SOPs That Confound the Melon -- Part 1
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.
In this section, I take a few minutes to go over a few SOPs in particular. These werent covered earlier in detail because it would have taken you too far off the path of the exercise. Here, however, there is no path but detail! The following topics are covered because I recall them appearing murky at best when first learning about them. Hopefully, you can avoid some of that frustration by getting the answers right now at the outset.
Object Merge SOP 2. Jump into the sphere object and drop a Sphere SOP. Jump into the box object and drop a Box SOP. Jump into the cone object and drop a Tube SOP. Change the rad1 channel to 0 to change the tube into a cone. Delete the file nodes in each of the objects if they exist.
3. Jump back up to the objects context. Leave the sphere at the world origin. Translate the box object in positive Y by five units. Translate the cone object in positive X by three units. Home the perspective view, dolly out a bit, and you should see what is shown in Figure 1.
The Object Merge SOP is a useful tool for bringing the SOP contents of one object into another object. It all seems pretty simple until you really start to think about what the Transform object is doing. At least for me, that part gets a little murky. But, with a short exercise and some discussion, Ill wager you can regain a solid footing.
1. Open a new session of Houdini and lay down three Geometry objects. Name them sphere, box and cone.
5. In the Object 1 parameter for the object merge node, navigate to and choose tube 1 node inside the cone object. Toggle the See One/See All button so you can see the other two objects. Currently, the merged cone is sitting on top of the sphere at the world origin. Why didnt it inherit the transform of the cone object and so be right on top of it? Because the Transform Object field is empty, only the SOP information is being imported. And so, the +3 units in X arent being inherited.
6. Now, it starts to get a little murkier. In the Transform Object field, navigate to and choose the sphere object. The cone has moved over on top of the other cone. Go to wireframe shading and turn on the display of primitive numbers. The numbers verify that there are two cones occupying the space. Usually, this is what you want. Delete the /obj/sphere path and replace it with a. and you will get the same result. A period just means to inherit the current objects transforms.
But, why if you set it to inherit the spheres object transforms do you get the +3 units in X from the cones object transforms? Think of it this way. This specifies the object merges world origin to be the same as the sphere objects. Then, it evaluates the cones object transform relative to this new world origin. The cone object is 3 in positive X from the specified world origin and so the imported cone sits on top of the cone object.
7. Change the Transform Object field to /obj/cone and the cone jumps back to be on top of the sphere. The reason is different this time, though. Earlier, it was because no object transforms were being considered. This time, the object merges origin is set to +3 in X. It then evaluates where the cone object is relative to that new world origin. It is right on top of it, and so no transforms are applied. The result is that the cone sits on top of the sphere.
8. To get even loopier, change the Transform Object field to /obj/box. Whoa! Exploding brain mass engage! You are object merging a SOP from one object into another object using the object transforms from yet another object. Now, this is getting silly. Yet, you can make sense of it. First the object merges world origin is set to +5 in Y. Then, the cone object is evaluated relative to that new world origin. The cone is five units down and three units to the right. So, the merged cone is now below the cone object as shown in Figure 2. Once you get into the details, it becomes readily understandable. And, if not, go through the exercise one more time as repetition does help comprehension!4. Jump into the sphere object and lay down an unconnected object Merge SOP. Append a Merge SOP and wire the sphere node into it as well. As always, update the Display flag.

![[Figure 1] Zee perspective view.](http://www.awn.com/files/imagepicker/1/houdini01_fig0590.jpg)























Post new comment