Video game graphics are quickly becoming astonishing simulacra of reality. We can roam unimaginable lands, interact with believable characters, and punch Nazis until they’re covered in lifelike injuries. And yet, video games still struggle to show someone taking off their clothes.
Consider this scene of Jacob steamily removing his shirt in Electronic Arts’ 2010 game Mass Effect 2. At first glance, it sure seems as though he popped that sucker off like any of us might if we had perfect battle-hardened abs to show to an invisible camera man.
Now rewind it and watch again: His shirt is already gone by the time his arms are moving across his body in a shirt-removing motion. The game snapped between a clothed model and a nude model, using smoke and mirrors to make you think he was taking off a shirt.
Video games have no trouble showing naked people, and no trouble showing fully-clothed ones, either. But transitioning between the two is a lot trickier than you might expect. In fact, it’s a problem with which even the most richly funded, highly talented triple-A game developers struggle. But like a toddler trying to shove his head through the arm hole of a shirt, they’re making some amount of progress.
Video game protagonists don’t wear clothes the way you and I do. When you boot up Uncharted 4 and see Nathan Drake clad in his traditional half-tucked henley, you’re not looking at a nude character model with a separate “shirt” object draped over it.
His clothes are grafted on, more like parts of his body. To truly show them coming on or off, without faking it, the developers would have to be simulating both the clothes and the Drake separately, which is not yet a solved problem.
The conversation about undressing in games kicked off recently after a tweet from game developer Tom Francis, who wrote, “I wonder how many times on how many dev teams a director has said ‘We’re going to be the game that does it. We’re going to animate taking clothes off and on.’ And tech/anim have given it their all and come back saying ‘No. Sorry. We are still 400 years from this technology.’”
The problem, Francis told Kotaku in an email, is multifaceted.
“Physics-wise, it’s hard to simulate floppy things that wrap smoothly around complex shapes, hand-animating is not time-efficient, and ultimately it just doesn’t matter enough,” he said. “Undressing is never a big enough part of a AAA game to be worth the dev time it’d take to solve well.”
“Even if a company can afford these resources and time to spend on them, a real cloth simulation, based on energy or forces, needs many iterations to output a nice and stable result,” said Hans Godard, a technical artist at Blizzard, in an email.
3D animated movies can do it, he said, because they use different tools to fully simulate and re-simulate cloth deformation before a single instance of it ever makes it into the final cut. Games, running in real time, don’t have that luxury.
For movies, he said, “the algorithm iterates the same formula again and again, to converge to something reliable. Otherwise, generally the mesh explodes, is sheared and stretched, and has irregular topology alignment.” He described the technology as “unpredictable” when it’s running in real time.
“No studio would take the risk to see its sequence totally spoiled because of an exploded cloth,” he said. “So much money and time for so much risk.” And even then, it would require heaps of memory and processing power—all for an inconsequential, brief moment that can easily just be faked, as in Mass Effect 2.
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.
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 fingersawkwardly wiggling around in front of his jacket like he’s playing a Bach concerto.
“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.”
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.
What you might not realise 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.
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.”
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.”
Machine learning handled the rest, analysing 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 per cent 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 realised 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.”
“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.