1 Film Strip Ribbon 1 THE CREEP SOP In this exercise, you will use the Creep SOP to simulate a length of film that flows off of the reel spool on a frame by frame basis. 1.1 GETTING STARTED 1. Launch Houdini. 2. From the Desktop selector button located at the top of the interface, select the Training desktop. 3. Delete the sky, logo and ground objects. 4. Place a new geometry object into the Network editor. 5. Rename it to be Film_Strip. 6. Enter the Film_Strips SOP editor. 7. Delete the default file SOP. 8. Ensure that the View Option in the VIewing window is set to Display SOP for this exercise. 9. Ensure that the viewing window is set to view the Film_Strip s SOp editor. Houdini Training v 4.0 Side Effects Software 1999 1
1.2 CREATING THE CREEP PATH As a result of some preliminary sketches and discussions a size for the path was predetermined. The film strip is be 50 units in length and 12 units in diameter. With this in mind a simple Box will be used for no other purpose than to keep the viewport homed so that you can see what is happening here on a step by step basis. 1. Place a box SOP in the SOP layout window. Leave it at its defaults. 2. Append a transform SOP, toggle the transform SOPs display flag On and: Set the Pivot on the Y axis to a value of -.5 (negative). Set the Scale parameters to 12 50 12 respectively. Toggle the Template flag On. Home the viewport window. 3. Place a grid SOP in the SOP layout window starting a new SOP column. Toggle its display flag On and: Adjust the Size parameters to 1 and 2 respectively. The height of 2 units will represent the width of the film strip later on. Set the number of Rows to 2. Set the number of Columns to 1 (even though the SOP will error). Set the Connectivity option to Columns (the SOP is happy now). Set the Center parameter for the X axis to a value of 6. The grid (curve) is now offset from its pivot point so the copies will spiral when rotated about the Y axis just as the stairs did in the circular staircase exercise. 4. Append a copy SOP to the grid SOP. Toggle its Display flag On and: Set the # of copies to 120. Interactively adjust the Translate parameter for the Y axis to translate the copies up the Y axis until they reach the top of the box. A final value of.4 will work well. Interactively Rotate the copies about the Y axis, so that they spiral to where their end point lines up with the Z axis once again. A final value of 10 0 will work well. 5. Append a transform SOP. Toggle its display flag on and: Set the Rotate parameter for the Z axis to a value of 90. set the Translate parameter for the X axis to a value of 25. This simply flips the path and centres it about 0,0,0. This is not necessary by any means but makes it easy to reference things in relation to the world centre. 6. You don t need the box any longer so both it and its Transform SOP can be deleted at this point 7. Append a skin SOP and toggle its Display flag On. 2 Side Effects Software 1999 Houdini Training v4.0
There is the creep path. In this example, the cross sections on the creep path are evenly spaced as a result of the copy. Although this is not completely necessary when using the Creep SOP, it will result in a smoother timing of the object as it creeps along the path. When using the Creep SOP, it is suggested that the path surface be constructed with a Skin SOP using Quads or Triangles as the Connectivity. This will create a Mesh, Bezier or NURBS surface, depending upon the input to the Skin SOP. These surface types are generated with U and V parameters that are used by the Creep SOP. If the source geometry you are going to creep along the path has thickness such as Bevelled text, or if you will want to rotate the Source on the path, then the creep path must be a Mesh connected with Quads or Triangles. The translation, scaling and rotation of the Source depends on the surface normals of the Path geometry. If the path is not a skinned mesh, the normals may be unpredictable and surfaces with thickness may lose that thickness or be squashed flat onto the path. 1.3 CREATING THE FILM STRIP In this example a simple grid will be used as the creep object. The grid will then be scaled over time, causing it to track along the path as though it were being pulled out of film canister. A colour ramp could be applied to the film reel or perhaps a simple animated shader colour that changes hue as the film tracks along the path surface. 1. Place another grid SOP in the layout window starting a new SOP column and toggle its Display flag On. The size of the grid does not matter as will see in a moment. Set the number of Columns to 2. In terms of the number of rows required, keep in mind that the length of the grid is going to be scaled to match the length of the spiral path. As the mesh grid is forced to spiral, it is going to require a considerable number of rows to ensure that it remains smooth. Matching this number up with the number of cross sections in the path is a good place to start there: Set the number of Rows to 100. 1.4 SETTING UP THE CREEP Source Input Path Input 1. Append a creep SOP to the grid SOP that is acting as the creep object. The creep SOP has two input nodes. When appended to the grid SOP the grid SOPs output is automatically connected to the first of these two nodes. This node is the Source Input node. The creep SOP now knows what geometry is to creep to along the path. Houdini Training v 4.0 Side Effects Software 1999 3
2. Connect the output from the skin SOP to the second input node of the creep SOP; the Path Input node. The creep SOP now knows what geometry is to be used as the Path. 3. Toggle the creep SOPs Display flag On. INITIALIZING THE GEOMETRY The first thing to do is to initialize the geometry on the path. To do this you will use the Initialize option. There are two types of initialization available: Fill Path The Source geometry is automatically stretched or shrunk as necessary so that it covers the full width and entire length of the path geometry. In this example, this option provides you with a great opportunity to find the minimal row count value necessary to maintain the smoothness of the creep grid. Toggle the viewport into shaded view mode Set the Initialize option to Fill Path. Display the grid SOP parameters while viewing the creep SOP. Decrease the number of Rows to a value of 50. At 50 rows, the grid maintains acceptable smoothness and close contact with the path surface. You will find that if you reduce it much further, the grid will begin to loose contact with path in the areas of tightest curvature. Right here you reduced your point overhead by 50%. 4 Side Effects Software 1999 Houdini Training v4.0
Keep Proportions The Source geometry will be scaled to fit the width of the path. Scaling of its height and length may also result in order to maintain its proportions. By default the Source object will be placed at midpoint along the path. 4. For this example select the Keep Proportions option. The grid is scaled proportionately and translated to mid point on the path. The parameter fields automatically update to reflect the initialization. Translate.5.5 0 Rotate 0 0 0 Scale 1 0.0390285 1.1 The parameter fields in the Creep SOP no longer reference the X, Y and Z axis of world space. You are now in the object space of the path, so the parameters now reference U, V and W. Remember; U, V and W parameters all have an effective range of O through 1. V U W is perpendicular to the surface 5. Set Translate V parameter to a value of 0. This sends the grid (film) back to the start of the path. 6. The Scale V parameter to a value of 0. This will reduce the size of the grid in the V parameter direction to nothing. 7. The skin SOP need no longer be templated, so you can toggle its template flag Off at this point. Houdini Training v 4.0 Side Effects Software 1999 5
1.5 ANIMATING THE CREEP 1. Reduce the length of the animation to 120 frames. To do this: Click to display more playbar options Click here to display the Global Animation Parameter dialogue window Set the End Frame parameter to 120 and confirm the entry with the R key. In response to the system prompt, elect to Squash the animation length. Close the window when finished 2. Ensure that the frame pointer is currently set to frame 1. 3. \ on the Scale field button and select Set Keyframe. scale v 4. Advance the current frame pointer to frame 120. 5. Increase the Scale V parameter to a value of 2. 6. Play back the animation. It turns out that a row count of 50 was a little low after all. A value of 50 would have been fine if you simply wanted to fill the path with the Keep Proportions option and leave it there. But when animating the Scale V parameter, the system calculates things a little differently and you really need about 120 rows. However, don t worry about that right now, it is about to change. 7. Save your file at this point. As you can see, the number of rows in the grid has to be set quite high so that the film surface will appear quite flexible and remain smooth at it scaled along the spiral path. However it is not necessary to carry the overhead of those 120 rows throughout the entire animation. Early on in the frame range very few rows are needed. As the length of the film surface increases over time, an increased row count is required to keep the surface smooth. Once again expressions come to the rescue. By using a simple expression to animate the number of rows in the grid over time, you can optimize the animation in relation to system overhead. 1. Display the parameters for the grid that represents the film strip. 6 Side Effects Software 1999 Houdini Training v4.0
In the Rows parameter field, enter the following expression: $F+1 Be sure to confirm the input by pressing the R key. You had to append the +1 to the expression in this case because at frame one, the expression would evaluate to a value of 1. One row and one column are invalid grid inputs. You would simply have a single point. 2. Play back the animation once again and note how the Row parameter updates as the expression is evaluated on a per frame basis. As the length of time increases, the number of rows on the grid increases as well reaching a total of 121 rows at frame 120. 1.6 CREATING THE DRIVE SPROCKET HOLES The film strip surface should have a series of holes along each edge that would mesh with the feed drive of the projector. These holes can be created easily using the delete SOP. The delete SOP allows you to delete selected polygons on a polygonal surface by: Using a bounding box or bounding sphere to define the polygons to be deleted Using the angle of the polygon s normals to define the polygons to be deleted Using a primitive number, number pattern or number range to define the polygons to be deleted In this case a numeric range will be used to delete the polygons. SETTING THINGS UP 1. Display the parameters for the grid that represents the film strip surface and: Increase the Columns parameter to a value of 7. This will divide the width of the film strip into 6 equal divisions. The spool feed holes will be 1/6 the width of the film strip. Houdini Training v 4.0 Side Effects Software 1999 7
THE DELETE SOP 1. Using the \ insert a delete SOP between the grid2 SOP and the creep SOP. delete SOP 2. Remember that each primitive that makes up the polygonal grid surface has a unique primitive number assigned to it. At this point, using frame 5 as an example, the grid surface representing the film is comprised of 6 rows ($F+1), and 7 columns for a total of 42 polygons numbered 0 through 41. 24 25 26 27 28 29 18 19 20 21 22 23 12 13 14 15 16 17 6 7 8 9 10 11 0 1 2 3 4 5 3. Working with the delete SOP parameters: Toggle the Number Enable button on. Set the Operation parameter to Delete by Range. This will enable the Start End and Every _ of _ parameter fields. 4. Working with the Start End parameters: Set the Start value to 1. There is no need to edit the End value. This value is currently controlled by the variable $N (number of polygons). The expression will keep updating this value on a frame per frame basis as the number of polygons in the grid increases due to the increasing row parameter. 5. Working with the Select_ of_ parameters: Set the second parameter to a value of 12. The parameters can now be interpreted as Select 1 of 12. Toggle the delete SOPs display flag On. 8 Side Effects Software 1999 Houdini Training v4.0
Polygon number 1 is deleted. The system then counts on 12 polygons and deletes that polygon as well. And so on and so on. The result: Polygons 1, 13 and 25 have been deleted 6. Advance to frame 120 and toggle the view port into shaded view mode. The spool feed holes should be clearly visible although we do need to adjust the length of them. 7. Display the parameters for the grid that represents the film strip. 8. Working with the grid SOP parameters: Edit the current expression in the Rows parameter ($F+1) to read $F*3.5 This creates considerably more polygons along the length of the grid. As the number of polygons increases, each polygon is considerably smaller, effectively decreasing the length of the feed holes. This value is a bit of trial and error to come up with an appropriate size. There is also one more adjustment that should be made in controlling the length of the feed holes. When the $F*3.5 expression was created to animate the number of Rows parameter you actually wrote a segment expression to create an animation curve. This expression created a curve with linear interpolation, the rate of change is constant over the entire frame range. The creep of the film strip over the path is controlled by an animated scale along the creep path. This curve is not of linear interpolation type. It is actually an ease curve. Therefore, the rate of scaling is not in sync with the rate of growth of the grid. To correct this: 1. Display the parameters for the creep SOP and: Open the Animation Editor for the Scale channel. \ click on the Scale field, and select Scope Channels. Click directly on the SY animation curve to select it. In the Function field, change the interpolation type to linear. Houdini Training v 4.0 Side Effects Software 1999 9
Close the Editor window. CREATING THE HOLES FOR THE OTHER SIDE OF THE FILM STRIP 1. \ to append a second delete SOP to the current delete SOP and: Toggle on the Number Enable button. Set the Operation parameter to Delete by Range. In calculating the Pattern this time you have to keep in mind that the numbering of the polygons has now changed since some of them have been deleted. After the first deletion, the grid will look like this: 22 23 24 25 26 16 17 18 19 20 21 11 12 13 14 15 5 6 7 8 9 10 0 1 2 3 4 Therefore, you want to start the deletion at polygon 3 and then delete every 11th polygon afterward. Therefore: Set the Start value to 3. Set the Select_ of_ parameters to 1 and 11. The result of the two Delete SOPs creates the two rows of feed holes. Polygons 1, 13 and 25 have been deleted Polygons 3, 14 and 25 have been deleted A film reel could have been constructed and placed at the start point of the path. With rotational animation applied to the film reel, you could create a quick anima- 10 Side Effects Software 1999 Houdini Training v4.0
tion for the introduction to a movie as an example. As the reel rotated the film would appear to pull away going into the spiral as it creeps along the path object. 1.7 A FINAL WORD Consider the Delete SOP when you want to cut the top out of box for example. A box (or cube) is made up of 6 primitives, numbered 0 through 5. Delete primitive 5 and the top has been taken off of the box. Working with the Delete SOP you would: Set the Operation option to Delete by Pattern. Set the Pattern parameter to a value of 5. Houdini Training v 4.0 Side Effects Software 1999 11