Smoother Animation With Intel® Core™ i7 Processors

by Steve Pitzel

Introduction: Disguising seams in NURBS models

Today is a great day to be a 3D animator! It wasn't long ago that animators were stuck with creating stiff-jointed, scarred-looking automatons. These characters had all the beauty and grace of Frankenstein. Rendering engines couldn't handle deformations, or high-level geometry, and polygons ruled the gaming world. The computing power for creating fluid movement and seamless-looking joints simply wasn't there.

Intel® Core™ i7 processing power brings 3D animation to life

Now animators can create characters that move naturally with the computing power of Intel® Core™ i7 processors, and Non-Uniform Rational Basis Spline (NURBS) geometry. NURBS geometry is supported in animation packages such as Autodesk Maya*.

 Shoulders are the bane of NURBS modelers. Note the seam scar typical of NURBS models.
Figure 1: Shoulders are the bane of NURBS modelers. Note the seam scar typical of NURBS models.

Unlike modeling with polygons, NURBS modeling lends itself to creating smooth, flowing surfaces-the sort of surfaces living things like dolphins, and deer, and even action characters have. Perfect for 3D characters. An added advantage to NURBS is that it's scalable. Gaming engines can be programmed to subdivide the curve of a NURBS surface to any degree necessary. That means your characters can be as smooth or coarse as they need to be, based on things like processing speed or proximity to the camera.

The challenge of modeling with NURBS

NURBS geometry does have its own set of challenges. The main one is that it's a nearly closed system. Think of every NURBS object as a very exclusive club with ridiculously tough membership rules. It's very difficult, sometimes even impossible, to get two NURBS objects to join. They can only attach along an open edge. A NURBS sphere, for instance, is only open at either end and along one side. But what if, for instance, you need to put an arm on both sides? Too bad. You have to break them apart, thus opening them up, and glue them back together. Invariably, this creates ugly seams. The more complex your NURBS characters, the more seams they have. This is why developers are using all sorts of tools and tricks to hide them.

Practice with a simple model

First, let's start with something a bit simpler than a human torso. Take the fellow in Figure 2. He's made up of 17 separate NURBS objects. What you have to worry about are the places where those objects touch each other. Here's where you have to make some decisions-some based on how realistic the character is-others based on how "obvious" the seam is. In real-time 3D, there's always a tradeoff between realism and interactivity. Since he's a "cartoony" sort of fellow, the eyes are okay as separate objects from his head-in fact, a scene might require scaling them up or down, or pulling them completely off his face. Attaching them seamlessly to his head would actually be a mistake.

 He's in 17 pieces. Which joints really need to be seamless?
Figure 2: He's in 17 pieces. Which joints really need to be seamless?

Problems with attachment points

The real problems are the attachment points for his hand, fingers, and arm, all of which should look to be part of one, continuous being, even though they move independently (Figure 3).

The hands are easy. The fingers are never seen up close, so you don't have to bother hiding their seams (purple arrows in Figure 4). The thick white line (yellow arrow in Figure 4) denotes the edge where the NURBS object starts and ends-3D NURBS geometry is really just a flat grid, or plane, wrapped into a closed shape. It begins and ends in the same place, much like a snake swallowing its own tail. Is that line (yellow arrow) a seam you should worry about? Absolutely. If you were to wrap it with a texture that doesn't end the same way it begins, the seam would resemble a scar.

 Problem areas.
Figure 3: Problem areas.

 Visible seams.
Figure 4: Visible seams.

Solutions to consider before disguising seams

I usually build my NURBS objects with the seam facing away from the camera to minimize that problem, but in real-time applications, you may not have that option. The last seam on the hand lies where it attaches to the forearm (red arrow in Figure 4). You can do three things, as I have here, to minimize the effect:

  • Model the hand and forearm as one piece and detach the hand later-this assures continuity between the forearm and hand.
  • Detach the hand a distance away from the actual bend point of the wrist, which helps keep the seam from puckering or tearing during animation.
  • Design the character with gloves on his hands, and tuck the forearm slightly inside them-this gives the audience a natural break between hand and forearm-they won't notice a slight pucker. (This design technique is actually a carry-over from jointed polygonal models that couldn't deform at the joints. Along with modesty, we can be pretty sure that's why Lara Croft* wears gloves, shorts, a vest, and boots.)

 


Blends

