Animating Through a Lattice

Lattices don't only work on polygons; they can be used on any geometry in Maya 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 will animate an object through a simple lattice.

If you had a chance to move 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 in the previous example. 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 will create a NURBS sphere with eight sections and 16 spans, and an open-ended NURBS cylinder that has no end caps.

1. 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 6.20.

Figure 6.20 Arrange the balloon and pipe.

2. Select the balloon and create a lattice for it (Figure 6.21). (From the Animation menu, choose Deform * Create Lattice.) Set the S, T, and U Divisions to 4, 19, and 4, respectively. This number of lattice divisions is set to create a smoother deformation when the sphere goes through the pipe.

Figure 6.21

Figure 6.22 Relocate the lattice to the cylinder

  1. 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 (Figure 6.22).
  2. Deselect the lattice base, and go to Component mode for the lattice itself. Select the appropriate points and shape the lattice so the middle of the lattice fits into the cylinder (Figure 6.23).
  3. 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 will 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 interpénétration. 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 will notice the interpenetrations even more. Figure 6.24 shows the balloon squeezing through the pipe.

Figure 6.22 Relocate the lattice to the cylinder

Figure 6.23 Squeeze in the lattice points to fit the cylinder

Figure 6.24 Squeezing the balloon through the pipe using a lattice deformer

Figure 6.24 Squeezing the balloon through the pipe using a lattice deformer

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

+1 0

Average user rating: 5 stars out of 1 votes

Post a comment

  • Receive news updates via email from this site