Wednesday, July 24, 2013

Lattice Fun: Correctives

I wanted to do this quick post to remind some of you the power of lattices when it comes to quickly shaping geometry. The workflow I'll be going over in the example below covers an quick and easy technique for creating some pose space deformations. Do keep in mind however, that while this technique is great for deformations on single axis rotations, in areas that allow for multi axes rotations we would need a more advance approach.

You can also watch here the video example for setting this up.
So let's get started.

I'll be using a simple polygonal cylinder to demonstrate this. So go ahead and create a cylinder.
Give it enough resolution so we can deform this properly.

Next lets create some joints for skinning the geometry to.

Now, lets go ahead and create a lattice to deform the cylinder. Select the cylinder, and goto
Create Deformers -> Lattice 

Give the lattice enough resolution to deform the geometry properly. Think about the shape you want to achieve and how many control point spans you might need. I changed the divisions along the height to 9, that way I'll have 3 control spans in the midsection of each bone, and that will give me enough control. Play around with these values and see what suits your needs for what you have in mind.

This is where this gets fun. We now want to bind the lattice to the joints, so Select the first joint, Shift Select the lattice and goto
Skin -> Bind Skin -> Rigid Bind (at default settings -> it will use the joint's hierarchy)

Note: We could have used the Smooth Bind instead. However, we are looking for easy control of shaping, and when we begin tweaking the lattice to shape our corrective, you'll notice that the smoothing from the Smooth Bind can get in the way. We Rigid Bind the tweaking are more precise.

Great. Now test out the setup by rotating the mid joint.

Right now, the deformation is a little rough however, so to get a better starting point.
Change the Local Influence in the ffd1 node (located under the lattice's OUTPUTS).

The skinning should be smoother now (see, and we are not even using Smooth Bind!) :)

The last step is just modifying our lattice to give us the desired shape on the geometry that we want.
Before you do this, just figure out how you plan on using this new shape. You can use it for a BlendShape target for example by duplicating the new geometry and getting rid of the lattice. Or you could just leave the lattice and use Set Driven Keys using the joint's rotation to drive the lattice's control point's position.

If your going with the second option, make sure you you set a key on the Set Driven Key window before you start tweaking the lattice points. Select all latices points and click Load Driven, select the mid joint and click Load Driver.

And thats it!

Now go have fun using lattices!

1 comment:

  1. rotator cuff tear

    We are a medical office specializing in the treatment of orthopedic problems such as sports injuries, joint, bone pain and more information then visit - Website:

    Contact Us:>

    10105 Banburry Cross Dr. Suite 445 Las Vegas, Nevada 89144
    PHONE:(702) 475.4390 FAX: (702) 951.5456