For “Avengers: Endgame,” the VFX-rich conclusion of the Marvel Cinematic Universe, the team raised the stakes higher than ever for one last time, complete with an epic battle.

To pull off the biggest fighting scene Marvel had ever created for any of the franchise’s 23 movies—a showdown between the Avengers and Thanos (played by Josh Brolin)—the studio mobilized its VFX battalions, including ILM, DNEG, Cinesite, Framestore, Digital Domain, Rise VFX, Lola VFX, Cantina Creative, Capital T, Technicolor VFX and Territory Studio. Weta Digital, using a green screen, created most of the battle.

But it wasn’t just the war scenes that relied upon the VFX army. The new environments in the film were all computer-generated worlds and planets, including Titan, Kamar-Taj, Contraxia, “Black Panther’s” Wakanda and “Thor’s” New Asgard.

For the scenes featuring “Smart Hulk,” a mash-up of Bruce Banner (Mark Ruffalo) and his alter-ego, “Hulk,” Marvel turned to Framestore to create the hybrid character. Paying attention to every facial expression and muscle movement, they captured Mark Ruffalo’s performance and blended in effects for the emerging Hulk, using a combination of animation and machine-learning technology. The result: a CG character that strikes a nuanced balance between the Incredible Hulk and Banner’s human side.

Costumes for the film were also created through VFX, partly due to shooting schedules and time constraints. During shooting the actors donned suits that were later replaced with the help of VFX teams. Framestore crafted digi-doubles for the Quantum suits using nanobot technology; they also used CG for the helmets that manifest before the Avengers go out to save the world and defeat Thanos.

Meanwhile, over at Digital Domain and Weta, Thanos was brought to life, using motion capture sessions with Brolin.