Production of Avengers: Infinity War and Avengers: Endgame

Avengers: Infinity War and Avengers: Endgame are American superhero films based on the Marvel Comics superhero team the Avengers, produced by Marvel Studios and distributed by Walt Disney Studios Motion Pictures. They are the sequels to Marvel's The Avengers (2012) and Avengers: Age of Ultron (2015), and serve as the nineteenth and twenty-second films of the Marvel Cinematic Universe (MCU), respectively. Both films are directed by Anthony and Joe Russo from screenplays by the writing team of Christopher Markus and Stephen McFeely, and feature an ensemble cast composed of many previous MCU actors.

Development of the films began in Marvel Studios' early films by introducing the Infinity Stones and the Infinity Gauntlet. Casting began in mid-2013 with Robert Downey Jr. signing on to reprise his role as Tony Stark / Iron Man, with the films officially announced a year later as Avengers: Infinity War – Part 1 and Avengers: Infinity War – Part 2. The Russo brothers and Markus and McFeely joined the project in early 2015. In July 2016, Marvel revealed that the Part 1 and Part 2 of the titles would be removed, with the former first part known simply as Avengers: Infinity War. The former second part's title was revealed as Avengers: Endgame in December 2018.

Both films were shot back-to-back at Pinewood Atlanta Studios in Fayette County, Georgia. Production of Infinity War began on January 23, and concluded on July 14, 2017, with additional filming in Scotland, England, the Downtown Atlanta area, and New York City. Filming of Avengers: Endgame began on August 10, 2017 and concluded on January 11, 2018, with additional filming in the Downtown and Metro Atlanta areas and New York. They are the first Hollywood films to be shot entirely in digital IMAX, using a new camera developed alongside Arri. Industrial Light & Magic, Framestore, Method Studios, Weta Digital, DNEG, Cinesite, Digital Domain, Rise, Lola VFX, Perception, Cantina Creative, Capital T, Technicolor VFX, and Territory Studio were the visual effects companies to work on the films.

Avengers: Infinity War was released on April 27, 2018, and Avengers: Endgame was released on April 26, 2019.

Development
Since their early films, Marvel Studios had been planting the seeds for an Avengers film that adapted Jim Starlin's 1991 Infinity Gauntlet comic arc, by introducing the powerful Infinity Stones as MacGuffins: the Space Stone as the Tesseract in Captain America: The First Avenger; the Mind Stone inside Loki's Scepter in Marvel's The Avengers; the Reality Stone as the Aether in Thor: The Dark World; the Power Stone within the Orb in Guardians of the Galaxy; and the Time Stone within the Eye of Agamotto in Doctor Strange. Additionally, the Infinity Gauntlet, a glove designed to house the stones, was introduced in Thor. A different Infinity Gauntlet is briefly seen in Avengers: Age of Ultron, in the possession of the villain Thanos, who covets the stones in the comics. The first gauntlet was subsequently revealed to be a fake in Thor: Ragnarok. Many fans expected Thanos to be the antagonist of the second Avengers film after making a brief appearance at the end of the first, but Joss Whedon, the writer and director of the first two Avengers films, explained that "Thanos is more powerful. He is so powerful, he is not someone you can just try to out punch. Like in the comics, you want him to be threading through the universe and to save the big finale for the big finale." While all non-Avengers films in the MCU were considered set-up for this storyline, laying "much of the groundwork", producer and president of Marvel Studios Kevin Feige said that Black Panther in particular would be "a very important" link to the Avengers sequels in Phase Three of the MCU, as was Thor: Ragnarok.

In July 2014, Feige stated that there were "some notions" to where Marvel would want to take a third Avengers film and that the studio was aiming for three years between Avengers: Age of Ultron in 2015 and a sequel. In October 2014, Marvel announced a two-part sequel to Age of Ultron, titled Avengers: Infinity War. Part 1 was scheduled to be released on May 4, 2018, and Part 2 was scheduled for May 3, 2019, with the two films filming back-to-back. In January 2015, Whedon stated that it was "very doubtful" that he would be involved with the two Infinity War films. By April, Anthony and Joe Russo had reached a deal to direct both parts of Avengers: Infinity War, after directing Captain America: The Winter Soldier and Captain America: Civil War. Whedon cited the series' increasing scale as to why he chose not to return, explaining, "Every movie I have ever made has been an ensemble piece of increasingly enormous proportions... That many balls in the air, it's only going to get bigger with Infinity War. I'm not going to be able to give it what I would need to." At the end of the month, Chris Evans, who portrays Captain America in the MCU, revealed that filming was now scheduled to begin in late 2016 over nine months, lasting until August or September 2017, after previously being scheduled to begin in late 2015. By May 2015, Christopher Markus and Stephen McFeely had signed on to also return from the Captain America films, writing the screenplays for both parts of the film. Anthony Russo described the two Avengers sequels as "the culmination of everything that has happened in the MCU" since Iron Man was released in 2008, bringing "an end to certain things, and in some ways... the beginning of certain things".

