Why video game characters almost never undress
Video games are quickly becoming an amazing simulacrum of reality. We can wander around unimaginable worlds, communicate with believable characters and make convincing-looking beatings to the Nazis. However, video games still have trouble removing clothes.
Look at the scene from the 2010 Mass Effect 2 game with Jacob undressing. At first glance, it seems that he pulled off his shirt, as any man would have done, demonstrating to the invisible operator the press dice earned in battle. And now look closely: by the time his hands move through the body, "taking off" his shirt, it is already gone. The game switched from a dressed to a naked model with the help of an illusion that makes the player think that he is taking off his shirt.
Games without a problem can demonstrate nudity, as well as dressed. But the transition from one state to another is much more difficult than one can imagine. In fact, this problem occurs even in well-funded and talented developers of AAA games. But as a baby trying to stick his head in a shirt sleeve, the industry is gradually moving forward.
Video game characters don’t wear clothes like we do. When a player launches Uncharted 4and sees Nathan Drake, dressed in his traditional pullover with rolled up sleeves, then in reality this is not a naked character model with an “shirt” object thrown at him. His clothes are glued to him as part of the body. In order to truly show how he wears and removes it, developers must separately simulate both clothes and Drake, which is still an unsolved problem.
Talking about undressing in games began after the tweet of game developer Tom Francis , who wrote, “I wonder how many times and in how many development teams the director once said“ We will create the first game in which this is possible. We will animate the removal and donning of clothes. ” And technicians or animators answered him: “Sorry, but no. We have to work another 400 years before this technology. ”
As Francis Kotaku responded in his letter, the problem is multifaceted. “From the point of view of physics, it is difficult to simulate soft objects that smoothly wrap around complex geometry, manual animation is inefficient in time, and besides, the game is not worth the candle, after all,” he said. "Stripping has never been a serious part of AAA games, so a high-quality solution to this problem was not worth the investment of the developers."
“Even if a company can afford such resources and time, the simulation of real clothes, taking into account the strength and energy, will require a lot of iterations to create a beautiful and stable result,” technical artist Blizzard Hans Godard told us in a letter. This is possible in animated 3D films, because it uses a completely different set of tools to fully simulate and re-simulate the deformation of the fabric, until it finally gets into the finished frame. For real-time gaming, this luxury is not available.
“In the movies, the algorithm iterates over and over again the same formula to arrive at something reliable. Otherwise, the mesh explodes into pieces, splits and stretches, and the topology becomes unstable. ” Hanse described the real-time technology as "unpredictable." “No studio will risk having the whole scene ruined because of the“ exploded ”clothes. Too much time and cost for such a risk. " In addition, calculations require a lot of memory and computational power - this is too much for an unimportant, brief moment that can easily be simulated, as is the case with Mass Effect 2 .
Even such minor details as pockets cause problems for game developers. In Ubisoft 2014, Watch Dogs, the main character, Aiden Pearce, roams the city with his hands in his pockets. Animation director Colin Graham, in the backstage video of the game, admitted that he had never seen anyone try to do this in a video game, because it is almost impossible to make hands stay in pockets while the fabric is free to move along with the character. As a result, the development team created a device with a rope that hung from the neck of the mocap actor so that his hands were always in the correct position.
But even so, there were problems in the development process. “One morning, you start the build, open your level for iteration and testing, appear on the map and see that Aiden’s fingers are moving in the air instead of peacefully in their pockets,” says former Ubisoft designer Sean Noonan.
One of these strange assemblies was even used in one of the game trailers , in which the game character of actress Aisha Tyler was demonstrated. When character Tyler is talking on the phone, Aiden quietly watches her while his fingers twitch next to his jacket, as if he is performing a Bach concert.
“Personally, it seems to me that the most important conclusion here is the existence of a rather high probability that, while wandering around Chicago, Aiden actually sways his fingers in his pockets,” says Noonan. "And it is creepy."
NSFW: There are scenes in the video with stripping.
Other developers use clever workarounds. Take for example The Witcher 3- sex scenes simulator, based on which built a 100-hour epic fantasy RPG. Sex, as you could hear, is often associated with undressing. However, creating fabrics that the characters could interact with was not a priority in the CD Projekt list. The technical director for graphics of the game, Krzysztof Kzhishchin, informed us that the development team, among other things, would have to manually create new character animations and textures under the outer clothing. The reward for such an effort would be too small. What was the solution? They used magic. In one scene, one of the main passions, Geralt Jennifer, calls on unknown forces to make his clothes disappear.
But in fact, her clothes are not lost. “When Jennifer“ magically removes clothes ”in one of the romantic scenesThe Witcher 3 is actually quite simple, but nevertheless a great trick with the inclusion of transparency based on an animated texture mask, ”says Kzhishchin. “Physically, her clothes do not disappear from the body. She is on the heroine throughout the entire scene, simply hidden by the transparency. ”
Now that we know what problems clothes in games cause, we are even more impressed by undressing scenes that look truly natural without witch magic or tricky camera switching. In particular, the real miracle is the removal of the jacket by Drake's brother in Uncharted 4 .
In the first big scene from the present, where Nathan Drake, Sam Drake and Sally attempted a complex robbery during the auction, and Nathan and Sam pull off their costumes so loosely that I immediately realized that I wanted to understand what material are they. But how did you manage to do this? How did the wizards of Naughty Dog get what the others seemed incapable of?
Hans Godard, who was then working at Naughty Dog, was on the team that was working on this task. Modern game engines do not support real simulation of the fabric in real time, so Naughty Dog had to use available materials: a simpler geometry warping technique called BlendShape, which is used in many games to deform faces and other meshes in accordance with emotions and other visually different states. They solved this problem by moving surface models called “skins” or “meshes” —in fact, this is what we see in the game — along a set of interconnected bones and hinges.
According to Godard. using BlendShape to solve the garment problem was not an easy task. To use BlendShape, it is necessary that each possible object posture be created in advance and baked into the game before its execution time. Since BlendShape uses many poses, their use in a standard form would require too much load on the memory. On the other hand, creating meshes for each contour of the jacket would be “very difficult and painful work”.
But at some point, Godard and his colleagues dawned on: you can algorithmically generate jacket poses and use the tool that Godard originally wrote to animate faces. “Let's say we have a simulation of 1000 frames,” he says, describing a simulated fabric object. "And this is completely analogous to a person with a thousand BlendShapes."
The rest were machine learning: it analyzed the sculpted or scanned poses to determine if the fabric was moving in a natural way. If artificial intelligence determined that, say, a coincidence is only 87%, then immediately reworked the frame. “In the game, everything happens quickly, and since the result corresponds to the present forms in 99.99% of cases, no one notices the difference,” says Godard.
And only having solved the problem, Godard realized that he had done what no one else could. “No studio has used the same method,” he said. “I know this because they all contacted me to discuss this topic. And I told everything, absolutely everything. Now it is becoming the industry standard. ”
“I'm proud of it,” Hans told us. And deservedly so. The next time you see how a character casually removes his jacket, you will know that you need to thank Godard for that.