When it comes to flashbacks, most TV shows are happy enough to cast younger actors as past versions of lead characters – but not HBO sci-fi series Westworld.

Instead, in keeping with its own plot and sense of ambition, the series spent an awfully long time creating a perfect synthetic version of a human, using the latest digital trickery to de-age 78-year-old star Anthony Hopkins into a 40-years-younger version of his character Robert Ford for a scene in episode three.

As you can see, the finished product was rather impressive, and actually pretty close to how Hopkins looked 40 years ago, based on this picture (below right) from 1978 film Magic. We’d almost believe that we were looking at an earlier version of cowboy theme park Westworld, back before the robot hosts got all existential and murder-y.

But how did the crew pull it off? Well, luckily for us, visual effects supervisor Nick Worth has been chatting about the de-ageing, which apparently used a mix of CGI and live-action filming.

"We took a scan of Sir Tony and used that as our base," Worth told Thrillist, "and then used a ton of photography and reference to figure out what we wanted him to look like. I think it ended up turning out really, really incredible."

Swedish virtual effects studio Important Looking Pirates were behind the CGI, placing Hopkins’ scan on the body of a stand-in actor and creating the youthful-looking young gun we saw in this week’s episode.

But that wasn’t the end of it, with Worth also explaining that the reason young Ford doesn’t look exactly like young Hopkins (he’s a bit more wrinkled) was to do with the actor’s reputation in the US.

"America doesn't really remember Sir Tony before Silence of the Lambs,” Worth said.

“Obviously we found every reference we could from every movie and every photo and everything from the correct timeframe. But it really came down to what feels most like our character in the past, as much as anything."

Still, we’re sure Hopkins doesn’t mind the added wrinkles too much. After all, if he plays his cards right, these new techniques could be just what he needs to bag the role in a Hannibal Lecter prequel.

Westworld continues on Sky Atlantic on Tuesdays at 9:00pm