Writing
Markus and McFeely began work on the scripts during the filming of Civil War when they would "go to the office, read comic books, write down ideas, put everything on the wall and just go 'These are all the characters we could have.'" Markus added, "We sent in literally 60 pages of unrelated ideas. Just like 'Here's some stuff that could happen in this insane movie.' Then we came back from Atlanta and everyone had a copy of that [document] and they'd circle this, 'This is cool, this is insane, this is cool, we're not allowed to do that,' and from there [we] pieced it together very slowly." In January 2016, the duo had begun work on the screenplay for the first film, and by July, they were working on the third draft of Infinity War and the second for its sequel, with Markus stating, much like how they were planned to be filmed, "On any given day, you're only working on one but that doesn't mean that next week, you aren't working on the other one." By October, Thor: Ragnarok screenwriter Eric Pearson was flown from Ragnarok's set in Australia to Atlanta to assist Markus and McFeely, who were "just so crammed for time". Pearson felt the pair were comfortable allowing him to work on one film while they focused on the other given his previous Marvel work, including alongside them on the television series Agent Carter.

The Russos and Markus and McFeely worked with all of the directors and writers of the other Phase Three films to keep continuity, talking "on an almost weekly basis". Doctor Strange director Scott Derrickson was "kept in the loop" on how the Avengers films use Strange through his close relationships with Feige and Joe Russo. Derrickson discussed the plot of both Avengers films with Joe, and gave notes on them, saying, "this is why this is great, this is so the way to do this... [and] no, this is why that'll never work..." James Gunn, director and writer of the Guardians films and executive producer on these Avengers films, stated that he worked with the Russos, Marvel and Feige "to make sure that any of the characters I'm involved with that are in [Infinity War] are well taken care of and are as funny as they should be and as honest and truthful as they should be". Gunn "came up with at least one hysterical riff" for the Guardians, according to Markus, and also chose "The Rubberband Man" by The Spinners as their opening song. Gunn provided insight to a choice made by Markus and McFeely for Star-Lord that Gunn and Pratt felt the character would not make and did not alter the overall story. McFeely felt that "was a good example of how that kind of caretaking was a bonus to us". Some of the biggest rewrites to the script involved Thor, since Markus and McFeely originally intended him to be the "straight man" to the Guardians. His scenes had to be "revamped" after Hemsworth explained the funnier direction the character went in Thor: Ragnarok. That film's director Taika Waititi was brought in to consult with Markus and McFeely on the new tone of Thor's character, while Pearson's involvement aided in keeping this continuity.

After announcing the films, Feige said there was a possibility that characters from Marvel Television's MCU series could appear in the team up, and actors such as Krysten Ritter, who plays Jessica Jones in the Netflix series of the same name, expressed interest in this. Anthony Russo stated that this would be "complicated" due to the television series' serial nature of storytelling and the fact that Marvel Studios and Marvel Television have separate oversight. The brothers later said that "the briefest consideration" to including television characters was made, but it was "practically impossible". Joe added, "Our job is to focus on the Marvel film world and offer a satisfying climax."

Joe felt the audience would not be disappointed in the number of characters in the films, saying that "like 67 characters" who were previously introduced in the MCU had been placed out on a board for consideration. Characters were ultimately chosen based on the personal preferences of the creative team, as long as the "choices feel organic to the storytelling, and really, you have to sort of structure them in the way that they need to be there", and included some characters Joe considered to be unexpected choices such as some who made smaller appearances previously in the MCU and "are really getting fleshed out" now. Because of the number of characters, McFeely called writing Civil War "a walk in the park". He noted that characters who had not yet been cast were also in the scripts. Joe Russo explained that they intended to focus on a "handful" of characters and build the story around their emotional arcs, with many of the other characters having ancillary roles. He also said that the number of characters in Civil War prepared the brothers to "deal with probably triple the amount of characters in Infinity War", and that that the characters given main focus would shift between the two films. Gunn said the Guardians of the Galaxy's roles in the films would not be the biggest part of the film, but would be integral due to their connection to Thanos. The Russos wanted "a strong through line" from The Winter Soldier to Civil War and into the two films, saying, "We look at [Civil War] as setting the stage for Infinity War, how it starts and what condition everybody's in." He described the concept of the films as "the Marvel universe [uniting] to battle the greatest threat to the world and universe that you've ever seen", with the brothers wanting to approach the cosmic elements of Infinity War with the same "fervor" that they gave to the more grounded films Winter Soldier and Civil War. Though they were unable to depict the films with naturalism given their science fiction content, they did want their films to have a psychological realism. Anthony added that Infinity War would deal with the "themes of fate and destiny and the essence of what it means to be a hero". Feige said the films would explore whether the visions the Avengers had in Age of Ultron were predictions of the future or just projections of their fears. Anthony described the tone of the films as unique, given how they were melding the tones of all the individual MCU franchises, and it was important for the brothers that both films were tonally different from each other as well, with different storylines and structures.