Using the blend tools found in high-end animation packages like Autodesk's Softimage, and Maya, you can create smooth, elastic joints at attachment points. What's really great is that these tools allow you to join surfaces of differing complexity. You don't have to spend time rebuilding your surfaces to make sure they have the same topology. Still, before using blends (or any other relatively new technology) make sure your rendering engine supports them. Commercial rendering engines include Cycore Cult 3D*, and Unreal Technology*.

 Well begun is half done.
Figure 5: Well begun is half done.

Model adjoining NURBS objects to be as similar as possible

The best way to join any two NURBS objects is to begin by modeling them as closely to one another as possible. Case in point, to create the shoulder/arm piece shown in Figure 5 (red arrow), I first drew a spline following the contour of the body, and then revolved that spline to create the basic arm shape. Even though I'll eventually cut away a good deal of the shoulder piece later, starting this way has assured me of a smooth transition between torso and arm once I'm ready to blend. In Figure 5, I've moved the spline slightly above the model only to make it more visible here; in reality, I would draw it directly onto the profile curve of the surface.

 Deform both surfaces together with a lattice.
Figure 6: Deform both surfaces together with a lattice.

 Project a 'trim' curve.
Figure 7: Project a "trim" curve.

If possible, group your two objects together, then use a deforming tool like a lattice (light blue scaffolding shown in Figure 6) to rough out the general shapes of the two pieces. Again, this goes a long way toward creating a smooth blend between the surfaces later on.

Trim joining pieces, then blend them

Once you've finished modeling the torso and arm, it's time to trim away a bit of both. This allows the blend surface to average its own curvature between the two pieces. Depending on the 3D package you're using, the trunk of the arm can either be cut away or detached. To make a corresponding hole in the torso involves a projection/ trimming process. Usually, I cut the arm, duplicate the curve or isoparm (supporting structure or flow line) nearest the torso, and project the duplicated curve right onto it.

Once you've projected the curves onto the surface of the torso, you can trim the extra geometry away, and skin between the surface curve and arm, or use the blend tool to build a fillet (a rounded corner connecting the edges of two other surfaces) between them.

 Pull the arm, and the blend stretches with it. Amazing!
Figure 8: Pull the arm, and the blend stretches with it. Amazing!

 The model with blends in place and a simple  bone structure-all set for posing.
Figure 9: The model with blends in place and a simple bone structure- all set for posing.

For example, the Fillet Blend tool in Maya, creates a naturally stretchy surface between the pieces.

Voila! All that's left, is to toss in a skeleton, bind your model around it, and begin animating!


Transparent textures

One way to get around the problem of joining surfaces that just don't quite match up is not to try. Transparencies offer a great solution for disguising seams in models that aren't exactly a single mesh. They can save a tremendous amount of time over working with projections, trims, and blends. Using transparent textures is one of my favorite seam-hiders.

Problem

 Use transparencies to hide the seam between arm and torso.
Figure 10: Use transparencies to hide the seam between arm and torso.

Consider the fellow in Figure 10. You could use a blend, but maybe you don't want a complex piece of geometry between the arm and torso. Let's say you don't want to spend the time to get every isoparm in order and rebuild the surfaces, and deal with stitching. The detach/rebuild/re-stitch method will take a while on this guy, and he's not nearly as complex as many naked half-torsos you'll see.

When you render him, you can really see what a mess you've got. There's an unacceptable scar where the arm is modeled partway onto his chest. So let's take a shortcut.

 Model with unacceptable scar.
Figure 11: Model with unacceptable scar.

Solution

An easy way to fix this is to hide the seam with a texture that fades to full transparency before you ever see the attachment point. As with everything in modeling, the key to good transparent textures lies in planning. Even though the arm would hide the shoulder stump and part of the torso's side, I modeled the torso to include part of the arm, and the arm is built to include part of the torso. The arm is only detached here to show the underlying shoulder-I actually modeled the arm directly on top of the torso. The closer the two pieces fit the better; however, since the arm piece will be fading away to reveal the torso underneath, it's best to keep the skin of the arm slightly above that of the torso.

 The model before applying a ramp texture to the transparency channel.
Figure 12: The model before applying a ramp texture to the transparency channel.

 The model after the ramp is applied to the transparency channel.

Figure 13: The model after the ramp is applied to the transparency channel.

 

 A ramp that can be applied to a transparency channel.

Figure 14: A ramp that can be applied to a transparency channel.

 

Use a ramp

