Camping His Style: Downey?s character prepares to do battle with good taste.

Tropic Thunder may have first appeared on your radar last August, when Owen Wilson dropped out of filming after his suicide attempt. Or maybe you heard about it earlier this year, when word got out that Robert Downey Jr., in the film’s movie-within-a-movie, would be playing a black character. But the premise for this Hollywood-skewering war spoof has reportedly been roller-derbying around writer-director Ben Stiller’s brain since 1987. That’s 21 years spent marinating in the comedian’s twisted psyche, eventually co-molded by scripters Justin Theroux and Etan Cohen and, certainly, further shaped by an A-list cast that includes Jack Black, Nick Nolte, Steve Coogan, and Danny McBride.

The result? A comedy beast that’s nearly impossible to dissect. At least not without giving up the goods, anyway. The details about Downey’s racial transformation, for example—his character, Kirk Lazarus, is actually an Australian actor so celebrated and so Method he’s chosen to portray a black soldier in a Vietnam flick—might have comprised 75 percent of the gag in lesser hands. But here the concept is a mere launchpad for a performance so brilliant, it’s fair to regard Lazarus as August’s Joker. Another not-so-secret cameo may help rinse the ick off a superstar’s recently tarred reputation (though it doesn’t quite).

There are fake trailers, surprise violent scenes, layers upon layers of film-industry mockery, and the kind of rampant offensiveness that’s attracted cries for boycotts from more than one activist group. You can hear Stiller’s dedication to his vision in the dialogue: “More stupid!” demands a villain who takes Stiller’s character, Tugg Speedman, hostage and then demands he re-create one of his broad critical flops. He complies, delivering this nugget as a mentally challenged man talking about bad dreams: “This head movie makes mah eyes rain!” Earlier, Lazarus discusses craft with Speedman, declaring that his commitment to the aforementioned part must have left him feeling “moronical.”

The thing about moronicality is that it takes loads of intelligence to get it right, and in this regard Tropic Thunder can sidle up to classics from Some Like It Hot to The Jerk. For all its comedic density, the plot is simple: A memoir by John “Four Leaf” Tayback (Nolte), Vietnam’s Pvt. Ryan, is being adapted for the big screen by clueless British director Damien Cockburn (Coogan). He can’t control his cast, which besides Lazarus and action-hero Speedman includes rapper-turned-actor Alpa Chino (Brandon T. Jackson), drug-addled star of Eddie Murphy-esque franchise The Fatties Jeff Portnoy (Black), and still-level-headed newcomer, Kevin Sandusky (Jay Baruchel). Tayback suggests that Cockburn “take them off the grid” to scare the artistes out of his actors and elicit more believable performances. But Cockburn’s orchestrated dumping of his cast into the jungle for a guerrilla shoot goes immediately wrong, and soon well-armored poppy farmers assume the actors are actual American soldiers. The thespians’ survival skills kick in—eventually—as they try to fight their way back to the world of gift bags and Booty Sweat (Chino’s energy drink).

Unlike Pineapple Express, Tropic Thunder’s blood-and-guts angle is introduced early and graphically, so its combination of action and yuks never feels disingenuous. All of the big players have ace moments, even Matthew McConaughey, who took over Wilson’s part as Speedman’s agent. But Stiller and Downey steal it: Stiller’s Speedman is a superior Derek Zoolander, hilarious whether he’s wriggling his body while dramatically taking bullets or quietly going nuts in captivity. And it’s all of 30 seconds before Downey kills, in this case in his character’s trailer, without even uttering a word: Dressed as a monk—and still white—his expression during the preview’s narration is a dead-on imitation of every pretentious performance ever captured onscreen. As far as his guttural delivery and mannerisms when “black,” it’s too thorough, ridiculous, and well-plotted to be offensive (and Chino calls Lazarus on it repeatedly for good measure). Speedman’s “Simple Jim” character—with buck teeth and a peroxide Prince Valiant cut—isn’t as excusable. But the script’s ingenious argument of the drawbacks of an actor “going full retard”—as well as the movie overall—will make your eyes rain.