Infinity War is set approximately two years after the events of Civil War, as the Russos always set "everything based on when the last movie came out". In addition to Starlin's "Infinity Gauntlet", Markus and McFeely drew inspiration from Jonathan Hickman's "Infinity" comic (2013). Infinity War was crafted like a 1990s heist film, with the brothers looking at many films "that had that heist-style energy to them", as Infinity War "has that energy of the bad guy being one step ahead of the heroes", with Thanos "on a smash-and-grab" to acquire all of the Infinity Stones. The films 2 Days in the Valley and Out of Sight served as inspiration for the brothers.

To handle the number of characters in the films, many are split into various smaller groups early on in Infinity War, which Anthony compared to "Nashville for super heroes. It's storytelling that is vignetted storytelling. It's to composite all of them under one story—everybody." The grouping included: Iron Man, Doctor Strange, Star-Lord, Spider-Man, and initially Bruce Banner and Wong; Thor and the Guardians of the Galaxy, which ultimately split further to just Thor, Rocket, and Groot; Scarlet Witch and Vision; Thanos and Gamora; and Captain America, Black Widow, Falcon, Winter Soldier, Banner, and Black Panther. Markus said that many discussions on character pairings were about whether to pursue and further develop pre-existing relationships or to introduce new ones, with him feeling that new pairings had the emotional level of a first date while characters that have been together before and are now in a much more dire situation and they are together again, you can really get down into the meat of their relationship."

Actor Robert Downey Jr. said in Iron Man's grouping there was a desire "to keep a little bit of the Science Bros [Stark/Banner relationship] alive" despite Banner having his own journey, and to expand on the positive Stark/Parker relationship. McFeely explained that the pairing of Strange and Stark came together because of the similarities between the characters being "guys with a vision but also an ego". To differentiate between the two, Markus and McFeely contrasted Stark's established story arc and drive to confront Thanos with Strange's more reluctant stance. Eventually adding Star-Lord provided "color" since Star-Lord also "thinks he's the smartest guy in the room ... only he isn't". A Sherlock Holmes joke was avoided when Strange first meets Stark, as the Russos felt it was "a very obvious joke" to do and "a meta joke that requires you to be a fan of other movies"; Downey portrayed Holmes in the films Sherlock Holmes (2009) and Sherlock Holmes: A Game of Shadows (2011), while Cumberbatch portrays the character in the television series Sherlock.

Thor's teaming with Rocket and Groot made "a delightful group" according to McFeely. Markus added that Rocket was considered for many other pairs, but ultimately landed with Thor because he "is so powerful that it's fun to stick Rocket next to him. Rocket does not seem to have much he could help Thor with, but it brings out new things in Rocket that you wouldn't have expected." Captain America's group continues from the events of Civil War, showing he, Black Widow, and Falcon have been on the run, in part by their different appearances (Rogers with a beard and Romanoff with blond hair). The writers also did not dwell on the romance between Romanoff and Banner, as established in Age of Ultron, beyond including a "loaded look between the two", because "it didn't serve the Thanos plotline ... There were a lot of situations we wanted to follow up, but nobody in real life would be addressing those things with Thanos coming." The relationship between Scarlet Witch and Vision was implied to have "been building and flourishing" since the events of Civil War.

Markus also talked about how he and McFeely were handling Thanos, a character that the audience knows is the threat of the films, yet until these films, had little scenes and screen time to divulge his history and motivations. He said, "We don't get an element of surprise [with his introduction]... You can count on a lot of scenes where we illuminate a lot about him very early [in the first film]", with McFeely adding, "It is incumbent upon us to give him a real story, real stakes, real personality, and a real point of view." The writers avoided the comic book storyline where Thanos tries to woo the female manifestation of Death, and instead paired him at times with Gamora, since "they had a lot of history we wanted to explore" and would add layers to Thanos that would avoid him becoming "the big mustache-twisting bad guy who wants ultimate power just to take over the world and sit on a throne". Avoiding the Death storyline moved away from the tease Whedon used in The Avengers with the character, where Thanos felt that by challenging the Avengers, he was courting death. Though the tease was purposely ambiguous, Whedon felt when he featured Thanos he did not know what to do with him and "kind of hung [Thanos] out to dry". Whedon added that "I love Thanos. I love his apocalyptic vision, his love affair with death. I love his power. But, I don’t really understand it." Whedon enjoyed the approach the writers and Russos took in Infinity War, giving Thanos "an actual perspective and [making] him feel righteous to himself", since the Death storyline was "not a concept that will necessarily translate".

