Putting on the Crush

LightWave Legend Larry Schultz crushes cans in his last tutorial for the LightWave 3D Group

Posted: Wed 19 Dec 2012

Creating a tutorial with tools and techniques that can be applied to other projects is always a challenge. However, not too long ago I found a thread in the LightWave forum where an artist was looking for a way to animate crushing a Coke can. After some thought, it was apparent that to create this type of animation would require the can to be made of several segments, rather than a simple cylinder, to allow the areas to bulge and dent from the crushing force.

To keep the deformations from looking overly polygonal, we will use subdivision surfaces or SubDs. The top and bottom of the can need to be circular disks composed of quads or 4-sided polygons in a grid structure to make them as compatible with SubDs as possible. We don’t want the top and bottom to be simple n-sided polys because those won’t deform well and could easily create degenerate or non-planar polygons. These types of polygons are generally not desirable because they tend to not render properly.

step 01.

To begin, we need the dimensions of a standard Coke or soda can, which are typically 2.5-inches in diameter and 4.8-inches tall. It would be ideal to use the Disk tool in Modeler to easily create a cylinder with segmented sides, but that isn’t possible because the top and bottom of the cylinder are single n-gons as in Figure 1.

step 02.

Instead, we could create a segmented disk that is extruded—this can be done in a couple of ways using the Sphere tool to create a segmented sphere as in Figure 2. Select the lower half of the polys and delete them, then take the upper half of the sphere and use the Set Value tool (see Figure 2) to flatten all the polys to 0 on the Y-axis and make a segmented disk. Even though it is segmented, its not segmented in a grid shape but rather in polys radiating from a central point like a spider web. The same problem would occur if we lathe a polygon into a cylindrical shape with the top and bottom segmented the wrong way.

step 03.

The most efficient way to create our can shape is to Select the Box tool. Hit the N (numeric) key to bring up the Control panel for the Box tool (Figure 3). At this point you’re probably wondering...why are we creating a segmented circle using the Box tool? No worries, it will all be made clear shortly.

Set the width to 2.5-inches, height to 0, and depth to 2.5-inches. Now Center X, Y and Z to 0. Push the F2 key to center the square you created, then push both the Shift and D keys at the same time to bring up the Subdivide Polygon tool. Select Metaform and hit OK. This will cause the square to turn into eight connected polys with eight sides (Figure 3).

step 04.

Push shift D to bring up the Subdivide Polygon tool again, Select Metaform again. Repeat this again for a third time. This should give you the results shown in Figure 3. We now have a circle composed of 64 quads or four-sided polygons. To get the rest of the can, Lasso select all the polys. Next select the Extrude tool (Shift E) and pull the polys down slightly (you will see a blue handle). Stop and push the N key (numeric). When the Extrude Tool Control panel appears, set the number of sides to 28 or a number that will give you nice even quads. At this point it’s important to remember that the Extrude Tool also tries to extrude and duplicate the internal geometry, not just the external parts. So, after extruding, switch to Point Mode (at the bottom left of the Modeler screen). Hit the W key to bring up the Statistics Tool (Figure 4). Click on the + key next to where it reads 0 points. This will select all points not attached to polys. The result should be a little more than 1000 points. Once the points are selected, go ahead and delete them. At this point you should have a cylinder that looks like the one shown in Figure 4. And remember, it’s good practice to always save your work often and on a regular basis.

step 05.

Next we will taper the top and bottom of the can (fFigure 5). Use the Lasso Selection tool to select the top three rows of polygons then use the Taper Constraint Tool under the Modify Tab. Choosing the N (numeric) key will bring up the Taper Constraint control panel to set your Falloff to Linear controls (Figure 6).

Step 06.

To Shape the object, select the first widget of the four that are shown and change the shape of the curve to the shape found in Figure 6. Set the Range to Fixed. Now from the Top viewport, put the cursor in the exact center of the circular grid and taper with the left mouse button. The shape you get should look similar to the one shown in Figure 6. Repeat the same process on the lower three rows of polys at the bottom of the can. This time select the second widget next to the word Shape. Set the Range to Automatic. Again, in the Top Viewport, move the cursor to the center of the selected polys and taper until you get the shape shown in Figure 7. At this point the basic shape of the soda can is complete.

Step 07.

Now we need to model in the detail the top and bottom of the can. First we will create the lip on the outer part of the top edge. Do this by selecting all the polys at the top of the can as shown in Figure 8. Using the Multishift tool, right click and drag the mouse slightly to the left to insert a new row of thin polygons. If all the polygons bevel as separate polys instead of a single group, hit the N key to open up the Multishift Control Panel and click on Group Polygons. It helps to also hold down the Control key to Constrain the shift. Now we have the same circular grid on top of the can with a thin strip of polys around it. With the Multishift tool active, right click again and drag polys down to Shift the group down and create a new edge. Right click again to set the tool and Inset that new group of polys inward like the first time we created the thin row of polys. Repeat this process one more time and Shift the new group of polys up slightly. This creates the lip around the outer edge with an indentation running around the inner edge as shown in  Figure 9. You will need to use Multishift four times—inset, shift down, inset, shift up. By now the top of the can is mostly complete.

Step 08.

