By the standards of Peter Jackson’s “Hobbit” series—not, by any stretch of the imagination, the equal of his “Lord of the Rings” trilogy—“The Battle of the Five Armies” isn’t bad. In fact, it’s the best of the lot, provided that you don’t mind watching roughly two hours of sustained CGI battle scenes (including a few one-on-one confrontations tossed in for variety’s sake) without much else to intrude on the mayhem. Despite the frenetic action, it’s actually easier on the eye than the previous installments, the first of which suffered from the still-imperfect 48-frames-per-second 3D format.

The movie picks up exactly where “The Desolation of Smaug” left off, with the dragon attacking the human-populated Laketown, whose buildings are incinerated or crushed while the residents attempt to flee, at times successfully. Only bowman Bard (Luke Evans) chooses to try to bring the beast down, assisted by his equally courageous son Bain (John Bell). Meanwhile the band of dwarves led by Prince Thorin (Richard Armitage) have taken possession of Smaug’s treasure within the Lonely Mountain that dominates the kingdom of Erebor, and Thorin, increasingly possessed by the greed the gold induces, grows despotic, refusing to share the hoard with anyone and demanding that his fellow dwarves find the much-desired Arkinstone. His personality change distresses peaceable Bilbo Baggins (Martin Freeman), the hobbit who’s accompanied the dwarves at the behest of Gandalf (Ian McKellen), and has in fact discovered the stone, though he keeps it to himself.

Soon elf king Thranduil (Lee Pace) shows up with his army to demand that Thorin hand over some jewels that are part of Smaug’s trove. Bard tries to mediate, but much to Bilbo’s unease Thorin refuses any compromise. The forces of Thranduil and Bard prepare to assault the mountain fortress, but Gandalf, freed from captivity through the intervention of Galadriel (Cate Blanchett) and Saruman (Christopher Lee), arrives to warn of the approach of a huge orc army led by Azog (Manu Bennett) that they must face together. The engagement is further swelled by a dwarf host led by Dain (Billy Connolly), and eventually by a flying squadron of Great Eagles led by Radagast (Sylvester McCoy).

While all this tumult is going on, Thorin must overcome his lust for power to join the fray, while the romantic triangle involving elf bowman Legolas (Orlando Bloom), lovely Tauriel (Evangeline Lilly) and dwarf Kili (Aidan Turner) will be decided as the three engage in combat against some brutish orcs. And, of course, the narrative must be taken to the point where it can act as a springboard to the “Rings” trilogy, while Bilbo’s return to the shire has to be added as a genial postscript, which allows for the brief return of Ian Holm as his older self, always an ingratiating sight.

It will aid your enjoyment of “The Battle of Five Armies,” of course, if you recognize all the curious characters named above and understand their relationships and past encounters. But even if you don’t, the movie still can entertain with its virtually non-stop action set-pieces, which are meticulously choreographed and rendered with Jackson’s customarily exquisite CGI work, though they do tend to go on to the point of near-exhaustion, especially since the addition of one new contingent after another can grow wearisome. One can also appreciate the sweetness of Freeman’s performance , and some might find Armitage’s stentorian Thorin impressive, though there’s more than a hint of low-grade Shakespeare in his ravings. A few might even be amused by Ryan Gage’s sniveling Alfrid, the erstwhile aide to Laketown’s mayor (Stephen Fry, in what amounts to a cameo), although most will probably find his antics more grating than funny. Otherwise the actors—even the hammy McKellen—play second fiddle to the visuals.

But they are marvelous visuals, done up in the cutting-edge technology for which Jackson has become famous (or infamous, if you dislike such razzmatazz). His special-effects team have worked their usual wonders, from the fire-breathing Smaug to the many varieties of grotesque orcs, and there are some stunning scenes of massed elf archers and the Lakeside city ablaze. And this time around, the images are unaffected by the problems the craftsmen faced in the first “Hobbit” entry, where the high-frame rate 3D gave extra clarity to the bigger scenes but otherwise resulted in an artificial, plastic look. Here virtually everything is crisp and clear, although there are a few instances in which the computer-generated simulacra of real actors fashioned for stunts no human could manage look like the CGI creations they are. (That’s particularly evident in the culminating fight scene for Bloom’s Legolas, though the actor certainly isn’t at fault.) For the most part, though, Andrew Lesnie’s cinematography is top-drawer, and editor Jabez Olssen is to be congratulated for bringing in the picture at 144 minutes—relatively short when compared to the earlier, more meandering and digressive, installments. Once again Howard Shore contributes a score that complements the action sequences while making use of some pleasantly scaled-down melodies in the relatively rare intimate moments.

All told, “The Battle of the Five Armies” represents the pinnacle of Jackson’s “Hobbit” trilogy, even though it still can’t match any of the three “Lord of the Rings” installments. Nevertheless that’s a better outcome than George Lucas’ second “Star Wars” trilogy managed.