Warning: the following contains SPOILERS for The Mandalorian and The Book of Boba Fett.

Star Wars has revealed just how Mark Hamill looks as Luke Skywalker in The Mandalorian season 2 finale without CGI, as well as the deep fake process considered to bring him back and how they ultimately de-aged him. Luke Skywalker's return in The Mandalorian was one of the biggest Star Wars moments since Disney purchased Lucasfilm, with the Jedi arriving to take Grogu away for training. It was made even more impressive by the fact that Luke skywalker's Mandalorian deep fake was somehow kept a secret, even despite Hamill himself returning to the role.

Of course, Hamill is now in his 60s, so couldn't just play Luke post-Return of the Jedi. Instead, The Mandalorian used de-aging technology and a stand-in actor, Max Lloyd-Jones, in order to bring Luke back. The end result was somewhat divisive in terms of the visual effects, with some fans complaining of the Uncanny Valley appearance of Luke. but in terms of the story Luke coming for Grogu worked perfectly. Luke Skywalker's Mandalorian deep fake also set the stage for the Jedi's return in The Book of Boba Fett.

Related: Grogu's Future Can Repeat Star Wars' Rey Skywalker Trick (But Better)

The Mandalorian's deaged Mark Hamill is a combination of old pictures and footage with cutting-edge digital technology. Disney Gallery: Star Wars: The Mandalorian season 2, episode 2, "Making of S2 Finale," goes behind the scenes of Luke's return. The special documentary is all about what it took to bring both Luke and Hamill back. As such, it has a few reveals as to the process of digitally re-creating this character. That means getting to see Hamill himself standing uncloaked in The Mandalorian, rather than the de-aged Luke, but also images of the de-aging at various stages of development. The Mandalorian explored various methods of de-aging Luke, including using deep fake technology.

How The Mandalorian Used Deep Fake Technology To De-age Mark Hamill

Mark Hamill and Max Lloyd-Jones in The Mandalorian

To create a convincingly deaged Mark Hamill, The Mandalorian's effects team pulled countless images and bits of footage not only of Luke in the original Star Wars trilogy, but also interviews from around the time, with Virtual Production Visualization Supervisor, Landis Fields, spending days on his own (for secrecy) trying to push deep fake as far as possible. The documentary shows a lot of footage of this process, with images of young Luke overlaid over Hamill and Lloyd-Jones on set, to slightly uncanny effect. This is because deep fake requires feeding as many images and clips of a person as possible into the AI, so that a complete picture can be built up of a person's face, accounting not just for the actual look, but for all possible facial expressions they can make. This is what allows the AI to match what the actor is doing on set, including the subtle adjustments necessary for matching the lighting on set.

While Lucasfilm explored the possibility extensively, they ultimately decided to use more of the tried-and-trusted de-aging methods seen across previous Marvel and Star Wars films, working with effects house Lola and combining Hamill's performance with Lloyd-Jones', with both of them acting on set so that Lloyd-Jones could perfectly match Hamill, and then using visual effects to make the younger actor look more like Luke Skywalker. This entailed Hamill filming twice – once on set, and a second time in a special lighting rig called The Egg, which allowed them to capture ultra high-res textures of his face and have control over lighting and positioning, and then combining those performances with Lloyd-Jones to achieve the end product.

Did Lucasfilm Pull Off Luke Skywalker’s Deep Fake Mandalorian Appearance?

Din Djarin And Luke Skywalker In The Mandalorian Season 2 Finale

After witnessing Lucasfilm's work on Book of Boba Fett, it's clear that they won the long game when it came to deaging Mark Hamill for his reprisal of Luke Skywalker. Having two actors does make it trickier – Marvel's best de-aging successes, for instance, have come when the same actor has been de-aged, like in Ant-Man, Captain America: Civil War, and Black Widow. That's why there were ultimately some complaints about Luke in The Mandalorian, especially with his mouth movements not fully syncing up to the audio. However, as the documentary also discusses, Hamill's return to Star Wars was a special moment, and even if the VFX wasn't perfect, it was worth it to have him return. The scaling up of the effects of Book of Boba Fett was also stunning, leading to a much more realistic Luke, and it showed just how quickly SFX innovations can enter the Uncanny Valley.

Related: The Mandalorian's Story Mirrors Ahsoka's From Clone Wars Through Rebels

Will Luke Skywalker Return In The Mandalorian Season 3?

The-Mandalorian-book-boba-fett-Grogu-baby-yoda-Luke-Skywalker

The Mandalorian season 3 is likely to once again see a deaged Mark Hamill step back into his legendary role in the Star Wars franchise. Although Grogu ultimately chose to be with Din Djarin, The Mandalorian season 3 could reveal further details about Luke's Jedi Temple and his efforts to rebuild the Jedi Order. While Grogu and Luke have parted ways, there is no distance that The Force cannot cross, which means that the two would remain inevitably connected. Moreover, considering how the de-aging of Luke Skywalker has improved in The Book of Boba Fett, Lucasfilm and Disney will likely treat audiences to much better VFX in The Mandalorian season 3 and any future Book of Boba Fett installments.

More: Star Wars: Why George Lucas Stopped Yoda's Species From Being Revealed