For all the millions of dollars spent on digital astonishments in “Men in Black 3,” the film’s most remarkable special effect is an analog one. It’s the carbon-based Josh Brolin, who plays a younger version of Tommy Lee Jones’s Agent K with an uncanny replication of the older actor’s bearing and vocal mannerisms. Brolin’s performance is funny, masterful, confident, and more than a little unsettling. If one human being can sample another, that’s what’s going on here.
The rest of “Men in Black 3” is about as good as one could hope for from an unnecessary sequel that’s a decade late to the party. The film’s opening act is a painful forced march that reintroduces the main characters — alien-containment agents K (Jones) and J (Will Smith) — and struggles to recapture the tone of deadpan action-comedy that made the original 1997 “Men in Black” a blockbuster charm (and the lack of which made 2002’s “Men in Black 2” instantly forgettable).
There’s a cumbersome plot to set up, about a rampaging alien baddie named Boris the Animal (Jemaine Clement of “Flight of the Conchords” under heavy latex and screw-in goggles) who escapes to the past and kills off his nemesis K, forcing J to go further back in time to save the day. There are old jokes about celebrity aliens and brain-wiping neuralyzers, dusted off but not made fresh. Worse, there’s a thankless appearance by Emma Thompson as agency chief O, shrieking like an alien fish.
Once Smith time-trips back to 1969, though — he has to leap off the Chrysler building in a sequence that’s a triumph of Looney Tunes action silliness — “Men in Black 3” picks up and becomes deft, absurdist entertainment. The script (credited to Etan Cohen with a lot of other hands in the batter) doesn’t bother with culture-clash gags à la the current “Dark Shadows.” One of the few times the movie stoops to play with the time period is when J and his newly young partner pay a visit to the Warhol Factory, where the vibe seems more Summer of Love than Downtown Hipster and where we learn a few surprising things about Andy (Bill Hader).
The story line, too, feels pro forma — a mad scramble through Coney Island, Shea Stadium, Cape Canaveral, and other landmarks as the agents chase Boris (both his 1969 and 2012 incarnations) while trying to get a MacGuffin atop the NASA rocket heading for the moon. Director Barry Sonnenfeld, returning to the series for the third time, keeps it as loose and rubbery as he can, and his taste for exuberant wide-angle camerawork dovetails nicely with the film’s post-production conversion to 3-D. He treats the technology as the whimsical joke it is, and in sequences like that time-jump and a goofy detour to a bowling alley out of “GoodFellas,” Sonnenfeld more than rises to the occasion.
The same goes for Smith, even if he’s effectively the series’ straight man by now. A reliable pro, the star nuances the creaking dialogue, takes it manfully through a ridiculous final twist, and stands back before the two performances that make “Men in Black 3” actually worth something. One belongs to Michael Stuhlbarg (“A Serious Man,” “Hugo”) as Griffin, a scruffy, beaming alien in a parka and wool hat. Griffin’s race has the ability to see all possible futures at once — it’s like something out of a short story by Borges — and while that gift might render you or me into a lump of terrified protoplasm, Stuhlbarg plays the character as an addled saint. Every scene with Griffin is a small miracle of conceptual comedy that makes the rest of the movie seem like the hardware it is.
The other performance is Brolin’s, a feat of egolessness in which one actor completely subsumes himself into the style and sound of another. The performance works as an optical illusion: Our eye sees Brolin, but our brain is fooled into seeing Agent K and, through him, the craggy, beloved Jones made youthful again. “Men in Black 3” is essentially a bait-and-switch — a movie that promises one star and delivers another — but because the imposture is so well-crafted, so serenely inventive, we accept the bargain. As far as the studio sees it, everybody wins: Tommy Lee Jones gets a paycheck and a vacation, while the young audiences of America are spared the horror of spending 106 minutes with an old person.
Ty Burr can be reached at tburr@globe.com. Follow him on Twitter @tyburr.