Your online Softimage Educational Resource

The blog has been online for more than 4 years and there’s still not a single post even remotely related to the delicious brew called coffee… Perhaps it will someday, but in the meantime you can read the articles about Softimage. Most of the material are tutorials and Q&As I’ve written for 3D World Magazine sometime between today and 2003. If you have any questions please don’t hesitate sending me an email.


Thanks to Letterbox Animation Studios for hosting all the scene files.

Make sure you visit their Redi-Vivus.com for 100s of hours of free XSI video tutorials.

Saturday, July 5, 2008

Lattice Rigging

I guess most of us just think about paper bags as a very practical way to carry our merchandises home from the supermarket, or to stockpile all kind of weird bits and pieces in the closet, though you know you have absolutely no intention of ever using them again so you really ought to toss it right away; but as one of our readers found out, there obviously are other fields of application for them as well.

The paper bag is in fact a relatively old innovation and was mentioned in Europe as early as during the seventeenth century. Tough they where folded and glued by hand during that time they still have the same characteristics - a void, surrounded on five sides by a thin piece of paper.

Most paper bags are constructed in the same manner, a tube of paper, which is folded together at the bottom. Part from obvious differences such as size and color, one of the few things that differ an everyday bag from a more luxurious model is usually the added coating/finishing and quality of the paper and the handles. The ones you get at an expensive design store for example usually have nice shiny surface and handles that are made by stings of fabric or plastic instead of the same unexciting paper as the rest of the bag.

So how do we animate an object that hasn’t got any part that even comes close to resembling a leg, face or limb for that matter? Well, by taking a second look at the bag we might find out that the above assumption isn’t necessarily true. Even though the bag is monotonously shaped, it at least has four corners and in the middle of those corners there obviously is a center. Take these and add a bit of imagination and we all of a sudden have two feet, two shoulders and a hip. Quite good ingredients for a character animation in other words. Despite our newly invented limbs, the shape of our object would still make it somewhat inconvenient to be setup and animated with bones, so we could benefit from another solution.

We’ll approach the problem with a basic, but for this task, very suitable method. In fact the entire deformation of the object will be controlled by a single lattice with the resolution (or subdivision) set to create areas that corresponds with the “body parts” we are about to animate. This enables us to control the geometry with very few points while still being able to create complicated poses.
Since it is not possible to animate the actual points directly with the standard SRT tools in XSI (without using Shape Keys) we need to add one more thing to facilitate the animation process. By constraining the points to different Null or Implicit objects and animate these instead we’ll make it easier to select and transform any of the parts. Implicit objects are like Nulls with another shape, which can be an advantage when trying to distinguish them in a cluttered scene for example.

Since we quite seldom, to say the least, get the chance to see paper bags walking around out of their free will we need to find something else to base our movement on. Conveniently the movement of a human will translate very well, but since it still is a paper bag we’ll loosening it up to give it a slightly cartoonish walk. The walk can say a great deal about a person’s character, such as gender, age, physique, frame of mind, etc. Given that no two persons therefore walk identical the appearance or design of a walk is never-ending. The idea on the next page is to show you the basic of setting up and animate the paper bag. To keep things simple it can be helpful animating one or two parts at the time. You can for example start with the feet. Once satisfied with the way they move, you can start working on the other parts. The bag’s true personality is something you will give it. As you start playing around with the bag you will probably find different posses and timing that better suits your needs, but you have gained the understanding how to realize them.

If we successfully manage to tie all of the above together, we’ll end up with a nice and easily controlled animation of our newly found friend, so enjoy.

The project files used in this tutorial can be found at:
http://www.Redi-Vivus.com/Caffeineabuse/Lattice_Rigging.zip


Paper Bag Step by step - Get your paper bag up and running with these six steps
If you haven’t got a model standing by, load the scene called paper_bag.scn from the magazine cover CD. The geometry of the paper bag is quite uncomplicated and was basically constructed with a Cube where the top polygon has been deleted. Edges were then added to create the creases before giving it its overall shape. Since the paper is extremely thin, there’s really no point adding twice the amount of polygons to create the inside.
Select the paper bag and create a Lattice. By having the object you want to deform selected the Lattice will automatically be created with the right dimensions and at the right position. Set the X Subdivision to 3, the Y to 3 and the Z to 1. With the Interpolation set to Linear, the deformation will be a bit to pointed so change both the X,Y and Z to Curve.
In this environment it can be difficult to spot a Null, so start by creating an Implicit Cube instead and name it Hip. Set the length high enough for the borders of the Cube to reach outside the bag and position it in the middle of the four center points of the Lattice. Create four new Implicit Cubes and position one at each corner. Name them lt_foot, rt_foot, lt_shoulder and rt_shoulder.
Next we need to constrain the different areas of the Lattice to the respective Cube. Start by selecting the four center points on the Lattice and choose Deform>Cluster Center and pick the Hip cube. Move on by selecting the three points in the lower right corner, apply another Cluster Center and pick the corresponding cube. Repeating the previous step for the remaining corners. You can now hide the Lattice to get a clearer view.
To create a simple step we need at least four different poses. Let’s start by creating the position where both feet touch the ground. Change the selection filter to Implicit to make the selection easier. Move lt_foot and rt_sholder forward and rt_foot and lt_sholder backwards. Set a keyframe. Go to frame 9 and move the hip and rt_foot slightly forward and upwards. Move rt_shoulder forward as well and set a new key for all Implicits.

At frame 18 move the lt_foot forward and lower it so it touches the ground again. Move lt_shoulder and the hip forward, but lower the hip as well. Set a key. At frame 27 move the hip and lt_foot forward and up and both shoulders forward. At frame 36 move all Implicits forward, except lt_foot. Lower the hip and rt_foot. Play the animation back and forth. Try experimenting by adding rotation to the objects and animating the shoulder going up and down as well. Open the Animation Editor and fine-tune your curves…





A couple of additional tips

Tip # 01
Although the setup in the step by step guide gives you a neat and swift way to animate your bag, there are times where your animation might call for a specific pose, expression or the need to control the sides individually. This can be very difficult or just isn’t achievable with the current setup. To bypass this, increase the subdivisions on the lattice to allow more areas to be controlled separately. By constraining the new areas to new Null or Implicit objects and putting these in hierarchies with the old Nulls as the parents, you can maintain the simplicity of the original setup but with the extended control. The above technique can then be used either in conjunction with Shape Keys and the Animation Mixer or entirely replaced with by it.

Tip # 02
If you are using Nulls instead of implicit objects as the deforming object for the Cluster Centers you can save a mouse click or two. By selecting the desired points and choosing Create Cluster with Center under the Edit menu, a Null will automatically be created and the points constrained to it.

Tip # 03
Often when working on animations you should try to keep everything as smooth as possible, but there are occasions when you don’t want that, and if you are aiming for grater realism this is one of those. Try playing around with a real paper bag for yourself and you will see that it in fact has no intention what so ever of deforming smoothly. Instead you tend to get lots of somewhat flat areas and creases whenever you fold the paper. So by not overdoing the tessellation or subdivision of the object, but rather keeping the surface at a fairly low or medium polygon count can actually add to the realism of your animation.

Tip # 04
You can use different textures and materials for the inner and outer surface of your paper bag by connect the materials to the respective input of the Front-Back node. This node can be found in the Render Tree under Nodes>Switch.


0 comments: