Warning: Spoilers ahead if you haven't seen "Rogue One."

As "Rogue One: A Star Wars Story" continues to dominate the box office, more and more people are getting in on the conversation about one of the movie's characters.

Grand Moff Tarkin, the commander of the Death Star and one of the prominent villains in 1977's "Star Wars: A New Hope," is brought back to the screen in "Rogue One" thanks to advances in motion capture.

The actor who played Tarkin in "A New Hope," Peter Cushing, died in 1994. But the CGI wizards at Industrial Light & Magic created a digital version of the legendary actor so Tarkin could be featured in the movie. And not just in a one-shot cameo, but as a main figure of the Empire brass who are making the Death Star operational.

"If he's not in the movie, we're going to have to explain why he's not in the movie," Kiri Hart, a Lucasfilm story development executive and "Rogue One" coproducer, told the New York Times. "This is kind of his thing."

Lucasfilm cast English actor Guy Henry to play Tarkin during principal photography of "Rogue One." He wore motion-capture materials on his head so that it could be replaced by a CGI version of Cushing’s in postproduction.

Moff Tarkin and Darth Vader Star Wars
Peter Cushing as Grand Moff Tarkin in "Star Wars: A New Hope."

John Knoll, the CCO of Industrial Light & Magic (ILM) and visual effects supervisor on "Rogue One," told the Times that the process was "a super high-tech and labor-intensive version of doing makeup."

This included paying attention to how Cushing was lit in "A New Hope," since the lighting was different than in "Rogue One." Adjustments had to be made so the CG Tarkin would fit in with the other characters. And the animators at ILM also had to pay attention to very small details like how Cushing's lips would move when saying certain words. They would then mimic those movements for the character in "Rogue One."

According to Knoll, if the CG Tarkin didn't work while developing it, the backup plan was to make the character a hologram for some scenes or transfer his dialogue to another character.

Though Lucasfilm got the approval of Cushing's estate before creating him in CGI form, critics and "Star Wars" die-hards have flooded the internet questioning the ethics of bringing Cushing back.

Knoll said he was aware of the "slippery slope argument."

"It is extremely labor-intensive and expensive to do. I don't imagine anybody engaging in this kind of thing in a casual manner," he said. "We're not planning on doing this digital recreation extensively from now on. It just made sense for this particular movie."