“If you must blink, do it now.” Kubo opens with a flourish of storytelling bravado: a pledge to the audience to expect something special and an exhortation to active engagement.

Not all storytellers could make good such a pledge, but young Kubo, a street performer whose act combines drama, music and a sort of magical puppetry, is one who can — and so are the makers of this mostly exhilarating movie. Kubo is so strange and constantly inventive that it demands your full attention. If you want mindless entertainment, try The Secret Life of Pets.

We learn early on, though, that Kubo’s stories tend to lack something: In the end, he often leaves his audience hanging, unsatisfied. Even Kubo (14-year-old Art Parkinson from Game of Thrones) admits that while he’s “pretty good at telling” stories, he’s “not so good at ending them.” This, too, applies to the filmmakers, alas.

Kubo and the Two Strings comes close to being a masterpiece — and one of the two best American animated films in years, the other being Pixar’s Inside Out. Kubo thrilled, dazzled and delighted me, brought tears to my eyes and broke my heart — in the end, not entirely in a good way, but let’s start with the good.

Kubo is the latest from Laika, an American animation house specializing in stop-motion animation, particularly in creepy or macabre animated films. Laika did contract work for Tim Burton’s weirdly compelling Corpse Bride, but its own first feature film was the darkly brilliant Coraline, directed by Henry Selick (The Nightmare Before Christmas) from a story by Neil Gaiman.

The next two films, ParaNorman and The Boxtrolls, were no less lovingly crafted, but, to me, increasingly disappointing. Each new release had less humanity and cleverness than the ones before, and progressively succumbed to a rigid template of misunderstood monsters, disappointing parents and unlikable people acting cruelly out of fear.

Kubo largely breaks out of this rut, in part by abandoning the horror kitsch milieu and seeking inspiration in a wholly new direction. Set in a mythic ancient Japan, it’s a colorful, swashbuckling folk tale that celebrates sweeping landscapes, music, storytelling, origami, martial arts, bushido (the samurai ethic), filial piety and parental sacrifice. There is also sashimi. I’m so there.

Laika president and CEO Travis Knight, a lead animator on prior projects, fills his directorial debut with wondrous, visionary images, beginning with the breathtaking prologue, in which a lone woman in a small boat at night faces down an immense tsunami armed only with a shamisen, or traditional Japanese lute. Tsunamis or tidal waves aren’t really tidal in nature, but for the purposes of this story, it’s no coincidence that a baleful full moon stares down at her from the night sky.

Laika goes a long way here toward redressing its history of lackluster parents. Kubo’s mother, we gather, went to heroic lengths to save Kubo as an infant from supernatural enemies, though it has taken a toll on her: She is withdrawn and seems confused, and Kubo tenderly cares for her as she once did for him. (A stray grain of rice on her chin as Kubo feeds her, which he plucks with chopsticks and places in her mouth, is typical of Laika’s attention to incidental detail.)

Sometimes, though, she rouses herself and regales Kubo with stories of the heroism of his samurai father, whom she says died defending them from monsters. Of course Kubo, who wears his father’s robe but hasn’t yet grown into it, wants to know what his father was like. “He was just like you,” she tells him. “Strong, clever, funny — and so handsome!”

Kubo is strong, clever and funny, but like any boy, he makes mistakes — and, when you’re being hunted by mystical enemies, mistakes can prove disastrous. Loneliness for his father leads him to break one of his mother’s rules, with fateful consequences.

Kubo finds himself far from home, in the “Far Lands,” with a stern protector who is named Monkey, and is one. Soon they are joined by a stouthearted, not-too-bright giant beetle, likewise named Beetle. Monkey is voiced by a no-nonsense Charlize Theron, while all necessary nonsense is supplied by Matthew McConaughey’s Beetle. “If you’re Monkey … and I’m Beetle … why isn’t he Boy?” is typical of the things Beetle says. (There’s more than a little of The Tick in Beetle.)

In a distinct echo of Coraline, in which an evil creature steals children’s eyes and replaces them with buttons, Kubo’s enemies have already taken one of his eyes — a hank of emo hair on the left side of his face covers an eyepatch — and they want the other one. There’s also a Coraline-like scavenger hunt for relics of an absent character, in this case the missing pieces of Kubo’s father’s armor, said to have special powers that can protect him from his enemies.

