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 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 fingers awkwardly 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 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.
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, 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.â
â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.