Beyond the script used in the final film, two different drafts of Infinity War were also created. One of these drafts featured Thanos as the film's narrator, utilized a non-linear structure, and also had backstories for the Black Order members. Though this draft was not used, writing out Thanos' narration helped give Markus, McFeely, and the Russos more insight into the character. The other draft began the film after Thanos had already acquired the Power Stone, but this was rejected because "it felt like he had too many Infinity Stones to start". Going with the draft used in the final film, the plot had been "simplified, made more linear, and allowed more of the character moments come through" as the start of filming approached, giving the Russos "a very tight script" to work with.

Unlike Infinity War, Avengers: Endgame features mainly an original story that does not draw inspiration from any existing comics. Joe Russo explained, "I think we're in pretty fresh territory with Avengers 4. If anything, I think it's interesting after to go back and look at some of the Marvel films and view them through a different lens. But I can't think of any comics in particular that would have value" to give a basis for the film's story. Joe Russo also described the second film as "more of an epic adventure in the classic sense, with huge emotional stakes". Hope van Dyne / Wasp and Carol Danvers / Captain Marvel both only appear in the sequel, in order to preserve their debuts in Ant-Man and the Wasp and Captain Marvel, respectively, which were released between Infinity War and Endgame. Other characters, such as Hawkeye and Ant-Man, were excluded in Infinity War for "a very specific story choice". Joe Russo said "we have a really interesting story cooked up for both of those characters, and part of that story required that they be under house arrest [in Infinity War]." The Russos also revealed that, despite not appearing in Infinity War, the events of the film killed Betty Ross and Sif, previously portrayed in the MCU by Liv Tyler and Jaimie Alexander, respectively.

Pre-production
In January 2016, the Russos stated that they were "breaking ground" on the films, and in the middle of the month, revealed that filming would take place in Atlanta, Georgia, beginning in November 2016 and lasting until June 2017. In April, Jon Favreau confirmed he would once again serve as executive producer on the films, having done so on the previous Avengers films after directing the first two Iron Man films.

Speaking to the titles of the films, Feige said that "because they [have] such shared elements, it felt appropriate... to [subtitle the films] like that. But I wouldn't call it one story that's cut in half. I would say it's going to be two distinct movies." Anthony Russo reiterated that the two Infinity War films were "very very different from one another. It's not a part one and part two scenario, necessarily. They're just two different expressions. I think it creates a misconception that we're shooting them at the same time." As such, in early May 2016, the Russos revealed that they would retitle the two films, to further remove the misconception that the films were one large film split in two, with Joe stating, "The intention is we will change [the titles], we just haven't come up with [them] yet." By late July, Marvel announced that Part 1 would simply be known as Avengers: Infinity War, while Part 2 was referred to as Untitled Avengers film until a title was chosen. Anthony Russo stated that the title of the second film would not be revealed "for quite some time", with Feige and the Russo brothers indicating the title was being withheld as it would give away plot details for Infinity War and the sequel.

In June 2016, composer Alan Silvestri was revealed to be returning from The Avengers to score both films. In October, Feige announced that filming would begin in January 2017. Theoretical physicist Clifford Johnson consulted on the films, having previously done so on the second season of Agent Carter and Thor: Ragnarok. Production designer Charles Wood also noted the films would be introducing "many, many, new worlds" outside of Earth and others previously established in prior films. Jeremy Renner, Elizabeth Olsen, and Dave Bautista noted that the actors appearing in the films had not received scripts before the start of shooting, with Bautista specifically stating on January 22, 2017, that he had not received a script, despite beginning his filming on January 23. No actor in Infinity War had the entire script, though some who were in the film more than others had access to additional scenes. Additionally, fake and redacted scenes were used to help protect the secrecy surrounding the film.

Casting
In June 2013, Robert Downey Jr. signed on to return as Tony Stark / Iron Man for a third Avengers film, and Josh Brolin signed a multi-film deal the following May, to play Thanos. In July 2014, Feige stated that actors from previous MCU films were under contract to return to for a third Avengers film, with Renner stating that September he was signed on to reprise the role of Clint Barton.

