"Tech Talk" - January/February 2008

Indirect Binding
by Si-Hyung Kim

For Whom Is This Written?

Anyone who has been frustrated with the fact that you can’t change the number of divisions after you’ve shaped or rigged a lattice. If you haven’t had an issue with that, good for you! But if you read on, you might know what to do if you do ever encounter the situation.

Introduction

Lattices are a great modeling and rigging tool, letting you influence a surface of any type or complexity through a number of points that you specify on a cube-shaped object. However, as with any other tools, lattices have their own limitations. The drawbacks of lattices are 1) that they are cube-shaped, and 2) that the number of divisions on a lattice cannot be changed once the points have been moved. How many times have you sculpted or rigged a lattice and then wished you could add another division in the same way as you can do on a polygonal or NURBS surface? In this article we will focus on ways to get around the limitation of changing the number of points on a lattice after the points have been moved through the means of indirect binding by using a Soft Modification Tool.


Overview

The following topics will be covered in this article:

In order to get around the limitations of adding divisions to a lattice once the points have been moved, we first need to cover indirect binding and learn how we can use it to our advantage.

Indirect binding

Indirect binding is a method of binding/influencing a surface through the spatial information of the deformer, as opposed to a bind where the vertices on a surface are directly bound through the weight value on each vertex. Indirect binding can also be referred to as spatially-based deformation. In Maya, lattices and soft mods are indirect binding tools, while cluster and skinClusters and are direct binding methods. So why is indirect binding useful? The pros and cons are listed below.

Advantages of indirect binding:

Disadvantages of indirect binding:

These points will be discussed in detail in the following sections.

Soft Modification Tool

As we cover the Soft Modification Tool and compare it to the functionality of clusters, the distinction between indirect binding and direct binding will become clearer. Soft Modification is a spatially-based tool, which means that the weighting is not tied to specific vertices, but instead weighted to any vertices that lie within that area of influence in space. Therefore, the model can be changed on the fly, and the surface does not need to be re-weighted. (A word of caution: when creating a soft mod on the surface, create it in object mode not in component mode. If the soft mod is created with the vertices selected, it will behave similar a cluster)

Since it is a spatially-based tool, the area of influence of Soft Modification can be changed on the fly. It is very easy to create and modify broad deformations, and the channels can be keyed - resulting in an "animated weighting", if you desire to do so.

For soft mods, the vertices are not directly bound to the deformer. The vertices do not have weighted values between 0-1, but instead they either have a value of either 0 or 1. A value of 0 would mean that the vertex is not affected by the deformer and a vertex with a value of 1 would mean that it will be deformed. However, the falloff value is determined by the falloff radius of the soft mod.


Changing divisions on a rigged lattice - putting everything together

Now we get to the process of changing the divisions on a lattice. The steps involved are actually very simple and straightforward, but having the previous information of indirect binding is very helpful.

1.) Create a default polygon sphere.

2.) Create a lattice on the sphere with STU divisions of "3 3 3".

3.) Create a soft mod on the lattice. The easiest way to do so is to select the lattice and click on the Soft Modification Tool icon in the Toolbox (where the transformation tools are docked in). It should be towards the bottom of the stack.

4.) Click on the light blue icon towards the bottom of the sphere. If you do not see the icon by default, select the soft mod deformer and press the "t" key to go into Manipulate Tool mode.

5.) Hold down the "v" key, and middle-mouse click on a lattice point to snap the origin of the soft mod influence to the point. Then left-click drag on the red circle to adjust the falloff radius.

6.) Press the "w" key to go to the Translate tool, and move the soft mod 0.5 units along the X axis.

7.) Set the "Envelope" value for the lattice deformer node to "0" to turn it off for the moment.

8.) Create a new lattice on the sphere with STU divisions "5 5 5".

9.) Open up the Relationship Editor by going to "Windows > Relationship Editor > Deformer Set". Then connect "softMod1Set" to "ffd2Lattice". The new lattice will now receive the same weighting as the original lattice.

10.) Delete the old lattice, and now the new lattice with divisions of "5 5 5" is influencing the sphere!


Indirect binding in a nutshell

Conclusion

Although it would not be desirable to go through these steps while using lattices as a modeling tool, this approach would work great when using lattices as a rigging tool. Most users set up clusters to control the lattice points, but by using soft mods to set up the lattice in a rig - and scripting the process - you will be able to change the lattice divisions.

Here is link to a video clip of the demo of changing the division of a lattice after it has been rigged:
http://www.animationcoop.org/images/features/IndirectBinding/IndirectBinding.mov

I’ve used MEL to create a simple GUI that takes care of deleting the existing lattice, creating a new lattice with a specified number of divisions , and transferring the weights to the new lattice.

I hope this article has been somewhat useful for Maya users. Please feel free to send any questions, comments, and suggestions to shk1101@hotmail.com

Si-Hyung Kim


If you have an article, tutorial, essay or other content that you would like to submit for the Monthly Feature, please send mail to: monthly@animationcoop.org

About Us | Contact Us | ©2007 The Animation Co-op | 2340 Overland Avenue, Los Angeles, California 90064 USA | (310)689-6062