Next, let’s create the tab that is used to pop open the can. Select the six polys indicated in Figure 10. Copy and paste them into Layer 2 then Subdivide the polys using the Shift D keys or Subdivide tool. Set the pop up panel to Metaform. Do this a second time as shown in Figure 11. Subdivide again for a third time and select the polys indicated in  Figure 11. Cut these polys from Layer 2 and paste them back into Layer 1. After the tab polys are pasted back into Layer 1, select them again and Extrude up slightly to give some thickness (see Figure 11).

Step 09.

Select the six polys that will create the opening at the top of the can, again as shown in Figure 12. Slightly adjust the end points of this group of polys away from the group. With the same group of polys selected, use the Taper Constraint tool to taper the group of polys back towards the center of the can slightly as shown in Figure 12. Now, select the six polys that are part of the can opening (Figure 13) and use the Multishift tool to Shift the polys down, creating the indentations around the opening. Deselect all polygons. Now push the Tab key to turn on Subdivision Surfaces or SubDs. Now things should appear a bit softer and rounded–see the right side of Figure 13. At this point we are essentially done with the top of the can and now we can focus on the bottom. Select the polys at the bottom of the can as shown in Figure 14. As we did when creating the top of the can, use the Multishift tool to slightly Inset the polys and create a thin ring of polys on the outer edge of this group. With the group of polys still selected, click on the Magnet tool. Go to the top viewport and, using the right mouse button, draw the bounding box around the outer edge of the selected polys as shown in Figure 14. Once the bounding box for the Magnet Tool is around the outer edge of the selected group of polys, go to the back view. Press the left mouse button and carefully drag the polys upward into a dome shape from the center of the polygon group. Make sure that the deformation curve for the magnet tool is properly adjusted as shown in Figure 15. Once this is done the modeling is complete. Now we move on to some really cool parts of LightWave.

Step 10.

Begin by selecting all the points in the middle section of the can between the top and bottom as shown in Figure 16. At the bottom right of the Modeler screen, note the Vertex Maps panel. Locate and select the weight map or W button. In the Entry field to the right of the panel, select New from the list. This will bring up the Weight Maps panel. Name the new weight map we are creating “can” and give it a 0% Value. Make sure the the upper right Viewport is set to Perspective mode and the Render mode is set to Weight Shade as in Figure 16. With the points still selected, go to the Map Tab and in the toolbar under the word “color”, click on the button labeled Textured Point. A panel should appear (see  Figure 16) that says Apply Texture. Leave Offset and Scale to the default settings. Select the Y axis. Set Vmap to Weight Map and set the Vmap name to can. Now click on the Texture Button.

Step 11.

When the Texture Panel appears (see Figure 17), change the Layer type to procedural, the Procedural Type to turbulence, and Scale X to 3cm, Scale Y to 2mm, and Scale Z to 3cm.

Step 12.

Leave the rest of the settings at default. You will see blotchy red streaks on the can which is the weight map at full value on those points. Now we’re going to do a little trick. Select the current texture layer and then click on the Copy button and select Copy Layer. Now under the Paste button select Add to Layers. Next, select the new layer, click on the Invert Layer button and change the texture Value to -1. This will now cause the green spaces between the red blotches on the can to turn blue. This means these areas have negative weight values (see Figure 18).

Step 13.

Let’s deselect All Point and change the Viewport Render mode to texture shaded instead of weight shaded. At the Vertex Maps panel, again at the lower right bottom of the Modeler screen, select the M key for Morph Map. In the field to the right, select New and give the morph map the name Crush (Figure 19).

Step 14.

Leave the morph type to Relative and click on the Create button. Now we’ve created our first Endomorph. I know, nothing happened. But that’s because we’ve created the endomorph but we haven’t changed the geometry, which we will do now. Click on the Stretch tool or use the H key and Hit the N (numeric) key to bring up the Stretch Control panel. Change the Falloff type to Weight as shown in Figure 20.

Step 15.

Change the Horizontal and Vertical Factors to 120%. You should see the can appear to bulge out and dent in. The red areas of the can, which are the parts with positive weight values, stretch out while the blue areas, or the parts with negative weights dent in as shown in Figure 20 . Everything we’ve done to change the can since creating the endomorph called Crush is now part of the morph. Before closing the Stretch Control panel, change the Falloff type back to None. Now select all the polys in the middle of the can as shown in Figure 20.

Step 16.

From the back view set the cursor right at the bottom edge of the selected polys, hold the Ctrl (control) key down to constrain, and with the Stretch tool still active, pull the geometry down towards the bottom as shown in Figure 21.

Step 17.

Now select the top of the can at the top of the viewport. Hit the T key or select the Move tool. And again, while holding the ctrl key down, move these polys down to the ones we stretched down in  Figure 22. Deselect all the polygons. Select the Taper Tool and place the cursor at the bottom of the can in the Back Viewport. Press the left mouse button and pull down slowly with the mouse to get the crushed can to taper. It should now look something like the model shown in Figure 23.

Step 18.

At this point we’re done. Change the morph back to Base in the Vertex maps panel. You can now switch between Base and Crush to see the difference. Save the object and then send it to Layout and apply Morphmixer to the can.

Step 19.

Figure 24 shows the Base and Endomorph side-by-side. As you move the slider for the Crush endomorph you will see the can crush in real time.

Larry Shultz, known in the LightWave community as Splinegod, has been involved with computer graphics since the 1980s and has worked at several high-profile studios, including Foundation Imaging and Warner Bros. His video tutorials are available on www.liberty3d.com and on the SplineGod YouTube Channel.