After the announcement of Infinity War and its sequel, many established MCU actors were confirmed to be joining Downey and Brolin, including previous members of the Avengers Chris Hemsworth as Thor, Mark Ruffalo as Bruce Banner / Hulk, Chris Evans as Steve Rogers / Captain America, Scarlett Johansson as Natasha Romanoff / Black Widow, Don Cheadle as James "Rhodey" Rhodes / War Machine, Paul Bettany as Vision, Elizabeth Olsen as Wanda Maximoff / Scarlet Witch, and Anthony Mackie as Sam Wilson / Falcon. Infinity War also sees the Avengers unite with the Guardians of the Galaxy, including Chris Pratt as Peter Quill / Star-Lord, Pom Klementieff as Mantis, Karen Gillan as Nebula, Dave Bautista as Drax the Destroyer, Zoe Saldana as Gamora, Vin Diesel as the voice of Groot, and Bradley Cooper as the voice of Rocket. Sean Gunn served as the on-set stand-in actor for Rocket on both films.

Additional actors reprising their roles in Infinity War from the various MCU franchises include Benedict Cumberbatch as Stephen Strange from Doctor Strange, with Benedict Wong as Wong; Tom Holland as Peter Parker / Spider-Man from Spider-Man: Homecoming, with Jacob Batalon as Ned, Isabella Amara as Sally, Tiffany Espensen as Cindy, and Ethan Dizon as Tiny; and Chadwick Boseman as T'Challa / Black Panther from Black Panther, with Danai Gurira as Okoye, Letitia Wright as Shuri, Winston Duke as M'Baku, and Florence Kasumba as Ayo. Sebastian Stan also appears as Bucky Barnes / Winter Soldier from the Captain America films, along with Tom Hiddleston as Loki and Idris Elba as Heimdall from the Thor and Avengers films; Iron Man supporting actress Gwyneth Paltrow as Pepper Potts; Benicio del Toro as Taneleer Tivan / The Collector from Guardians of the Galaxy; William Hurt as Thaddeus Ross, who first appeared in The Incredible Hulk; and Kerry Condon as the voice of Iron Man's A.I. assistant F.R.I.D.A.Y. Samuel L. Jackson and Cobie Smulders make uncredited cameos in the post-credits scene as Nick Fury and Maria Hill, who they respectively portrayed in several previous films. Jon Favreau was to reprise his role as Harold "Happy" Hogan, while co-director Joe Russo had a cameo appearance as a paparazzi photographer, but this scene did not make the theatrical cut of the film.

In early January 2017, Peter Dinklage was in negotiations to appear in the films, and was eventually cast in the role of Eitri. At D23 Expo 2017, Marvel announced the inclusion of the "Children of Thanos", Thanos' henchmen in the film. Known collectively in the comics as the Black Order, the actors playing the characters were soon revealed to be Tom Vaughan-Lawlor as Ebony Maw,  Terry Notary as Cull Obsidian, Carrie Coon as Proxima Midnight, and Michael James Shaw as Corvus Glaive. Joe Russo explained that the Black Order was included in the film so that there were characters that the heroes "have to go through to get to" Thanos rather than have them challenge him "every step of the way". He added that Supergiant, a member of the comics version of the Black Order, was not included because "consolidation seemed like a smart thing ... they were starting to overlap each other". The Black Order in the film have altered powers which the Russos "felt were in better service of our storytelling". Ross Marquand voices Red Skull, the "Stonekeeper" guarding the Soul Stone. Marquand replaces Hugo Weaving, who had expressed reluctance to reprise the character from Captain America: The First Avenger; Weaving was approached to reprise the role. Marquand, who is known for his celebrity impressions, said that Marvel was looking to "come as close to the iconic role that Hugo Weaving portrayed seven years ago and pay homage to it while also giving it a new flavor", and after Marquand attempted to "do a straight voice match to Hugo's performance", the Russo noted that the character would "sound a little different" from the last time he was seen, recommending Marquand add "this kind of ethereal almost ghost-like quality to his voice". Taking this direction, it took Marquand around 10 days to perfect the voice, which he felt melded Weaving's "iconic performance in The Matrix with the German accent he" used for the Red Skull. Red Skull was created through CGI and portrayed with stand-ins on set.