Despite these ties to Coraline, Laika’s creepy vibe is at a low ebb. There are a pair of spooky witch-like antagonists and a battle with a giant skeleton, but probably less nightmare potential than in earlier films. (Well, there’s also a dragon-like creature. Oh, and these scary-eye things that stare into your soul ...)

Elements of Japanese spirituality run through the film. The villagers whom Kubo entertains with his stories light paper lanterns at the graves of their ancestors and then set them adrift on a nearby river to guide their souls to the Pure Land (a reference to Pure Land Buddhism).

Kubo tries praying to his father’s spirit for guidance, but is disappointed not to feel the sense of closeness others seem to have with their loved ones. Religious experience is like that sometimes. Or perhaps there’s another reason.

There are also vaguer reflections on death and immorality — when we die we don’t cease to exist: We “shift” and “transform”; our “story continues in another place. The end of one story is really just the beginning of another.” Then there’s the immortality of memory, passed down in stories. The importance of memory, of its preservation and its loss, is a key theme.

For much of its running time, Kubo wouldn’t compare unfavorably to a Ghibli film. In fact, some plot elements invite favorable comparison to a 2013 Ghibli film with which I had notable problems: The Tale of Princess Kaguya, co-written and directed by Ghibli co-founder Isao Takahata.

The mythology of Princess Kaguya includes a race of celestial beings who live on the moon, a divine realm free of sorrow and grief, but also of love and compassion. One such being comes to Earth and forms human attachments, but, eventually, her people come for her, and, against her will, her human memories are taken away, and she returns to the heartless serenity of her people.

Like Kaguya, Kubo is a tale of gods and monsters, which in many of the world’s mythologies may amount to the same thing. The film rejects an inhuman sort of immortal beatitude — “cold and hard and perfect” — very different from perfection or beatitude in Christian belief.

Sometimes, partway through a new movie you’re starting to love, you may find yourself silently pleading, “Please don’t mess it up. Please don’t mess it up.” Well, guess what.

In the finale comes a misstep so spectacularly wrongheaded it essentially derails the movie.

First comes the battle with the dragon-like creature — actually a giant centipede, a creature I now learn is associated with evil spirits in Japanese mythology. (Dragons are not, so I’m glad to learn the centipede thing.) There’s an overly didactic, rationalistic line about departed loved ones that leans too heavily on the idea of memory to the exclusion of continuing presence.

This is trivial, though, compared to the coup de grace: an attempted stab at a generous, empathic redemptive ending that doubles down on the mistakes of ParaNorman in particular, and then some.

A confused character is embraced in a condescending, utterly dishonest way — emotionally dishonest and literally dishonest. Past evils aren’t forgiven or atoned for, but swept under the rug. To borrow an observation made by Evan Cogswell (Catholic Cinephile) at Arts & Faith, instead of either truth (always good) or poetic fantasy and myth (potentially valid), we get mere kindly lies to make someone feel good.

This is jarringly at odds with the way the rest of the preceding conflict has played out. It feels like the whole film was an act of discovery and exploration, crafted intuitively rather than rationally planned out, but when it was time to wrap things up, the filmmakers instinctively retreated to familiar ground.

And yet, despite the disappointing destination, I still relish the wonder and the rhythms of the journey.

There are golden wheat fields and bamboo forests. There is a refuge inside a whale carcass. There is a moment in which a character recklessly seizes a booby-trapped artifact, but what happens is the opposite of what one might expect. There is a scene in which a bird on the wing reacts to the discovery of another bird made of paper flying alongside it.

There is beauty and goodness in Kubo and the Two Strings — not unmixed or uncomplicated, but rare and worth savoring. It’s not the masterpiece it could have been, but I’m more hopeful now that someday that masterpiece might arrive.

Steven D. Greydanus is the Register’s film critic and creator of Decent Films.
He is a permanent deacon in the Archdiocese of Newark, New Jersey.

Follow him on Twitter.

Caveat Spectator: Fantasy action violence, menace and scary images; thematic elements involving family and religious ideas. Too intense for sensitive kids.

Note: This review originally incorrectly identified the giant centipede monster as a dragon, objecting to an evil dragon in an Asian mythological context. I regret the error. — SDG