Pinning down the nature of time travel in Avengers: Endgame was a design challenge even after working out the narrative kinks. Endgame’s time travel was confusing at times and left us wondering about the fates of characters like Captain America, Loki, and Gamora. It required not only some clever writing but also thoughtful design choices that reflected both the themes of the film and existing technology within the Marvel Cinematic Universe.

The time travel equipment in Avengers: Endgame was primarily rooted in Ant-Man tech, from the design of the suits to the crucial mechanic of passing through the Quantum Realm in order to travel backward in time. However, complicating both the design and implementation of the suits — which were never produced, but computer-generated in post-production — was the fact that both Infinity War and Endgame were filmed back to back with overlapping production schedules.

“There was a gap in sort of shooting the two films where were working in pre-production on everything sort of at once,” Ryan Meinerding, head of visual development at Marvel Studios, told Polygon. “We didn’t get to the team suits until near the end of pre-production. But those visuals were important for [Marvel Studios president Kevin Feige], so we were trying to cram them in even knowing that they were going to be essentially visual effects.”

The decision to CG the suits in later was essentially a function of time management more than anything else. The visual team worked to get the designs to a point where directors Joe Russo and Anthony Russo, along with Feige, were ready to sign off, which took place nearly a year in advance of actually shooting Endgame. The suits were added in during post-production. “It’s just a matter of the fact that there’s so much to do and we’re just trying to get through as much as we can as early as possible,” Meinerding said. “Some things just end up getting done a little bit later in the process as well.”

The suits themselves needed to be both visually cohesive but also in line with the technological constraints of the MCU. In designing the suits, the visual design team drew inspiration from Ant-Man’s costume, Stark nanotechnology, and the holographic space suits from Guardians of the Galaxy Vol. 2. This recombination and invocation of previous MCU tech was part of the thematic message of the suit.

“The idea is that time travel is so challenging that unless these different sets of really unique technologies hadn’t come together, this would be impossible,” Meinerding said.

This technological line of thought also carried over to the production design side of work on the film, particularly concerning the nature of the time travel device itself.

“We did a lot of work with the studio about trying to see what this thing was,” Endgame production designer Charles Wood told Polygon. “Was it a little black box in a room or was it a mechanical thing? [Should we] add some shape and scale to it because [time is] such an unending thing?”

Pinning down the exact nature of time travel itself within the film was the primary design challenge, along with ensuring that there was a kind of cohesion between the costumes’ behavior on the actors’ bodies and their interaction with the set itself.

“It was a difficult task given the whole time travel thing — sort of did my head in a little,” Wood said. “There are a lot of theories on what it should and shouldn’t be ... we explored what [the technology] could be, what it should be.”

Past the technological logic, the suits also had to feel right, given that they were essentially the first Avengers “uniform” across the MCU thus far. Not only were they tied to their in-universe function, but they were also a unifying visual signifier. “Kevin really said that so much of the value of what we do is in the characters and the costumes,” Meinerding said. “I think the idea of putting them in the same suit is part of the process.”

Avengers: Endgame is currently available for digital purchase and will be released on 4K Blu-ray, Blu-ray, and DVD on Aug. 13.