[Warning: This post contains spoilers for Rogue One: A Star Wars Story.]

The Academy of Motion Picture Arts and Sciences released its shortlist of 10 movies that will vie this year for the best visual effects Oscar on Friday, and Rogue One: A Stars Wars Story made the cut. But when members of the visual effects branch meet to review footage from the film, they’ll have more to consider than just the new planets and warring spacecraft that have been created for the film.

In the ongoing Star Wars chronology, Rogue One takes place just before the events depicted in the original 1977 Star Wars, now known as Star Wars: Episode IV — A New Hope. And to connect the two films, the new installment also includes several characters who figure prominently in A New Hope — among them, Peter Cushing’s villainous Grand Moff Tarkin.

Cushing, a British actor famous for playing such iconic parts as Sherlock Holmes and Victor Frankenstein, died in 1994. But that didn’t stop Lucasfilm and the Lucasfilm-owned digital effects house Industrial Light & Magic from reanimating his likeness so that Tarkin could make a convincing new appearance in Rogue One.

With the film hitting theaters worldwide today — preliminary estimates have the movie’s opening-day haul running to nearly $70 million in North America — Disney is trying to keep a lid on some of the new movie’s surprises, declining to make members of its VFX team available to discuss how they pulled them off.

But director Gareth Edwards has already begun to explain the process, telling RadioTimes.com that as the idea of including Tarkin in the story developed, John Knoll, the film’s visual effects supervisor, convinced him that instead of recasting Tarkin, it would be possible to create a credible performance that would look as if Cushing himself had stepped back in front of the cameras.

To accomplish that, the filmmakers hired Guy Henry, a 56-year-old British actor — he appeared as Minister of Magic Pius Thicknesse in Harry Potter and the Deathly Hallows — whose long, lean frame and physiognomy bear a resemblance to Cushing’s. Henry played the part of Tarkin on set, then the VFX team took over to transform him into Cushing.

“It was a massive thing for him, it was very gracious of him, because essentially he’s doing this big performance and getting zero credit for it,” Edwards told RadioTimes. “He was going to be totally replaced, and then had to keep it all secret. So, um, that was a big ask.”

The creation of a believable CG human — which has long been considered the holy grail of the visual effects industry — has presented a challenge for even the world’s most skilled VFX artists and companies.

VFX pros agree that there needs to be a compelling reason to create a CG human. Otherwise if you want, say, George Clooney, why not just film George Clooney?

To date, digitally created or enhanced humans have been used for only a few specific reasons, such as when an actor dies during the course of a production — the most recent high-profile example being the digital version of the late actor Paul Walker that was created to complete 2015’s Furious 7

They also have been used in order to show either a younger or older version of a character, as was the case with Brad Pitt’s performance in The Curious Case of Benjamin Button and Robert Downey Jr.’s in Captain America: Civil War, where a younger version of Downey’s Tony Stark has a crucial scene.

Full CG digital doubles are also frequently used in action or fantasy films when the story calls for placing an actor in a situation that is too dangerous — or simply impossible — to film.

The work on display in Rogue One is an impressive new example of the potential for creating CG human characters — the audience at last weekend’s Hollywood premiere erupted in enthusiastic applause at the return of familiar characters like Tarkin — and it will no doubt spark plenty of debate about how, and why, CG humans could be used in future movies. (If money is no object, could a producer threaten a difficult actor with a CG replacement?)

Attempts to create CG humans, whether for films or videogames, run the risk of falling into the perceptual zone that is known as the “uncanny valley” — when a viewer sees a character that is very humanlike but not quite right, the viewer's response can shift from empathy to repulsion.

Discussing how the digital Walker was created for Furious 7, Weta VFX supervisor Joe Letteri has said, “Important things to getting a convincing performance was getting the speed of movement to the eyes — the subtle responses — and also the shape of the mouth. It seems like particular attention to the corners of the mouth is an easy place to get it wrong because there is so much compression and tension there. These are really small details, but if you get them wrong, you feel that there’s something fake about the performance.”

The process that Letteri’s team followed on Furious 7 is likely similar to the way ILM proceeded on Rogue One.

On Furious 7, Weta used live performances, mostly by Walker’s two brothers, whose faces were replaced by CG versions of Paul's. In that case, the effects team also made digital scans of the brothers’ heads, which were then used to create certain shots. And to further animate the CG performance, Letteri said, "We used a lot of Paul's footage as reference, because as close as the brothers were in style and mannerisms, they just weren't Paul when Paul played his character. We really tried to limit our interpretation of the character to things that we had seen Paul do as the character. We found performances that matched the situation that we needed to put him in, and we used that to guide us."

The rest of Furious 7 was completed with outtakes or older footage of Walker that was manipulated with VFX to fit into the new scene.

To complete the illusion, the WETA sound team then had to add a convincing simulation of Walker’s voice mouthing new dialogue. Explains Letteri, "The sound editors had to craft the vocal performance out of existing dialogue from Paul, and we had to animate to that."

Rogue One’s Knoll is no stranger to creating digital performances. For example, he worked on Davy Jones, the character played by Bill Nighy, in Pirates of the Caribbean: Dead Man’s Chest. In that film, which won an Oscar for its visual effects, Nighy played the character on set and then was replaced with a CG version based on his performance.

Jones, of course, was a fantastical character, whose face sports octopus-like tentacles. Tarkin, although he exists in a fantasy world, had to look convincingly human — which carries a much higher degree of difficulty.