The mid-1990s were filled with low-budget, often direct-to-video films that embodied what at that time was a particularly ubiquitous strain of bad movie: macho, flamboyant action movies studded with has-beens, and worshipping at the altar of Quentin Tarantino. The defining feature of this strange, sad subsection of would-be cult movies was feverish audacity. The filmmakers invariably set out to make the most awesome B-movie ever: They didn’t just want to make movies that undiscriminating video-store customers would enjoy once the studio movies had all been rented, they wanted to make fans’ favorite movie. Each aspect of these films demanded specific attention. Every entrance screamed that viewers were privy to the introduction of a surefire legend, a character destined to go down in history alongside Darth Vader and James Bond and George Bailey.

It seems unfair to lump in Paul Thomas Anderson’s 1997 breakthrough Boogie Nights with this disreputable crop of overconfident, underachieving knockoffs. But Boogie Nights shares with these lesser non-entities a confidence that often veers into cockiness, a youthful energy that’s partly attributable to the director’s own youth, and an obsession with introductions. Boogie Nights is a film of loving intros. It isn’t just the major characters being unveiled with a flamboyance and sense of showmanship that broadcasts that they’re embarking upon a great adventure; seemingly every character with a speaking role is brought through the door as if they’re so fascinating, it’s almost a shame the movie isn’t just about them. Anderson gives character actors like Philip Baker Hall, Philip Seymour Hoffman, and Robert Ridgeley, all of whom most people wouldn’t recognize if they started peeing on the audience’s legs, the kind of introductions Sergio Leone gave Clint Eastwood.

Here, it works. Anderson acts as if his actors are playing roles so important that they’ll cast long shadows over their entire careers, that they’ll forever be associated with the movie. And he’s right. When Hoffman died earlier this year, one of the first movies that sprung to most mourners’ minds was Boogie Nights, despite the smallness of his role in that film. He isn’t introduced until 40 minutes in, and he has maybe 10 minutes of screen time, yet he makes such an indelible impression that despite his astonishing and diverse body of work, it’s hard to think of him and not think of poor, lustful Scotty, desperately trying to maintain his composure while in the presence of Dirk Diggler.

There’s a lovely symmetry to Boogie Nights, a film whose Herculean ambition is matched by an equally impressive level of achievement. Anderson was only 26 when he made the film, not much older than protagonist Eddie Adams (Mark Wahlberg, in the role that freed him from a lifetime of being a walking punchline), a dishwashing fuck-up in 1977 with two great gifts: a freakishly enormous penis, and no inhibition about showing it on camera. Though soon reborn as porn star Dirk Diggler, he’s also blessed with a sense of innocence that initially renders him a babe in the sinful woods. Yet as dark as his journey gets, he never seems beyond redemption.

Boogie Nights was unique and refreshing in its non-judgmental treatment of sex, drugs, and pornography. It has the audacity to postulate that, despite what conventional wisdom dictated, disco music was actually fun, just like the fashions of the time. So were the drugs and the sex, at least until they became the opposite of fun. Boogie Nights is a tremendously seductive experience, a lush celebration of California sunshine, barely clad human flesh, and voyeurism in all its forms. It feels fully realized down to a molecular level, having seemingly been storyboarded, rehearsed, and finessed to a state of perfection by a boy genius assisted by one of the finest casts ever assembled for a single film. (And I’m including all of the Expendables and Fast & Furious sequels in that statement.) Part of what distinguishes Boogie Nights is its unabashed affection for its characters, its ability to see through their pretensions, self-delusions, and foolishness, while at the same time adoring them. Porn mogul Jack Horner (Burt Reynolds) wants to make a pornographic film with genuine artistic merit, one that will keep audiences in their seats and emotionally engaged even after they have ejaculated. That’s more than a little absurd, and played for laughs to some degree, but Anderson also sees nobility in a hack’s desire to become an artist.

That’s another element of the film’s success: There’s no ironic distance between Anderson and his characters, or between the audience and the characters. We aren’t looking down on them, we’re right there with them, immersed in their struggles and addictions, and sharing their desire for connection, for catharsis, for a way out of their messes. The film’s dazzling, seductive style might have been what attracted audiences—though, remarkably, it wasn’t much of a box-office success at the time of its release, despite being more or less universally praised, and about as entertaining as motion pictures come—but the full-bodied emotional engagement with its characters makes Boogie Nights look better with each passing year. It’s a perfectly modulated film that strikes a tricky tonal balance between joy and despair, between exuberance and suicidal misery. It’s also difficult to overstate how much fun it is.

Boogie Nights takes audiences on a spellbinding journey from innocence to experience to degradation, and then to a place of catharsis and renewal. Magnolia, Anderson’s 1999 follow-up, begins in a place where many films end: in a state of bone-deep exhaustion, with its gallery of Los Angeles lost souls feeling defeated and emotionally strip-mined to the point where they don’t seem like they can go on for one more cursed minute. It’s one thing for a film to travel steadily to a place of wrung-out exhaustion after an extended journey. It’s another for it to begin there. Boogie Nights ratchets up the shredded-nerve intensity to John Cassavetes levels gradually and deliberately. Magnolia more or less begins there. It’s a film of purposeful and often brave excess, one that makes a core virtue of going too far, of pushing scenes and moments past their breaking point. Boogie Nights is perfect. Magnolia is ragingly, deliberately imperfect, a raw and ragged film that’s all the more powerful for its visible seams.

