The ninth and final episode of Star Wars' Skywalker Saga was supposed to be Carrie Fisher's movie, with a focus on the life of the resistance stalwart Leia Organa. When Fisher died in late 2016, a full year before the release of the eighth episode, Star Wars: The Last Jedi, those plans were inextricably dashed, but with the help of some smart archiving and digital wizardry bordering on Force magic, Fisher was able to play a small but integral part in The Rise of Skywalker.

Creating an entirely digital version of the actress was off the table from the start, but the Leia who wound up on screen was more digitally rendered than fans initially assumed. In July 2018, Lucasfilm announced that filmmaker J.J. Abrams and his team had found some outtakes and other unused Fisher footage that could be utilized for the finale. They kept the details hush-hush, both because Abrams is notoriously secretive about his projects … and because actually figuring out how to integrate the footage into a brand-new movie was a remarkable challenge with an uncertain outcome.

"We went through and isolated every piece of footage that we thought we could use; it was sometimes just a reaction to a scene or a moment, and then other moments, she was actually saying lines," Roger Guyett, the visual effects supervisor on the film, explains to SYFY WIRE. "The first step is they had to write the script, and they wrote those scenes around her lines. Then we had to go through and try and figure out which of those line deliveries makes sense in relation to each of those scenes."

Credit: LucasFilm/Disney

Some The Rise of Skywalker flashback scenes feature younger Leia, with a face taken from Return of the Jedi and placed on a new body; dipping into the original trilogy for new scenes wasn't a new task, as they did the same in Rogue One: A Star Wars Story while Fisher was still alive. But for the new stuff, ILM was at the mercy of the archive. The Lucasfilm and ILM teams worked backward, building a movie around existing dialogue and then running production around footage that had long been in the can. Unfortunately, there was only so much they could do with finished shots, so while viewers may have thought it was all Fisher on screen, her appearances were mostly digital. It was a sleight of hand that underscores the sheer technical capabilities at ILM.

"When you see Carrie in Episode IX, it's a live-action face with a digital hair, head, and body," Guyett reveals. There were several reasons for the decision to digitally rebuild almost all of Fisher, from technical requirements to story and aesthetic choices.

"You want her to have a new costume, you want her to have a new hairstyle, so that what you're doing is not obvious that you're just taking shots from a previous movie," explains Neal Scanlan, who was in charge of special creature effects.

And so everything but Fisher's face was fully digital, with new designs atop a body that's impossible to distinguish from the real thing. But reproducing Fisher was only half the challenge. There were also a number of important calculations to be made at all stages of the production so that her presence was seamless, not only on her own, but in relation to all the actors who would be interacting with her on screen.

"Clearly we wanted to integrate her into the scenes, so you couldn't just cut to a shot of her as a single shot," Guyett says. "You wanted her to be part of the staging of the scene … You've also got to have all the other actors understand the scene and understand what her performance is for that moment so that everyone is emotionally on the same level."

Video of Star Wars: The Rise Of Skywalker | “Celebrate” TV Spot

Fisher's daughter Billie Lourd, who also stars in the movie, stood in for Leia during the shoot, so the actors could interact during their own takes, but the little details — eye lines, physical distances, perspectives, and shadows — had to be precise in the camera. The production team relied heavily on motion control cameras to time camera movements that would sync with both the actors they were shooting and the digital footage they were creating of Fisher.

"You had to try and make sure that both the lighting would work and the staging would work," Guyett says. "So we did some staging exercises, we do storyboards, we tried to put together a version of the scene so we can all go, 'Okay, so if Carrie's standing over there, she's lit like this, then she might move forward, and now we're going to do a motion control move back, but then Rey could move …"

Fisher's scenes required meticulous preproduction planning, rigorous sequencing, and actors who could follow exact instructions in emotional, difficult scenes, not to mention the digital team's intense efforts. "I thought it was going to be difficult, but thankfully it was twice as difficult as I thought," Guyett says with a laugh. "Way harder than I ever imagined, and of course you're trying to do this in the heat of production."

There were endless calculations for what wound up being just a few minutes total in screen time — but it was all worth it, the team says.

"The truth was that [J.J.] wanted to say that all of her performance was actually Carrie Fisher, and I think that was a great integrity to that," Guyett says. "So when you see her in the movie and you're looking at her face, that's her performance, and it's just the rest that's like a magic trick."