Actors who returned for Endgame include: Downey, Hemsworth, Ruffalo, Evans, Johansson, Cumberbatch, Cheadle, Holland, Boseman, Olsen, Mackie, Stan, Hiddleston, Wong, Klementieff, Gillan, Bautista, Saldana, Cooper, Paltrow, Brolin, Pratt, and Wright. They were joined by Jeremy Renner as Clint Barton, Evangeline Lilly as Hope van Dyne / Wasp, Favreau as "Happy" Hogan, Paul Rudd as Scott Lang / Ant-Man, Brie Larson as Carol Danvers / Captain Marvel, Michelle Pfeiffer as Janet van Dyne, Michael Douglas as Hank Pym,  and Frank Grillo as Brock Rumlow / Crossbones. Stellan Skarsgård, who portrays Erik Selvig in the MCU, said he believed he would appear in one of the films as he had one more film left on his contract, and would not be appearing in Thor: Ragnarok. By October 2017, Hiroyuki Sanada had been cast as Akihiko for Endgame, and a year later, Katherine Langford was revealed to have been cast in Endgame, also in an undisclosed role. Langford was to play the older version of Tony's daughter Morgan Stark, who he sees in a vision after Tony's snap, but the Russos cut her scene as they felt that the scene would be too confusing.

The Russos hoped to have another actor from their TV series Community make a cameo appearance, after Danny Pudi and Jim Rash appeared in The Winter Soldier and Civil War, respectively. David Cross was invited to make a cameo appearance as Tobias Fünke in Infinity War, his character from the sitcom Arrested Development, which the Russo brothers had previously worked on; this was prevented by a scheduling conflict, but Fünke still appears in the film as a specimen in the Collector's collection, played by an uncredited extra. Avengers co-creator Stan Lee makes cameo appearances in both films. Starlin indicated he was interested in making a cameo appearance in the films.

Filming
Principal photography for Avengers: Infinity War began on January 23, 2017, at Pinewood Atlanta Studios in Fayette County, Georgia, under the working title Mary Lou, with Trent Opaloch serving as director of photography. Additional filming occurred in Scotland, including in Edinburgh, Glasgow, and the Scottish Highlands, with studio work taking place at Wardpark Studios in Cumbernauld. Filming in Scotland began on February 28, 2017. From March 18 through April 21, 2017, filming occurred in Old Town, Edinburgh on and around the Royal Mile, including High Street, Parliament Square, Cockburn Street, and Roxburgh Close and Old Fishmarket Close, as well as Waverley Station. Filming also took place at Durham Cathedral in Durham, England in early May 2017, and in St Abbs. Additional filming also occurred at St Giles' Cathedral and Inverness Castle. In late June 2017, filming occurred in Downtown Atlanta, as well as Atlanta's Central Park in early July, before moving to Queens, New York in the middle of the month. For Infinity War's final scene, the filmmakers partnered with Indochina Productions, a studio based in Thailand, to acquire footage of the Banaue Rice Terraces at Ifugao, Philippines. Since Infinity War and Black Panther were filming simultaneously in Atlanta, both production teams worked together closely to ensure a unified presentation of Black Panther's home nation of Wakanda in both films.

In April 2017, Feige stated that the films would not be filmed simultaneously as originally planned but rather back-to-back, and indicated that filming for the Infinity War sequel would commence in August 2017. He explained, "We're doing them one right after another. It became too complicated to cross-board them like that, and we found ourselves—again, something would always pay the price. We wanted to be able to focus and shoot one movie and then focus and shoot another movie." As this decision was made a few months before the start of filming, some of the pre-production work was negatively affected. The films were originally scheduled to be shot concurrently, with the Russos suggesting that "some days we'll be shooting the first movie and some days we'll be shooting the second movie. Just jumping back and forth." Anthony Russo originally felt it made more sense to shoot the films simultaneously, due to financial and logistical reasons, considering the large number of cast members, even though each part is its own distinct film. Some scenes from both films did ultimately get shot on the same day, mainly to accommodate actor availability.

Dan T. Cathy, co-owner of Pinewood Atlanta, noted the films were "the largest film production ever with a [combined] $1 billion budget", which Feige later stated was false; the film had an estimated budget between $316–400 million,  still making it one of the most expensive films ever made. Evans and Hemsworth both earned $15 million for both films. In June 2017, Johansson commented on the amount of characters featured in the films, and felt the films would feature over 60, with at least 30 appearing together in one scene. Filming of Infinity War concluded on July 14, 2017.

Filming on Avengers: Endgame began on August 10, 2017, also at Pinewood Atlanta Studios, under the working title Mary Lou 2. Also in August, additional filming occurred in The Gulch area of Downtown Atlanta, near the Five Points MARTA station, and in Piedmont Park. Production on Avengers: Endgame wrapped on January 11, 2018.

