Completing "The Infinity Saga" with the epic one-two punch of "Avengers: Infinity War" and "Avengers: Endgame" is already an impressive feat. But when you learn about the development of the back-to-back sequels and the insane logistic of the production, it becomes clear how much of a miracle these two blockbuster sensations truly are, especially when you find out what a logistical nightmare it was to coordinate the production for the massive ensemble cast in each film. The recent release of "The Story of Marvel Studios: The Making of the Marvel Cinematic Universe" has provided some surprising details about how the "Avengers" sequels came together, and their mere existence is nothing short of awe-inspiring.

Writing Sequels To Six Films That Weren't Complete

Since "Avengers: Infinity War" and "Avengers: Endgame" were in development while the preceding films of the Marvel Cinematic Universe were coming together, you would think that writers Christopher Markus and Stephen McFeely would have no problem knowing what unfolded in those films in order to plot the two sequels. After all, Marvel Studios had been working on overlapping projects for years at this point. But there was one problem: all six of the Marvel Studios movies in the pipeline that would precede the two-part of the conclusion of "The Infinity Saga" were in such a state of flux that almost all of them hadn't finalized their stories. As "The Story of Marvel Studios" recounts:

"'Doctor Strange' hadn't gone into production; 'Guardians Vol. 2' didn't have a shooting script; 'Spider-Man: Homecoming' didn't have a director, much less a lead actor to play Spider-Man; 'Thor: Ragnarok' had some treatments; creative conversations with Ryan Coogler about 'Black Panther' had barely begun. And then there was 'Captain Marvel.' It had some treatments and early drafts, but the film was already planned to release between the two connected Avengers films."

Can you imagine trying to write two massive blockbusters intended to cap off 10 years of lead-up and over 20 films of interconnected stories without knowing where several of the film's primary characters would end up in their own franchises beforehand? Plus, let's not forget that this development started when Markus and McFeely were still working on "Captain America: Civil War" while it was in production. Markus said, "It was amorphous to the point where we're like, 'We don't know if we can come up with a story.'" Meanwhle, Kevin Feige offered up the helpful advice of, "You know? Don't worry about it. Do it anyway."

It's not as if Marvel Studios didn't know how important these two films would be to the overall Marvel Cinematic Universe. As "The Story of Marvel Studios" says, "If a "finale" was a colossal failure, it would retroactively taint everything that came before it." It was monumentally important that "Avengers: Infinity War" act as a stirring, cliffhanger season finale of sorts, and "Avengers: Endgame" came in to stick the landing. That's actually why the working title for the "Avengers" sequels was "Mary Lou," a reference to gymnast Mary Lou Retton, who famously stuck her own landing to make Olympics history.

As we all know now, Markus and McFeely were able to crack the stories for "Avengers: Infinity War" and "Avengers: Endgame," but sticking the landing would require an insane amount of logistical organization due to the sheer scope of the films and the size of the cast.

Avengers Assemble

It should come as no surprise that organizing the shoot for "Avengers: Infinity War" and "Avengers: Endgame" was a near-impossible feat. "The Story of Marvel Studios described the scene of executive producer Michael Grillo's office:

"Grillo's office featured dozens of ever-changing paper calendars featuring when major and minor set pieces were to shoot. Coupled with his digital calendars that helped him track the whereabouts of any given actor down to the hour, no one could elude him. At a glance, he could optimize any actor's window of time to when the Russos needed them. Starting on Infinity War, Grillo had to make sure Chris Pratt shot all of his material early so he could leave for another film. Benedict Cumberbatch was the next that needed to be out early, and so on. What that meant was that the producers then had to create another layer of scheduling just for the actors' doubles, who had to complete scenes when the actor's actual presence wasn't required."

That's just the scheduling for the stars of the Marvel Cinematic Universe. The daily production rigmarole was something else entirely. Producer Trinh Tran described what a typical day was like while shooting both of these sequels at the same time:

"The first hour would be Infinity War additional photography. The second hour would be Endgame, with five units shooting across the Pinewood Atlanta Studios; The Russos would be running around with two separate filming units, while as many as three second unit directors would be shooting scenes at the same time. Then, at three o'clock, Tran and the Russos Would run across the street to postproduction and take a quick look at an Infinity War sequence that they had spent the entire previous night looking at."

Now imagine working like that every day for roughly an entire year. It's a wonder these films were actually made. But they became something special.

The Wedding

Though the production of "Avengers: Infinity War" and "Avengers: Endgame" was already an incredible achievement, there was a Herculean feat within the production thanks to one pivotal scene that required no less than 40 principal cast members from the Marvel Cinematic Universe. Of course, we're talking about Iron Man's funeral, which was actually developed as a wedding between Tony Stark and Pepper Potts, in order to avoid any spoilers leaking to the public. There were even fake endings shot to preserve the real ending.

On October 6, 2017, Marvel Studios gathered the key players of the Marvel Cinematic Universe in a secret location in Georgia for a sequence that brought all of Marvel's superheroes together in a single scene for the first time. Previous sequences had used doubles or cast members who were digitally added to scenes in post-production. But Tony Stark's funeral brought them all together in one place. Even Robert Downey Jr. was on set, though he stayed in the cabin on set in order not to disrupt the rest of the cast's process in preparing for the scene. Making that sequence work required an immense amount of planning. "The Story of Marvel Studios" noted:

"To gather that many A-list talent together at a secret location in the rural woods of Georgia would mean that, essentially, a mini-town would need to be created for the shoot. There would be forty trailers alone; one for each actor. Then, add support trailers for bathrooms, wardrobe, makeup, catering, and more. Security would need to shut down an entire lake, the buildings and homes that surrounded it, and all access points from any prying eyes. They would need drone detectors, drones for surveillance, police support, electrical generators for cameras, trucks upon trucks full of equipment and more."

In order to expedite the process, the film's crew and second unit rehearsed the shot with stand-ins, just as they would if the full cast was there. When all was said and done, the shot with all the principal cast members only required a few takes, and one of Marvel's biggest scenes ever was complete. As Matt Slatoff, Vice President of Global Security & Content Protection, recalled:

"We've had other really big things to keep quiet- big days or characters. But that was as big as we've ever had. All the execs were there. It was what ten years had built up to, having all that talent together in one place."

A Grand Experiment

When the shot was complete, Marvel executives Kevin Feige, Louis D'Esposito, and Victoria Alonso and directors Anthony & Joe Russo basked in the glory of what they had achieved. Joe Russo recalled:

"It was certainly a powerful moment, without question, understanding what this grand experiment was. Seeing it come to fruition and completion all at the same time. Kevin life's work was heading toward this massive climax. And it was all gonna change after that. I just think none of us wanted to walk away."

The amount of work that went into "Avengers: Infinity War" and "Avengers: Endgame" is unbelievable. The fact that they pulled it off without having any major problems in production is astounding. Marvel fans are undoubtedly thankful to each and every person who made the Marvel Cinematic Universe possible, but they should be doubly thankful that "The Infinity Saga" ended in the most satisfying way possible. Even those who are sick of superhero movies dominating the conversation in recent years can admit that Marvel Studios pulled off an impressive feat of film production. Now the question is whether they can repeat a similar experience with the next era of the Marvel Cinematic Universe. Stay tuned.

Read this next: Every MCU Post-Credits Sequence Ranked From Worst To Best

The post The Production of Avengers: Infinity War and Endgame Was a Miracle and a Nightmare All at Once appeared first on /Film.