Crammed with alternately bleak and raucous humor, a palpable affection for Tinseltown’s past and peccadilloes, and enough pop cultural references to fuel a thousand trivia nights, “Once Upon a Time…In Hollywood” is a moviegoer’s dream.

Here writer/director Quentin Tarantino eschews his worst tendencies (especially his almost adolescent addiction to racial name-calling) and delivers a story that despite many dark edges leaves us basking in the sunny California sunshine.

Each scene has been exquisitely crafted with every element — art direction, costuming, cinematography, editing, acting — meshing in near perfection.

In the process Tarantino rewrites history, blithely turning a real-life tragedy into a fictional affirmation of positivity. It’s enough to make a grown man cry.

The heroes (??) of this 2 1/2-hour opus are Rick Dalton (Leonardo DiCaprio), a star of TV westerns who now (the time is 1969) sees his career circling the crapper, and his stunt double, the laconic tough guy Cliff Booth (Brad Pitt), who not only steps in to perform dangerous feats on the set but serves as Rick’s best bud, Man Friday and chauffeur (Rick’s had one too man DUIs).

Tarantino’s script finds the alternately cocky and weepy Rick (DiCaprio has rarely been better) lamenting his fading status in the industry (he’s been reduced to playing villains in episodic TV) and contemplating the offer of a semi-sleazy producer (Al Pacino) to make spaghetti Westerns in Europe.

Margot Robbie as Sharon Tate

Cliff, meanwhile, picks up an underaged hitchhiker (Margaret Qualley) who takes him to one of his old haunts, the Spahn ranch, an Old West movie set now occupied by one Charles Manson and his family of hippie misfits.

Newly arrived at the home next to Rick’s on Cielo Drive is director Roman Polanski and his beautiful actress wife, Sharon Tate (Margot Robbie). Tate is a sweetheart, an all-American beauty radiating an almost angelic innocence and positivity. But we can’t help twitching in anxiety…after all, everybody knows that in ’69 she and her houseguests were the victims of a horrific murder spree by Manson’s brainwashed minions.

At its most basic level, “The Revenant” is a revenge melodrama with Leonardo DiCaprio playing a man who endures unimaginable hardships to get even.

But the latest from writer/director Alejandro Gonzalez Inarritu (“Birdman,” “Babel”) is much more than that.

This inspired-by-fact epic is one of the most richly sensory films ever made, an evocation of the American wilderness that is both beautiful and terrifying. In this world of heightened awareness every rock and limb seems etched by the hand of a master and the forests are alive with the creaking of timber. (Who knew aspens were so damn noisy?)

The primitive world evoked here is so sumptuous and scary that it threatens to overwhelm “The Revenant’s” dramatic elements.

The screenplay (by Inarritu and Mark L. Smith) is inspired by the true story of Hugh Glass (DiCaprio), a member of a fur trapping expedition who in 1823 was mauled by a bear. Expected to die of his injuries, Glass was left in the care of two companions instructed to give him a decent burial.

Except Glass wouldn’t die. His watchers, terrified of an Indian attack, abandoned him and rejoined their companions. But Glass clawed his way out of a shallow grave and with superhuman determination traveled 200 miles — first on his stomach, then on foot — to exact revenge.

(This story was filmed in 1971 as “Man in the Wilderness” with Richard Harris in the lead.)

On its most successful narrative level “The Revenant” is a survival story. Lacking food and weapons, DiCaprio’s Glass must scavenge for sustenance, sucking the marrow from the bones of a long-dead elk and scarfing raw fish and buffalo innards. He cauterizes his wounds by sprinkling gunpowder over the savaged flesh and igniting it with a burning stick.

It isn’t so much that Glass wants to live as he is determined to punish Fitzgerald (a grunting Tom Hardy), the venal fellow trapper who left him for dead.

Is “The Wolf of Wall Street” the result of some sort of show-biz wager?

It’s as if Martin Scorsese (arguably America’s greatest living filmmaker) and Leonardo DiCaprio (Scorsese’s latter-day DeNiro) accepted a challenge to make a three-hour movie that would entice us to laugh along with despicable characters – just because they thought they had the special juice to pull it off.

And there are moments when they come close.

“Wolf” is based on the memoir by Jordan Belfort, a poster boy for ‘90s stock market shenanigans, who made millions selling his customers worthless securities and ended up going to prison for his misdeeds.

Now I’m the sort of fellow who tries to find the essential humanity in just about everyone, but Belfort is the financial equivalent of Adolf Hitler and Pol Pot. He’s arrogant and greedy and virtually without conscience – capitalism at its most corrupt.

And DiCaprio and Scorsese have to sweat like stevedores to make him a palatable companion for 180 minutes.

This is a speedball of a movie that maniacally tears along from one scene of misbehavior to the next, hardly ever slowing down to contemplate just what message we’re to take away. Presumably Scorsese disapproves of Belfort and what he represents … but the film feels just the opposite. It seems a monumental celebration of greed and excess.