The Russo brothers announced that both films would be shot using Arri Alexa IMAX cameras, thus marking the first time that a Hollywood feature film was shot entirely with IMAX digital cameras. The footage was digitally processed by IMAX and released in a 1.90:1 aspect ratio exclusively in IMAX theaters. Joe Russo said that because many of the characters are tall, the "IMAX aspect ratio works for those types of characters, and the landscapes are stunning. There are some really exotic landscapes in the film, and to be able to put those on an IMAX screen, it's an incredible tool to have as a filmmaker to be able to exploit that scale of aspect ratio." Opaloch noted that the production would use 12 of the Arri Alexa IMAX cameras, and that Arri was working on lenses with additional focal lengths for the camera. They hoped they would be available by the start of filming, since the production would "need all the accessories and lenses", as it was "such a behemoth of a project". Infinity War was shot mostly with a single-camera setup, opposed to the three camera setup used by the Russos on the Captain America films they directed. The Russos went with this approach to make Infinity War "look bigger" over "the vérité look" the Captain America films had with three cameras. Approximately 890 hours of footage was shot between both films.

Post-production
Joe Russo stated in July 2017 that there were a couple of unfinished scenes for Infinity War that would be shot "in the next few months". The first trailer for the film revealed the inclusion of the alien species Outriders, from the storyline Infinity. In early March, Disney moved the release of Infinity War in the United States to April 27, 2018, to have it release the same weekend as some of its international markets. While Infinity War features one post-credits scene, as with previous MCU films, the Russos considered not including one. Anthony noted that part of the reason for considering this "was because we knew the ending was a complicated ending, a difficult ending, and we wanted that ending to be very definitive. We didn't want to complicate it with other ideas." He felt the tag used, which shows Nick Fury signaling for Captain Marvel before fading away, put "a small button [on the ending] but that's it".

Post-production for the second film began in earnest after the release of Infinity War, with Feige noting that the film would have a slightly longer time in post-production than some of their other films. Additional filming took place in Dutchess and Ulster counties in New York in June 2018. Reshoots for the second film began by September 7, 2018. Ruffalo indicated that beyond reshooting material, the additional photography would be used to finish the film, since it had not been fully completed earlier in the year. The additional photography was completed on October 12, 2018. In early November 2018, the Russos began to receive completed visual effects shots and starting to work with Silvestri on the score. On December 7, 2018, with the release of its first trailer, the title of the sequel was revealed to be Avengers: Endgame. Additionally, its release date was changed to April 26, 2019. Feige said the title was decided on since development started on the films and confirmed that Doctor Strange uttering the word "endgame" in Infinity War was a direct reference to the title of the second film. The final reshoots occurred in January 2019, including the climax of Endgame where Tony Stark says "I am Iron Man" while snapping his fingers with the Infinity Stones. Previously, this line was not uttered, so a significant reason for the January 2019 reshoots was to include the line. Joe Russo indicated that they hoped to have the film completed by March 2019. Additional specifics of the overall reshoots include altering the scene in which the death of Black Widow occurs. Originally, the scene was written and shot as a battle between Black Widow and Hawkeye versus Thanos and his forces. However, the Russos came up with a better idea in post-production and decided to reshoot the scene.

Joe Russo felt that Endgame was his and his brother's "best work for Marvel", noting, "I think we’ve grown with every movie that we’ve made there. We’ve grown with the characters. We’ve grown with the cast. As filmmakers we’re very happy and very excited with the movie." He also added that because the majority of the film was made before Infinity War released and the audience was able to respond to it, the fourth Avengers film was "really pure... without any sort of external noise creeping in [to the story] at all."

Editing
Jeffrey Ford and Matthew Schmidt served as editors for Infinity War and Endgame. Ford stated there was "a pretty solid cut" of Infinity War by October 2017. He continued that they "kept cutting until very late because we kept having ideas and thoughts and ended up restructuring the film a couple of times until it sort of clicked in." Ford explained the restructuring was about adjusting "the rhythm of the film and designing it so that it has dynamics so the characters handoff to each other in a way that feels like you peaks and valleys of excitement and emotion... So it was really finding the rhythms of that which involved breaking up stories in a slightly different way than we had in the screenplay phase and in the earlier edit and that’s all it was really." During filming, both editors worked on compiling the material from both films as it was given to them. Around December 2017, Ford began working exclusively on the edit for Infinity War, while Schmidt continued compiling the Endgame footage. Once Infinity War was preparing for release, both Ford and Schmidt began "working in earnest" on Endgame, with editing beginning a few weeks before the release of Ant-Man and the Wasp in July 2018. In early November 2018, the Russos were "about halfway through" editing the film. In March 2019, the Russo brothers confirmed that the final film edit for Endgame was locked.

With roughly 900 hours of footage assembled between Infinity War and Endgame, Ford declared that “We were cutting every day, we were refining, we were figuring out what we were going to reshoot, figuring out what we had to finish. It was a constant state of pre-production, production, and post-production all at the same time for almost a year [2017] straight. And then when we finished that year of insanity, we went right into an absolutely hellish, almost impossible post production period that lasted from January to April when we delivered Infinity War, and that was one of the most intense periods of filmmaking I ever experienced, and I have worked on some crazy movies.”

