Wednesday, October 19, 2016

Changing the World with Computers

Two of my sons were discussing the new version of a game. One said, "The only real difference is that it adds jiggle physics."

I raised my head. "Jiggle physics? Is that a real thing, that game designers talk about?" As I spoke, I already knew the answer. Of course it is.

Yes, my sons confirmed. "It's really complicated and hard to do right," one said.

And indeed a quick search showed that it is a huge topic, with hundreds of thousands of hits. Here is an introduction.

So we have these amazing machines that can do millions of calculations per second, and this incredible technology of 3D rendering that can tell any story in stunning detail, and the height of the art is making breasts bounce convincingly.

1 comment:

G. Verloren said...

Methinks you've come across only the most prominent and controversial portion of the larger topic.

Modeling realistic movements of something as complicated as the human body is incredibly hard, even when you simplify and abstract things. Obviously this is more noticeable with certain parts of the anatomy (both for physical and cultural reasons), but the concept applies to everything.

Basketballs are actually one of the best examples of video games trying to get physics to work out properly. There is a long history of games including throwable basketballs as benchmarks of the robustness of their physics engines. Being able to pick up a basketball and throw it around a court and into a hoop without it bouncing in weird, unearthly directions is a mark of quality and achievement in many games.

Mirrors are another related issue - one so difficult to work out, that very few games have attempted to include mirrors at all until recent years, and most of those that did used tricks like just having a window into a second identical room where a duplicate player model moves around in response to the original's own motion. This of course required there to actually be a large space behind the mirror - until recently, it was effectively impossible to have a mirror hanging on, say, a column or pillar which the character can walk around.

In the same vein, having a character's body and gear move realistically as it collides with terrain or changes the way it moves is very difficult to do well. Hair, clothing, and worn or held equipment are all classic examples of extremely challenging things to model.

If you have a waiter character climbing a set of stairs while balancing a tray of dishes, that's a lot to animate realistically - especially if they can be interacted with in some way by the player. If, for example, the player has a gun and can choose to shoot and kill the waiter for whatever reason, suddenly you need to be able to model the motion of the waiter and everything he's carrying as he collapses on the stairs - and be able to do so for any given point on his path, which you can't predetermine because it's up to player when they want to pull the trigger.

"Jiggle-boning" is a technique of indicating which parts of a model (or collection of models) are "attached" to each other, and determining how much they should move in relation to each other, gravity, and the environment. Imagine a hat with a feather stuck in the brim - if the character moves quickly, or if there is a breeze or similar, the feather should realistically sway.

So you need to assign a "bone" to the hat, another one to the feather, "attach" the two "bones" together, but then dictate how much "jiggle" the feather is supposed to have - how much freedom of movement it has under what conditions, to make it look believeable and prevent it from moving in strange ways during unexpected situations. For example, you can't just have the feather have delayed motion due to inertia - if the character wearing the hat started to move upward, the feather simply lagged behind for a second would mean it would clip into the hat itself, which obviously isn't realistic. So you need to tell the computer that the two objects can't pass through each other - but that can introduce a whole slew of other unintented effects as well.

The point is, there's more to "jiggle physics" than just the lamentable and overly visible perverts obsessing over mammaries.