Animating through a Lattice

Lattices don’t only work on polygons; they can be used on any geometry in Maya and at any stage in your workflow to create or adjust models. You can also use lattices to create animated effects. In the next exercise, you’ll animate an object through a simple lattice.

In the previous example, if you moved the hand geometry through the lattice while it was still applied to one of the fingers, you should have seen an interesting effect before you deleted the last of your lattices. The parts of the geometry of the hand deformed as the hand traveled through the lattice. Think of ways you can use this warping effect in an animation. For example, you can create the effect of a balloon squeezing through a pipe by animating the balloon geometry through a lattice.

In the following exercise, you’ll create a NURBS sphere with 8 sections and 16 spans, and an open-ended NURBS cylinder that has no end caps:

1. Choose Create ⇒ NURBS Primitives ⇒ Sphere ❒, and set the Sections to 8 and Spans to 16 and create the sphere.

2. Choose Create ⇒ NURBS Primitives ⇒ Cylinder ❒, and check None for the Caps option. Scale and arrange the sphere balloon and cylinder pipe as shown in Figure 5-69.

Figure 5-69: Arrange the balloon and pipe.

f0569.tif

Figure 5-70: Create a lattice for the sphere.

f0570.tif

3. Select the balloon, and create a lattice for it (see Figure 5-70). (From the Animation menu set, choose Create Deformers ⇒ Lattice.) Set the S, T, and U Divisions to 4, 19, and 4, respectively. You set this number of lattice divisions to create a smoother deformation when the sphere goes through the pipe.

4. Select the lattice and its base in the Outliner (ffd1Lattice and ffd1Base nodes), and move the middle of the lattice so it fits over the length of the pipe (see Figure 5-71).

Figure 5-71: Relocate the lattice to the cylinder.

f0571.tif

5. Deselect the lattice base, and go to Component mode for the lattice. Select the appropriate points, and shape the lattice so the middle of the lattice fits into the cylinder (see Figure 5-72).

6. Select the sphere, and move it back and forth through the pipe and lattice. Notice how it squeezes to fit through. If you look closely, you’ll see that the sphere starts to squeeze a little before it enters the pipe. You’ll also see parts of the sphere sticking out of the very ends of the pipe. This effect, in which geometry passes through itself or another surface, is called interpenetration. You can avoid this by using a more highly segmented sphere and lattice. If you try this exercise with a lower-segmented sphere and/or lattice, you’ll notice the interpenetrations even more. Figure 5-73 shows the balloon squeezing through the pipe.

In a similar fashion, you can create a lattice along a curve path and have an object travel through it. You’ll try this in Chapter 8.

Figure 5-72: Squeeze in the lattice points to fit the cylinder.

f0572.tif

Figure 5-73: Squeezing the balloon through the pipe using a Lattice deformer

f0573.tif
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset