Panos Cosmatos follows up "Beyond the Black Rainbow" with another psychedelic genre experiment that seems to emerge from another dimension.

Even before Nicolas Cage does a line of coke off a shard of broken glass in “Mandy,” the movie is batshit crazy. Panos Cosmatos’ followup to his wacky debut, “Beyond the Black Rainbow,” is another stunning dose of psychedelia and derangement, this one folded into the constraints of a woodsy revenge thriller, but that’s mainly an excuse for Cage to unleash his most psychotic extremes. Cosmatos gives him plenty of opportunities in this hypnotic midnight movie, which veers from astonishing, expressionistic exchanges to gory mayhem without an iota of compromise.

A glimmering font establishes the rural setting as “1983, A.D.,” and it may as well be a forgotten relic of eighties B-movie excess, funneled through Cosmatos’ own creative indulgences. The grainy 16mm imagery, a vibrant mixture of neon hues and shadows set to Johan Johansson’s disorienting score, suggests a gothic fantasy unfolding within the confines of a heavy-metal poster. Cage, whose motif of late has been a self-serious approach to outrageous material, fits right in as bearded logger Red Miller, who leads an idyllic life in the middle of nowhere with artist wife Mandy (Andrea Riseborough). They lead comfortable, unhurried lives, but strange transitions and disjunctive sound design make it clear that a sinister force lurks somewhere beneath the surface.

“Mandy” wastes no time turning up the crazy. Into this solitary milieu comes a deranged religious sect known as the Black Skulls, a Jim Jones/Manson family hybrid lorded over by the telekinetic Jeremiah Sand (Linus Roach), whose lackey Brother Swan (Ned Dennehy) summons a set of demonic leather-clad bikers in the dead of night. With their help, the group bursts into the couple’s home, and as Jeremiah confronts Mandy in a disturbing attempt at hypnotic seduction bathed in neon red light, the movie merges with the psychedelic lunacy of its villains. It’s a shocking, expressionistic variation on the home invasion tropes cemented by “The Last House on the Left,” until Cage gets free and begins his path to vengeance. Then it’s essentially “Mad Max” for the Iron Maiden set.

Needless to say, mileage will vary, but the movie’s stylistic overload often pushes it beyond the constraints of the various formulas its narrative brings to mind. A key to the movie’s avant-garde intentions emerge with a peculiar epigraph: “When I die, bury me deep, lay two speakers at my feet, put some headphones in my head and rock ’n’ roll me when I’m dead.” A little internet research reveals the stanza as the last words of Douglas Roberts, who was executed in Texas for killing a man in a drug-induced haze, and “Mandy” essentially hovers in that mindset — evoking what it feels like to descend into pure lunacy with light and color.

At the center of this trippy ride, Cage looks both shocked and in tune with the movie’s loopy intentions. In one brief moment, he comes out of the haze to grapple with the horrors he’s experienced, describing the events as “crazy evil!” and complaining that his encounter with the Black Skulls “didn’t make any sense!” That’s about as close as “Mandy” gets to a reality check.

Mostly, though, the actor just goes wild. Bearded and blooded, he throws every fiber of his screen presence into a scene that calls for the character to guzzle vodka, yell to the wind, and repeat. Fans of Cage’s recent spate of grindhouse-grade performances will find his most delightfully unhinged turn since “Bad Lieutenant: Port of Call New Orleans,” though the screenplay (credited to Cosmatos and Aaron Stewart-Ahn) falls short of giving the character much depth. (Told “You’ll probably die” by a local when planning his revenge, Red scoffs, “Don’t be negative.”)

The title card lands like an exclamation point some 80 minutes into this two-hour ride, at which point the movie limps through a less-inspired third act. But there’s still plenty to enjoy about watching forge his own sword and engage in chainsaw duels before howling “I am your god now!” as the gore reaches peak insanity. As he continues on his way, Cosmatos pulls back to reveal a painterly image that implies the entire movie has taken place in another dimension. Indeed, it seems to commune and sympathize with Cage’s over-the-top brand while speaking its language. For years, the actor has swung wildly in search of gonzo material; at long last, he’s found a movie willing to match his crazed intentions.

Grade: B+

“Mandy” premiered in the Midnight section of the 2018 Sundance Film Festival. It is currently seeking U.S. distribution.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.