Julianne Moore stars as an unraveling actress in “Maps to the Stars.” (Dan McFadden/Focus World)

— Sunshine is everywhere on a recent afternoon in West Hollywood. The 180-degree view from the penthouse of the Soho House lays out the city below as its mythic ideal. “Lead guitars and movie stars,” as Mick Jagger once sang. It’s easy to imagine the pretty, casually tousled young couple lounging on the balcony as having wandered out of the corner of a movie — maybe Sofia Coppola’s “Somewhere,” set at the Chateau Marmont a few blocks back on the Sunset Strip — or about to wander into their own.

Such fashionable glimpses are only surface, of course, the cosmetic sheen on a mechanism that is dark, strange and as elemental to Los Angeles as palm trees and swimming pools. So perhaps it should be no surprise to find Bruce Wagner sitting inside, neatly ensconced in a high-backed chair, contentedly tapping at an iPad. The novelist and screenwriter has for decades chronicled Los Angeles from the perspective of someone who has plenty of experience with its many characters in all their extremes.

“It’s the mother lode for a writer who’s exploring the vagaries of human behavior,” said Wagner, who cuts a striking figure with a clean-shaven head, owlish spectacles and a Dickies jumpsuit in a utilitarian shade of blue. He offers an anecdote by way of example. “I was at a crosswalk just on a regular street here and I pushed the button. There was a business card there for people to see. And it said, ‘Need publicity?’ You know? I thought, where else but Los Angeles? The idea that someone waiting to cross the street would grab that card and make a phone call. It’s quite perverted. But it’s where I was raised.”

At 60, Wagner has yet to exhaust that source, which has inspired nine books, including the 1993 sci-fi graphic novel “Wild Palms,” which became an Oliver Stone miniseries. That was two decades ago. When “Maps to the Stars,” directed by David Cronenberg from Wagner’s screenplay, opens Feb. 27, audiences will get a startlingly vivid reminder of the writer’s vision, which is at once outrageously scabrous and achingly metaphysical. The film boasts a tour-de-force performance from Julianne Moore as Havana Segrand, a high-strung and fast-fading star wrecked by the spiritual fallout left by her late actress mother. Mia Wasikowska plays a mysterious waif burn victim, who becomes Havana’s personal assistant while she cases obnoxious child star Benjie Weiss (Evan Bird) and his parents, Cristina (Olivia Williams) and Stafford Weiss (John Cusack) — Havana’s facile, guru-like celebrity psychologist.

Because of its subject matter — which often engages taboo — Wagner’s corrosive wit and the film’s gradual tilt from a kind of Hollywood hyper-reality into something far more uncanny, it already has been misunderstood by critics who have labeled the film anything from a satire to Cronenberg’s version of David Lynch’s hallucinatory “Mulholland Drive.” Not so, Wagner contends.

“I always saw it as a ghost play, a kind of fever dream,” Wagner said. “I certainly never saw it as an Altmanesque film nor did I see it as a Lynchian film, but those are the obsessions, in terms of the poles, when you write something about Hollywood as a film. ‘Sunset Boulevard’ was the closest to what we’ve done. The original script begins in a morgue with all the corpses telling how they died. I wanted to have that flavor.”

As Cronenberg observes, “When he wrote it initially there weren’t even cell phones.” The screenplay, drawn from characters in Wagner’s book “Force Majeure” (not to be confused with the 2014 Swedish film), had been around for maybe a decade before the director, who had been friends with Wagner, first saw it about 10 years ago. Though unable to produce the film then, he was compelled by the movie’s melancholy ending, and Wagner’s use of the surrealist Paul Eluard’s 1942 poem “Liberté,” a declaration of love written during the Nazi occupation of France that become symbolic of European freedom after the war.

“Every time I read it, it had the same emotional kick,” Cronenberg said. “The dialogue was incredibly sharp. It’s really funny and dark, and then it becomes really quite sad. It’s an unusual shape. I kept feeling that it had not to do, ultimately, so much with Hollywood but with the human condition, and the struggle for identity, for significance, for meaning. It kept that Greek tragedy potency every time I read it.”

Wagner is aware that he follows a few singular literary legends whose supposedly unfilmable novels were adapted into some of Cronenberg’s bravest efforts. “There’s Ballard and Burroughs and DeLillo; I’m a little out of depth with those people,” he said, alluding to the films “Crash,” “Naked Lunch” and “Cosmopolis.” He felt confident, however, that “Maps to the Stars” synchronized with the director’s own obsessions.

“Much as in ‘The Fly,’ it felt as if David and I got into the same pod together and our DNA commingled,” Wagner said, ticking off various elements in the film that resonated strongest between them. “There’s incest, which is a form of mutilation, mutilated love really; there’s literal mutilation in terms of fire; there’s the monomaniacal cult-like behavior that John Cusack’s character demonstrates that is often in a lot of David’s films — these ruined patriarchs who have these cosmologies or theosophies.”

He also found a creative partner willing to put things onscreen that might explode the brain of a Hollywood movie executive, like a victim of one of the mutants in Cronenberg’s “Scanners.” “That scene we shot of a menage a trois? Everyone was startled that there was full-frontal nudity on the male actor. The toilet scene? One of the actresses we were strongly considering, that was her Waterloo. She couldn’t get past that scene,” he said. What Wagner calls one of the most outrageous scenes in the film shows nothing more graphic than Havana’s selfish glee over an unimaginable tragedy that promotes her career, as she sings a cruel chorus of “Na Na Hey Hey Kiss Him Goodbye.” Cronenberg, Wagner says, “gets into an excitation by showing things that are true and yet the worst parts of human behavior.”

But Wagner doesn’t want to dwell only in the darkness.

“There has to be light,” he says. “You have to create a broken vessel for light to get in. I never had any desire to be king of the hill of those who take a s--- on Hollywood. Hollywood is a laboratory of human behavior, like anywhere, but it’s where I’m from.”

Dollar is a freelance writer.

Maps to the Stars Opening Feb. 27 at West End Cinema. Also available On Demand and through iTunes. Rated R for strong disturbing violence and sexual content, graphic nudity, language and some drug material.