« December 21, 2008 - December 27, 2008 | Main | January 18, 2009 - January 24, 2009 »

January 08, 2009

Sponsored Feature: Multi-Core Simulation of Soft-Body Characters Using Cloth

Here, Intel senior software engineer Brad Werth explains how multicore CPUs can be leveraged for an efficient method of representing soft-body characters by way of cloth simulation.

Because of CPUs constrained with limited computational power, most character animation is done today with a bones-and-skin method, which uses a small number of invisible control points, linked together as bones, to control the a figure. To "skin" the character, the visual portions of the figure are then bound to specific bones.

While this method provides a relatively fast way to animate characters given CPU constraints, the advent of two-core and fore-core processors is allowing for more sophisticated character animation techniques:

"With additional processing power, the bones-and-skin method can be extended for more detailed animation. More bones can be added for additional degrees of freedom. But there is no need to create additional bones unless a new joint is being modeled. Improvements are also possible by focusing on more complicated movement of the bones.

Instead of just blending between canned animations, animations can be blended with physics to create dynamic motion in the bones. This is already implemented in games that use "rag doll" corpses, and has been implemented in some middleware products also.

Bones-and-skin is one method for character animation, but it is not the only viable choice assuming that increased computational power is available. Since the skin is the only visible part of the character, an alternative is to ignore bones and calculate the shape and movement of the skin directly.

If the skin is disengaged from bones, then only local forces and constraints maintain the character's form. The resulting skin can be manipulated equally well from internal and external forces. A character built this way is sometimes called a "soft-body" character.

In a soft-body character, simulated cloth can be used as a skin. Forces applied to the cloth create the form of the soft-body character. Sock puppets are a simple example of this technique. The cloth provides local constraints to maintain the form of the sock, and the hand provides the forces to give the character volume.

When simulating cloth computationally, the hand becomes an invisible mathematical construct and the sock is attached to that construct at key points. By expanding on this concept, a variety of soft-body characters can be created."

January 07, 2009

Visualizing Floats

visualizing_floats.jpgFloating point numbers permeate almost every area of game programming. They are used to represent everything from position, velocity, and acceleration, to fuzzy AI variables, texture coordinates, and colors.

Yet, despite their ubiquitous role, few programmers really take the time to study the underlying mechanics of floating point numbers, their inherent limitations, and the specific problems these can bring to games.

As an independently written article, Neversoft co-founder and veteran programmer Mick West lays out the specifics to help visualize the problems with floats in a new article that starts off as follows:

"A float consists of 32 bits: a sign bit, an 8-bit exponent (e), and a 23-bit significand (s).

To visualize the problems with floats, it's useful to visualize the differences between floats and integers. Consider how the 32-bit integers represent space. There are 232 integers; each one can be thought of as representing a region between two points on a line.

If each integer represents 1 millimeter, then you can represent any distance using integers from 1mm to 232mm. That's any distance up to about 4,295km, about 2,669 miles, with a resolution of 1mm."

You can now read the full Gamasutra feature on visualizing floats, floats versus integers and other useful calculations (no registration required, please feel free to link to this feature from other websites).

About

This specially written weblog combines Gamasutra and Intel knowhow to present and deconstruct the latest happenings in visual computing and game technology.

Editor: Eric Caoili