What is unexpected, however, is that this mash note comes in a rare outing for him: a family-friendly film based on a popular children’s book.

Set in 1930s Paris, “Hugo” concerns Hugo Cabret (Asa Butterfield, “The Wolfman”), a young boy who keeps the clocks running in a sprawling train station. Orphaned and on his own, he hopes to make a connection with his late father (Jude Law, “Contagion”) by repairing an automaton that Mr. Cabret had rescued from a museum.

That automaton is one of the film’s wonderful creations, a metal man with impassive eyes and the look of something airdropped from 1920s’ German expressionism. Hugo is determined to make the mystery figure move again, hoping it contains a secret message from dear old Dad.

Along the way, Hugo swipes mechanical parts from a cranky toyshop owner (Ben Kingsley, “Shutter Island”) who turns out to have his own intriguing connection to the automaton. The shop owner is none other than Georges Méliès, among the early masters of filmmakers. In silents such as “A Trip to the Moon,” Méliès pioneered special effects and tapped into the dreamlike spell of movies.

So does “Hugo.” In his first 3-D endeavor, Scorsese successfully employs the gimmick to illustrate how the first films astounded audiences. It is a bounty of visual richness, from its dizzying camerawork to exquisite production design. Nearly every shot boasts painterly detail.

The story doesn’t quite rise to the invention of its magnificent look. Based on Brian Selznick’s novel, “Hugo” is about 20 minutes too long and populated by archetypes — Dickensian orphan, starchy law-enforcement officer, plucky girl hungering for adventure, etc. — instead of fleshed-out characters. But even that shopworn familiarity seems fitting in the context of this tribute to reel life.

The cast is mostly game. Butterfield is fine, if underwhelming, as our hero, but receives able help from the dependable Kingsley and a radiant Chloë Grace Moretz (“Let Me In”) as Méliès’ goddaughter. Other standouts include Michael Stuhlbarg (“A Serious Man”) as an early film scholar and Sacha Baron Cohen (“Brüno”) as that cold-hearted train inspector who just needs a good hug — the same kind that Scorsese here gives to the movies.

  • or