Video: Ubisoft

Even itsy-bitsy things like pockets have caused game developers trouble. In the Ubisoft’s 2014 game Watch Dogs, main character Aiden Pearce would shove his hands in his jacket pockets while cyberpunk-strutting around town. At the time, animation director Colin Graham said in a behind-the-scenes video that he’d “never” seen anybody try to do it in a video game before, because getting hands to stay in pockets while cloth moves believably with a character is nigh-impossible. The team ended up having to build a rope rig that hung around the neck of Aiden’s motion-capture actor, to make sure his hands were in just the right position.

Advertisement

Even so, there were issues all throughout development. “You’d boot up the build one morning, open up your level for iteration or testing, drop in the map, and spot Aiden wiggling his fingers out in the open rather than from the comfort of his pockets,” Sean Noonan, then a Ubisoft designer and now at Splash Damage, said in a DM.

One of these weird builds even ended up being used to make one of the game’s trailers, which featured actress and comedian Aisha Tyler’s in-game character. While Tyler’s character carries on a phone conversation, Aiden coolly stalks her—with his fingers awkwardly wiggling around in front of his jacket like he’s playing a Bach concerto.

Advertisement

“Personally I think the real takeaway here is that there’s a pretty good chance Aiden is actually wiggling his fingers within his pockets as he moseys about Chicago,” Noonan said. “Creepy.”

Video: RabidRetrospectGames (WARNING: NSFW)

Other developers have used creative workarounds. Most notably, there’s The Witcher 3, a series of sex scenes with a 100-hour epic fantasy RPG built on top of them. Sex, you might have heard, tends to involve a lot of clothing removal. Creating clothes characters could physically interact with, however, wasn’t high on even CD Projekt’s priority list. The game’s technical art director Krzysztof Krzyścin said in an email that the team would have had to handcraft new character animations and texture the inside of outfits, among other concerns. It would’ve been too much effort for too little reward. The solution? Magic. In one scene, one of Geralt’s primary romantic interests, Yennefer, draws on the unknowable forces of the arcane to make her clothes vanish.

Advertisement

What you might not realize is that her clothes aren’t actually gone. “When Yennefer ‘magics her clothes away’ in one of the romance scenes in The Witcher 3, it’s actually a pretty simple, but nonetheless very cool trick that has to do with enabling transparency based on animated texture mask,” Krzyścin said. “The outfit never leaves her body physically. It’s still there for the whole scene, just transparent.”

Knowing what we now know about clothes in games, it’s all the more impressive when we see an undressing scene that actually looks believable, with no witch magic or sly camera cuts. In particular, the Drake brothers’ suit jackets in Uncharted 4 are damn near miraculous.

Advertisement
Advertisement

In the game’s first big present-day mission where Nathan Drake, Sam Drake, and Sully attempted to pull off a complicated heist during a fancy auction, Nathan and Sam both shrugged out of their jackets so naturally that I immediately found myself wondering what kind of material they were made of. But how? What did those mad wizards at Naughty Dog figure out that nobody else seemed able to?

Hans Godard, who worked at Naughty Dog at the time, was on the team that solved the problem. Modern game engines don’t support true real-time cloth simulation, so Naughty Dog had to use what it had on hand: a simpler geometry deformation technique known as BlendShape, which many games rely on to allow faces and other meshes to deform into expressions and other visually different states. They do this by moving surface representations known as “skins” or “meshes”—basically, what you see in the game—around a set of interconnected “bones” and “joints.”

Advertisement

Applying BlendShape to the problem of clothing wasn’t a simple task, Godard said. BlendShape relies on having every possible pose for an object pre-created and baked into the game before runtime. While BlendShape had plenty of poses, putting them in the game as they were would’ve been too memory-intensive. Hand-crafting meshes to suit each contour of the jackets, meanwhile, was “very hard and painful.”

Then Godard and company had a eureka moment: they could algorithmically generate the jackets’ poses, and they could use a tool Godard originally created to animate faces to help do it. “Let’s say you have a sim of 1,000 frames,” he said, referring to a simulated cloth object. “Then it’s exactly the same thing as a face having 1,000 BlendShapes.”

Advertisement

Machine learning handled the rest, analyzing poses sculpted and scanned by modelers to determine whether or not the cloth was moving in a way that looked natural. If it determined that it was only, say, an 87 percent match, it’d immediately iterate on it. “It’s fast in game, and since the result matched the original shapes at 99.99%, no one would see the difference,” said Godard.

It wasn’t until after Godard figured all of this out that he realized nobody else really had. “No other studio was actually using a similar method,” he said. “I know it because they all contacted me to talk about it. And when I say all, I mean all. It’s becoming a kind of standard in the industry now.”

Advertisement

“I’m a proud man,” he said. As he should be. The next time you see a character nonchalantly shrug off a jacket, you may have Godard to thank.