Following Boogie Nights, the universe wrote Anderson a blank check. The director was promised complete creative control by New Line producer Michael De Luca, and seemed to understand that he would never be this free again. While still in his 20s, he was in a place where he could get Tom Cruise, arguably the biggest, most image-conscious movie star in the world at the time, to not only appear as part of a sprawling ensemble, but also to play one of the most morally repulsive characters in recent history: Frank T.J. Mackey, self-styled master seducer and the proponent of the “Seduce And Destroy” system.

There’s a terrifying emptiness at the core of Cruise’s performance as Mackey; it’s as close as he would come to playing Patrick Bateman. Strutting around the stage like a peacock while pathetically spouting locker-room bravado as a revolutionary philosophy of male empowerment, Mackey seems like a man who has so cut himself off from any emotion other than rage that he’s reduced to impersonating a human being. There’s a deadness behind his eyes that suggests there’s no “there” there, that he’s an empty husk who can’t even bring himself to believe the misogynistic horseshit he’s spouting. It’s a performance that makes the swaggering movie-star charisma at the core of Cruise’s persona seem monstrous, sadistic, and self-deceiving. He’s Top Gun’s Maverick as a destroyer of souls, the all-American boy as a sociopathic woman-hater. In an interview with a female journalist to promote his work, Mackey stays as relentlessly on-message as a politician. When the interrogator unmasks the faintest hint of humanity in Mackey—his tortured relationship with a dead mother he couldn’t save and a dying father he can’t forgive—his torturously constructed façade of frat-boy bonhomie gives way to unconcealed rage. He’s rigid in way that suggests he will break before he will bend.

But more than anything, Mackey is alone. In a film full of people who are lost, lonely, and quivering with a murderous desire for love, Mackey might be the most lost and the most alone, because he’s deluded himself into believing he has a system that gives order to an insane and unknowable world.

At the core of Mackey’s rage is his tortured relationship with his father, Earl Partridge (Jason Robards), a wealthy, philandering TV mogul raging against the dying of the light from his deathbed, as he rummages through a lifetime of regrets and tries to make sense of his life to his kindly attendant, Phil (Hoffman). Earl is the film’s King Lear figure, a towering patriarch played by a legend of the American stage and screen in what turned out to be his final performance. But it’s a testament to the film’s astonishing ambition and audacity that he’s one of two King Lear figures trying to find meaning and forgiveness as death’s shadow approaches.

The film’s other Lear is Jimmy Gator (Philip Baker Hall), the host of a kiddie game show called What Do Kids Know?, whose title takes on ominous connotations in light of the revelation that Jimmy might have molested his now-adult daughter Claudia (Melora Walters) when she was a child. Gator is an Art Linkletter/Bob Barker figure of genial middle-American fun, a guy who habitually addresses his audience as “Ladies and germs.” But because this is Magnolia, Gator is also a figure of infinite sadness and melancholy, only slightly more together than the drunken, paranoid Richard Nixon in exile Hall played in Secret Honor.

Jimmy and Earl each have children who despise them with an intensity that will seemingly never abate, even after they die. Claudia, a quivering assemblage of raw nerves, paranoia, and aching vulnerability, snorts cocaine and strikes up a cautious romance with sweet-natured cop Jim Kurring (John C. Reilly), an old-fashioned man whose gentleness and kindness render him, like Phil, a ray of light in a murky, perpetually stormy world. He’s conclusive proof that goodness and light exist, an assurance that’s desperately needed in a film this unrelentingly bleak.

Magnolia is fundamentally about people trying to make peace with the traumas of their pasts. William H. Macy, one of many holdovers from Boogie Nights, plays “Quiz Kid” Donnie Smith, a long-ago champion of What Do Kids Know?, as a tragically stunted figure who remains stuck emotionally, and sartorially, at the age of his greatest triumph. Donnie’s trauma is in a past that—like the pasts of Earl, Jimmy, Claudia, and seemingly everyone else in the film’s dense circle of pain—feels as real and important as the present, if not more so. They’re all so busy shadowboxing the past that they can barely muster up the energy to live.

Magnolia begins with its intensity level at 10 and somehow manages to sustain a tone of bruising melodrama for more than three hours. It doesn’t seduce viewers like Boogie Nights, it overwhelms them. Its raw, cathartic power lies in its unapologetic excess. I rewatch Boogie Nights fairly regularly because it’s so much fun, but I will really need to brace myself emotionally to rewatch Magnolia again, and not just because Robards and Hoffman’s real-world deaths lend additional power to scenes that were already devastating.

With Magnolia, Anderson takes the kind of chances that only those with a reputation for genius can get away with. If Anderson wants to take his film to a transcendent, delicate emotional place reachable only through music, then, dammit, he’s going to have his cast take turns singing along to “Wise Up,” one of several Aimee Mann songs that go a long way toward tying together a film that actively defies attempts at cohesion.

If this scene didn’t work, it would be laughable. But Magnolia couldn’t have been made by a man unsure of his vision and choices. The entire film represents a massive leap of faith. Anderson believes in himself and his material enough to do things that could easily be derided, like a climax where a biblical rain of frogs adds an element of Old Testament prophecy to a film that already felt crazy and extreme.

Magnolia posits pain and the desperate yearning for meaning as the connective tissue uniting all humanity. In the years to come, this gave rise to an entire subsection of tremblingly earnest ensemble melodramas about the randomness and connectivity of human existence. Like the wave of audacious Tarantino knockoffs that Boogie Nights towered over, these films almost invariably aspired to greatness and profound social significance, and almost invariably failed. But before all that, a director with all the confidence and talent in the world made the notion that we are all connected into a basis for great, wrenching, timeless art.