Visual effects


Visual effects for Infinity War were created by Industrial Light & Magic (ILM), Framestore, Method Studios, Weta Digital, DNEG, Cinesite, Digital Domain, Rise, Lola VFX, and Perception. Sequences from the film for the visual effects vendors were given to them beginning in February 2017. Digital Domain worked on creating Thanos for the film, producing over 400 visual effects shots. The company created a new facial capture application called Masquerade, based on the concept of machine learning through computer algorithms, specifically for the film, beginning work on the system 3–4 months before filming began to develop and test it. They presented their results to Brolin, the Russos, and executives from Marvel ahead of filming to demonstrate the subtleties Brolin would be able to bring to the character, which helped inform Brolin how to portray the character. Before the start of filming, Brolin's facial expressions were captured with ILM's Medusa system, which along with his motion capture data from set, were fed to Masquerade to "create a higher-resolution version of what Brolin did on set" so animators could apply that to the CGI character. Kelly Port, Digital Domain's VFX Supervisor, noted the design of Thanos took into account the versions that appeared in previous films, but were adjusted more toward's Brolin's features, which also helped with matching his performance to the digital character. Weta Digital worked on the fight on Titan, where they also created a separate version of Thanos for their needs, applying the performance capture data to the tools Weta developed for their work on the 2010s Planet of the Apes series. Weta worked on 200 shots of him, along with their 250 other effects shots, that included the Titan environment and the other characters in the fight. Digital Domain also created Red Skull, and was aided by reference material from Captain America: The First Avenger to create the CGI character. Port noted there was "a wide spectrum of designs in terms of what he would look like", with some options including having Hugo Weaving reprise the role with make-up, had he returned, and a version "where the Tesseract did very bad things to his appearance, so he was much more skeletal." The final character design was "in between", one that "showed both that the Tesseract did affect him and choose him in some kind of way to be" the guardian of the Soul Stone.

Framestore created 253 shots for the film for the New York fight sequence in the first act of the film. Patric Roos, Framestore's VFX Supervisor, called their shots a "mix of full CG shots, plate shots, FX, set extensions, magic spells and a lot of character work". A portion of the fight sequence was shot in Atlanta, before moving to a fully CGI Washington Square Park. Framestore's Capture Lab spent a month in Manhattan and New Jersey shooting photo reference, LIDAR and gigapixel panoramas to capture the environments that had to be recreated digitally, capturing more than 250,000 photos and 15TB of data. For their work on the Black Order members, Framestore spent close to a year developing their models, working with Marvel Studios' visual development team to create animation vignettes to explore each member's personalities and character traits. Framestore also created Iron Man's new suit, the Mark 50, that is made up of singular nanobots which move around his body to form a suit, and was developed alongside Marvel for about two years, and Spider-Man's Iron Spider armor suit. The models and textures for the Iron Spider suit were shared with fellow visual effects vendor Trixer in order for them to implement them in Spider-Man: Homecoming where it was first seen. Framestore also worked on the Black Order's Q-Ship, and Doctor Strange's "Eldritch magic", which was updated from its first appearance in Doctor Strange. Cinesite's work on the interior of the Q-Ship when Ebony Maw interrogates Strange consisted of 215 shots. The company also worked on the small fight between Iron Man, Spider-Man, Strange and the Guardians on the ship, which required full character animation, blaster and web effects, CGI daggers, Star-Lord's mask, Mantis' antennae, and damage to the Q-Ship. The post-credit sequence, the opening scene in Central Park, the scene when Black Panther presents Bucky Barnes with his new arm, interior shots of the Quinjet, and an establishing shot of the planet Vormir were created by Rise, which totaled 26 shots. For the post-credit sequence, Oliver Schulz, Rise's VFX Supervisor, noted the company had done a similar fading effect for a previous commercial project, so those assets were used as a baseline. The company also received digital assets of Cobie Smulders and Samuel L. Jackson from The Winter Soldier for use in the scene. Schulz noted that part of the sequence's difficulty was because "at a later point in the process the decision was made to not move forward with the filmed plate of Nick Fury—instead we would do a camera takeover and switch to a full CG shot. This included a full CG arm crumbling away in close-up together with a full CG environment. Additionally were also the CG close-up pavement and the all CG pager—which reveals the illuminated Captain Marvel Logo at the end."

Visual effects for Endgame were created by ILM, Weta Digital, DNEG, Framestore, Cinesite, Digital Domain, Rise, Lola VFX, Cantina Creative, Capital T, Technicolor VFX, and Territory Studio. The film has over 3,000 visual effects shots.