Every stitch, every crease, was CG.

Perhaps by this stage in the Marvel Cinematic Universe films, audiences have become very used to the fact that many of the superheroes ‘wear’ digital costumes. For example, Robert Downey Jr. or Tom Holland may don a partial practical Iron Man or Spider-Man costume or a tracking suit (the ones with dots, markers, patterns, etc) on set, which are then replaced with CG versions.

Ubiquitous as these digital suits may be, the matchmoving, tracking, rotoscoping and digital ‘tailoring’ of the CG costumes remains an immense task, and it was task repeated in a major way on Avengers: Endgame for not only the usual costumes of the characters, but also their time suits, worn when they travel back to the past to try and retrieve the Infinity Stones.

This meant that whatever the actors were wearing for the time suit shoots – be they their normal costumes, other garments or even tracking suits – visual effects artists needed to generate CG ones.

“Because they filmed everything back-to-back with Infinity War, it was shot quite a long time ago, and at that point they didn’t really know what they would be wearing,” outlines visual effects supervisor Stuart Penn from Framestore, a studio charged with realizing many of the CG time suit shots. “So when they shot them they just shot the actors in whatever costumes they were going to be wearing in the locations they were going to. Ant-Man had his Ant-Man costume, Thor had his bathrobe, Cap had his normal costume.”

“They just had some tracking markers on those costumes, but there wasn’t much in the way of witness cameras or anything,” adds Penn, noting that in some cases the actors wore a tracking suit itself. “It was pretty much, they just shot it and then decided later on, much later on, what they were going to be wearing. It wasn’t until quite a way into post that the actual design was formalized.”

Framestore ultimately received concept art from production for the time suits, then built CG models. One of the challenges was that no practical time suit costumes were ever built, so significant exploratory design work was necessary to work out what materials they would be made of, how they would move, how stiff the costume needed to be, et cetera.

Penn notes that Ant-Man’s practical costume came in handy as reference, as did Black Widow’s garb, since parts of these had the right look and feel for the time suit equivalents. “A lot of work went into the different types of materials because the white material was very much a cloth material, but it’s much stiffer, and the blacker parts were a lot more like soft cotton fibre, but they had to work together so that everything would wrinkle and look like a real moving suit.”

Of course, before any suit could be rendered in the scenes, artists had to matchmove the on-set performances. This was largely done as body tracks by eye, a hugely meticulous task. “However,” says Penn, “we did build tracking rigs that had a lot of controls, especially around the neck area, so that we could make sure we could deform the tracking model very precisely to what the actors were doing. It was very important to Marvel that we actually did match the actor’s performances, we didn’t just sort of take the heads and stick an entirely different performance on them.”

After body tracking, the shots were passed on to the animation team, which did a refinement pass and further established the 3D space for each digital costume. “To help with neck integration, we also rendered a digi-double, so that we had a CG neck that would blend with the real neck,” says Penn.

“We were casting shadows from the CG suit onto the CG neck, so the artist could just take the shadow paths and use that onto the real neck, if there was a real neck in there, or they could bring back some of the CG neck. It was all very much a mix of techniques on a per-shot basis to get the best out of it. I think the key really is to get the lighting to work. Because if the lighting doesn’t match very, very closely to the actor then you’re going to get in trouble really quickly.”

One particularly challenging time suit scene featured Jeremy Renner as Clint Barton (Hawkeye) returning to his family property. On location, the actor wore a tracking suit which would later be replaced by Framestore. “The hardest shot in that sequence,” discusses Penn, “was where he appears in the barn, because it’s a very long shot and he’s moving from distant to really close-up, and he’s kind of staggering around a lot as well. On first look, the track actually looked like it was broken, but it wasn’t. It was just because he was staggering around a lot and kind of disorientated.”

Framestore has for several years continued to refine its digital clothing simulation approach, which includes a heavy creature FX role. “We have quite a large team doing cloth sims,” says Penn. “The suits were built in a way that resembles how a real costume would be cut, because that has a big impact on the way cloth moves. So you’re not just relying on a good rig, you need a good sim rig as well, because without that extra piece of fine movement it doesn’t sell as being real cloth.”

Explore more of our in-depth Avengers: Endgame coverage during #endgameweek.