Hugo might not have been Martin Scorsese’s most successful film—it failed to crack $75 million domestically and just barely made back its estimated budget once its overseas box office was added in—but it won over critics and the Academy, earning 11 Oscar nominations (and winning five of them) in 2012. You probably know it’s based on Brian Selznick's bestselling book The Invention of Hugo Cabret ... but did you know these 11 facts?

1. MARTIN SCORSESE WASN’T ALWAYS GOING TO DIRECT.

Producer Graham King snapped up the rights to Brian Selznick’s original book before it was even published, and Martin Scorsese came on as director very soon after that. At one point, however, he left Hugo and was replaced by Ice Age director Chris Wedge, who would have made it his live-action debut. Luckily (though perhaps not for Wedge), Scorsese was able to re-join the project. 

2. THERE ARE CAMEOS APLENTY.

Paramount Pictures

Martin Scorsese’s Hugo cameo is pretty recognizable: In a not-exactly-surprising turn of events, the director plays the photographer who takes a picture of young Georges Méliès outside his studio. Brian Selznick got in on the action as well, playing an unnamed party guest/Méliès enthusiast near the end of the film. A bit more out of left field is the cameo given to Michael Pitt, who starred in the Scorsese-produced Boardwalk Empire, who can be seen briefly as a projectionist. Ben Kingsley’s son Edmund pops up as well, playing a camera technician who works alongside Kingsley’s Méliès.

3. HISTORICAL FIGURES GOT IN ON THE CAMEO ACTION, TOO.

Paramount Pictures

Some historical figures get cameos, too: Jazz guitarist Django Reinhardt (played by Emil Lager) can be briefly glimpsed playing at a café to an audience that includes Salvador Dalí (Ben Addis) and James Joyce (Robert Gill).

4. MUCH OF WHAT THE MOVIE SAYS ABOUT MÉLIÈS IS TRUE.

Paramount Pictures

Though the character of Hugo Cabret himself is a complete fiction, much of what’s presented in the film about film pioneer Georges Méliès is real: He was originally a magician, he did work at a toy store after his film career fell apart, he was rediscovered late in life and celebrated by a new generation, and he did own a collection of automata, which he eventually donated to a museum when he could no longer afford to maintain them. 

5. A CHILDREN’S BOOK AUTHOR WAS SELZNICK’S ORIGINAL MÉLIÈS.

Ben Kingsley was the second person to provide the visual look for Hugo’s version of Georges Méliès. For the original book, Brian Selznick’s inspiration was children’s book author and illustrator Remy Charlip, a friend of Selznick’s who reminded Selznick of Méliès and agreed to pose for him.

6. SELZNICK’S ILLUSTRATIONS WERE USED AS STORYBOARDS.

Paramount Pictures

Though, aside from the aforementioned cameo, Selznick had no direct involvement in the making of Hugo, Scorsese and his team did use the author's illustrations—which comprise a good chunk of The Invention of Hugo Cabret’s bulky 500-plus-page length—as storyboards. “The camera is doing what my pictures are doing,” Selznick said. “At the beginning of the movie when the camera swoops through the train station up to the clock face with Hugo looking at the number—I drew all that!”

7. THE AUTOMATON REALLY WORKS.

Paramount Pictures

The automaton in the movie that Hugo’s so determined to repair actually does draw the famous image from Georges Méliès’ A Trip to the Moon … with a couple of caveats. For one, the machine branches out from its clockwork roots to use, according to Hugo’s automaton manufacturer Dick George, "a computer-controlled system that drives the mechanism under the table, but the hand is connected to the mechanism via a series of magnets.” Also, drawing the piece takes 46 to 47 minutes. “Obviously, it is impractical for them to film the whole drawing sequence, purely and simply because that would be two-thirds of the length of the film, and the audience would be asleep,” says George. “But in reality, it does draw the whole drawing from start to finish.” 

8. THE AUTOMATON WAS INSPIRED BY A REAL-LIFE COUNTERPART.

The look of Hugo’s automaton was inspired by “the writer,” one of three automata built by 18th-century Swiss watchmaker Pierre Jaquet-Droz, his son Henri-Louis Droz, and Jean-Frédéric Leschot. “The writer” and his brother and sister—”the draftsman” and “the musician”—are currently on display at the Musée d’Art et d’Histoire in Neuchâtel, Switzerland. 

9. HUGO’S AUTHOR IS RELATED TO HOLLYWOOD ROYALTY.

The first film Martin Scorsese ever saw was Duel in the Sun, a 1946 western produced by Hollywood titan David O. Selznick (King Kong, Gone with the Wind), who happens to be a cousin of Brian Selznick’s grandfather.

10. THE FILM HAS A HARRY POTTER CONNECTION.

PantagesTheatre, YouTube

Paul Kieve served as the “magic consultant and instructor” on Hugo, teaching Ben Kingsley and Asa Butterfield how to perform the magic tricks required of their characters. Kieve was also the “only actual magician to ever work on the set of a Harry Potter film," according to The Telegraph; the self-folding Marauder’s Map in 2004's Harry Potter and the Prisoner of Azkaban is one of Kieve's contributions to the franchise.

11. ONE MUSICAL NUMBER IS BY ANOTHER FILM PIONEER.

There’s a bit of meta going on with the soundtrack: One scene is scored to “Danse Macabre,” which is the work of Camille Saint-Saëns, the first composer “with a significant reputation“ to ever compose a film score (for 1908’s The Assassination of the Duke de Guise).

All images courtesy of Getty unless noted otherwise