Back in his 1980s New York heyday, record producer Rick Rubin was an unapologetically bratty loudmouth. To those who saw him at the time, he’s barely recognizable in the new Showtime documentary “Shangri-La.” Named for Rubin’s recording studio above Zuma Beach in Malibu, Calif., the series, premiering July 12, shows him resembling Mr. Natural as he lays on his back and unspools chill proclamations.

Rap legend Chuck D, of Public Enemy fame, recently went to Shangri-La where he and his supergroup Prophets of Rage sought something beyond common production. “We went to Rick to find our ID,” Chuck D tells The Post. “We needed to get below the star tissue to find our soul.”

How did Rubin help? “It’s telepathic and being clear about what doesn’t work. He gets under the hood and grease is all over the f - - king place.”

‘He gets under the hood and grease is all over the f - - king place.’

The filmmakers contended with their own metaphorical hood: They received access to Shangri-La — as stripped down as a Zen retreat, with natural light flooding the recording facility, but Rubin, 56, refused to sit for an on-camera interview. “He wanted to challenge us on how to tell a music story,” says producer/director Morgan Neville. “He is not interested in what has been done before.”

Rubin co-founded Def Jam Records in his NYU dorm room in 1984, encouraged the Beastie Boys to meld punk and rap, and later resuscitated Johnny Cash’s career through stark recording made in the country legend’s living room. There were sessions with Kanye West, Red Hot Chili Peppers and Mick Jagger, which all cemented Rubin’s rep as a studio genius. Early on, Rubin fancied himself as a reducer instead of a producer. LL Cool J, who he “reduced,” describes this approach as “stripping away the fat and getting to the muscle.”

Raised as an only child on Long Island’s Lido Beach, Rubin was doted on by his homemaker mother and shoe-wholesaler father — when Rubin’s punk band, the Pricks, played CBGB, they reportedly drove him to the club in their Cadillac and waited outside of the Bowery dive to ferry him home after the set ended — and never lacked opinions about music. “Rick was the most confident 18-year-old I ever met,” Adam Dubin, Rubin’s NYU dorm-mate and director of the thrash-metal documentary “Murder in the Front Row,” tells The Post. “If you liked something and Rick didn’t, he could not be turned around.”

LL Cool J first met Rubin at the dorm: “Rick came downstairs, and I said, ‘I thought you were black.’ He said, ‘Cool.’ Then we went up to his [equipment-jammed] room and recorded a demo.”

These days, living and working in minimalist spaces, wearing a uniform of white T-shirts and black gym shorts, Rubin emotes encouragement without saying much. “Rick does not need to touch a knob,” says Chuck D, acknowledging that he and his bandmates are all capable of producing records in the traditional sense. “He contributed by listening and watching and trying to find alchemy.”

As to how Rubin turned into a mellow fellow with a predilection for outdoor ice baths and an aversion to shoes, Dubin sees it as a natural progression for a music-biz exception who’s managed to stay relaxed without ever resorting to illicit substances. “Rick makes his own world wherever he is,” says the former roomie, pointing out that Rubin did as much in the NYU dorm and in the Gothic Hollywood pad where he later resided. “It’s not conventional, but he rolls that way. Shangri-La is the ultimate version of Rick building a world for himself, and now the top stars of our era trek there to work with him.”