Here's the torso with a gray material to emphasize the boundary between the two surfaces (Figure 12). Figure 13 shows the same model after applying a ramp texture to the arm's transparency channel (attribute that determines the opacity of an object). The ramp, shown in Figure 14, is really only a gradient going from black to white. Applied to a transparency channel, it means fade-in, fade-out. In the model's case, the ramp is lined up along the U direction of the arm. The U direction of a surface is generally the length. The V direction, running perpendicular to the U, defines the girth of the object. Animation packages like Maya allow you to create adjustable ramps, but static ramps are easy in Photoshop* too.


Stitching

Stitching is the hard way to blend seams. It involves cutting your model into small bits of uniform geometry and stitching everything back together like some bizarre 3D quilt. However, it's a good idea to learn about stitching to have as many techniques in your grab bag as possible.

Why stitch?

Why not just use blends? Well, blends are probably the most temperamental of surfaces. Sometimes the blend surface refuses to generate at all, flips inside out, or leaves a weird gap somewhere. Since blends are invariably denser than the surfaces they're joining, texture-mapping them can also be a challenge. They constantly update with every movement, and you can find yourself gripping the mouse with both hands as you drag the cursor around. Although they are more popular now because of the scalability and computing power available today, they can be particularly challenging for real-time developers. Automatically regenerating all those blend surfaces every time your character rotates a joint is a fairly CPU-intensive task.

Still, stitching is probably as tedious a process as blends are finicky and slow to animate. It can leave you with a texturing nightmare-you'll find not every piece will reattach, which means a separate texture for each section. Every disguising method has its advantages and drawbacks.

Three important issues to remember in stitching

The theory behind stitching goes back to the idea of NURBS objects being closed systems. Blends get around that by creating a new surface between two NURBS objects. Stitching involves cutting your closed objects apart, giving you many open pieces that can then be permanently attached in some cases. How many open pieces do you need to make this work? Take a look at Figure 15 and note three things:

figure+15.JPG
Figure 15: Typical placement of stitch cuts.

  • Each piece needs to have the same amount of lines or isoparms.
  • The cuts have to be made all the way through the NURBS objects-you can't cut or trim out a hole with stitching as you can with a blend.
  • You really need to spend some time making your isoparms line up nicely before you attempt this.

 

Once your model is cut into strips, the final task is to use a stitching tool (included in most animation software packages) that takes the open edges and pulls them together. "Pull" is the key word. Although stitching can give even a many-limbed model the appearance of being seamless, the tugging will change its shape at the attachment points, sometimes dramatically (see Figure 17).

 First edges, then corners are stitched together.
Figure 16: First edges, then corners are stitched together.

 Tugging will change a model's shape at attachment points.
Figure 17: Tugging will change a model's shape at attachment points.

Try using a fillet with stitching

A slight variation on the stitching theme that I've found helpful at times, is to build a fillet surface between each open edge (pink areas in Figures 18 and 19). The fillet can relieve the deforming effect of the final stitch, although it can leave you with sharp edges where the corners meet. It's never perfect.

 Fillet applied between two edges.
Figure 18: Fillet applied between two edges.

 Fillet completed.
Figure 19: Fillet completed.

Try NURBS modeling on Intel® Architecture

Ready to break out of the polygon world? Now with the power of Intel® Core™ i7 and Intel® Xeon™ processors and the inherent scalability of NURBS models, you can build realistic, organic characters for end users with a wide variety of computing power. The payoff: scalable seamless-looking characters that move realistically. NURBS modeling takes a bit of special handling when it comes to attaching extremities, but blending, transparencies, and stitching are three good methods for disguising seams. If your rendering engine doesn't support NURBS, talk to your engine programmers. NURBS is here to stay.

About the Author

A professional animator and Visual Computing Community Manager for Intel Corporation, Steve  Pitzel began his career in graphics as an editorial cartoonist and courtroom sketch artist. After  converting from pencil to mouse, he went on to convert others, teaching Softimage, PowerAnimator,  and Maya to traditional cell animators and computer graphic artists for Disney Feature Animation,  Sony Imageworks, VIFX/Rhythm & Hues, and UCLA.

He was a lead animator for the CBS feature, The Nuttiest Nutcracker, and a senior artist for Mattel.

When he isn't animating, he's usually writing novels or music. His novel, Wizrd, was published by St. Martin's Press under his pen name, Steve Zell, and if you listen closely during those Baywatch reruns, you just may hear him sing...


Pour de plus amples informations sur les optimisations de compilation, consultez notre Avertissement concernant les optimisations.
Catégories: