Ben Stiller directs and stars in a comedy about actors playing soldiers who accidentally get caught up in a real war. The movie is already raising controversy for Robert Downey Jr.’s black-face performance.

It’s fitting that the summer of Robert Downey Jr. end with the formerly troubled thespian playing an actor named Lazarus. Downey has indeed risen from the dead, transcending his cocaine-fueled run-ins with the law by delivering stellar work of late in everything from the criminally ignored “Charlie Bartlett” to his pedal to the metal superheroics in “Iron Man.”

Yet it’s his mesmerizing work in Ben Stiller’s “Tropic Thunder,” a raucous send up of filmdom in general and war movies in particular, that best showcases his genius in creating indelible characters.

As egocentric Aussie act-tor Kirk Lazarus, a five-time Oscar-winner who sounds an awful lot like Russell Crowe, Downey knows no bounds in his lacerations of self-important stars can’t live without the knowledge that members of the Academy really, really love them.

He most ruthlessly satirizes the philosophy of method acting in which stars become the character they’re playing, even off camera. Stars like Lazarus, who has his skin surgically dyed so he can play a black sergeant in a bloated, big-budget Vietnam War epic called “Tropic Thunder.”

Not only does Downey do black, he does it well, creating yards of subtext about racism within the movie industry and the ridiculous extremes actors take to transform their bodies to fit a role.

He’s not the only one deftly goofing on stereotypes, so are Stiller as washed-up action star Tugg Speedman, Jack Black as plump, drug-addled comedian Jeff Portnoy, and Brandon T. Jackson as the “Scarface”-loving rap mogul Alpa Chino.

They play the pampered, insecure leads in “Tropic Thunder,” a pretentious action pic based on a best-selling memoir by shell-shocked Nam veteran John “Four Leaf” Tayback (Nick Nolte in an inspired, hilarious turn) that cross-pollinates the worst bits from “Rambo” and “Saving Private Ryan.”

The twist is that the actors – shooting in a remote Southeast Asian jungle – wind up having to play soldier for real after members of a drug cartel lorded over by an easily-agitated 12-year-old (marvelous newcomer Brandon Soo Hoo) mistake them for DEA operatives.

The real “Tropic Thunder,” the one about the making of the film within the film, is the decidedly offbeat concoction of actor Justin Theroux (“Six Feet Under,” “Mulholland Drive”) and good pal Stiller, who, in addition to co-writing and starring, also serves as the film’s director and producer.

Like Stiller’s last wear-all-the-hats endeavor, 2001’s “Zoolander,” “Tropic Thunder” is all over the map in style and delivery, with only about two out of every three jokes hitting the mark. The actors, though, are consistently superb, including Matthew McConaughey as Tugg’s unctuous agent, Steve Coogan as an over-his-head British director, and a host of A-list cameos topped by an unrecognizable Tom Cruise as a fat, bald and blustery studio boss.

Even Stiller, never one to draw comparisons to Hopkins and De Niro, shines, despite playing the same self-involved dimwit he’s played a dozen times before. His Tugg consistently pulls you in with a wicked combination of neediness and narcissism in creating a burning effigy of talent-starved, over-the-hill action stars.

Stiller also hilariously lambastes the bombast of more serious actors like Sean Penn and Cuba Gooding Jr. by repeatedly flashing back to Tugg’s last film, “Simple Jack,” in which he played a buck-toothed, mentally impaired farmhand with a knack for communicating with animals.

At first, the shtick is offensive. But then you realize that Stiller’s not making fun of the mentally impaired, he’s making fun of actors who believe playing such roles are a surefire path to Oscar, as they were for Dustin Hoffman and Tom Hanks.

It’s a running gag that pays off two-fold, first in a bust-a-gut scene in which Lazarus condescendingly lectures Tugg on the nuances of playing “half-retard” compared to “full retard” (their words, not mine), and later when members of the drug cartel take Tugg hostage and force him to act out their favorite scenes from “Simple Jack,” the only movie the jungle-dwellers have ever seen.

Stiller’s most clever move, though, is “Tropic’s” opening, which begins with a clip of Jackson’s Alpa Chino urging the audience to go on out to the lobby to buy copious portions of his Booty Sweat energy drink and Bust-a-Nut candy bars, followed by a succession of fake movie trailers, one for each of “Tropic’s” three major stars.

The best of them – surprise, surprise – features Downey’s Lazarus and Tobey Maguire engaging in a little monk-on-monk action in the frock-ripping sudser “Satan’s Alley.” A close second is Black’s serious skewering of Eddie Murphy in a preview for “Fatties, Fart 2,” a gross-out comedy in which Portnoy plays all five members of a morbidly obese family suffering chronic flatulence.

There are at least a dozen more equally sidesplitting moments scattered throughout the picture.

The problem is the gags, as great as they are, never add up to much because Stiller, Theroux and co-scripter Etan Cohen are basically shooting fish in a barrel.

It’s also a bit ironic that the sort of pompous stars they’re so ruthlessly satirizing (Cruise, Nolte, Jon Voight) are some of the same stars busting their butts making “Tropic Thunder” more entertaining than it has the right to be.

Still, you can’t help admire what Stiller has accomplished in a summer in which solid laughs have been at a premium. It may not always strike with lightning intensity, but with Downey and company around, “Tropic” sure packs plenty of comic thunder.

TROPIC THUNDER

(R for pervasive language including sexual references, violent content and drug material. ) Cast includes Ben Stiller, Robert Downey Jr., Jack Black, Nick Nolte, Brandon T. Jackson, Tom Cruise, Steve Coogan, Mathew McConaughey and Danny McBride. Co-written and directed by Stiller. 3 stars.