Getting your Trinity Audio player ready...

In the past year, Robert Downey Jr. earned a reputation as one of Hollywood’s most versatile stars.

Now, in “The Soloist,” opening Friday, Downey portrays a real-life person: L.A. Times columnist Steve Lopez, who discovers a homeless, schizophrenic musical prodigy (Jamie Foxx) and begins an unlikely friendship that changes both men’s lives.

After repeated battles with substance abuse and years at rock bottom in his professional life, Downey has become a star whom studios build blockbusters around. He demonstrates a shape-shifter’s ability to get beneath a character’s skin. His reluctance to be pegged led him to another offbeat role for his following project, a period English mystery in which he’ll star as a two-fisted, macho Sherlock Holmes.

We caught up with the ever-unpredictable actor last week by phone at his home in L.A.

Only a handful of actors, like Johnny Depp and you, can navigate a long career and yet consistently stay fresh. What’s the secret?

Oh, gosh. It must be my new depilatory cream. Honestly, if you stay engaged, it stays engaging. There you go.

In this film, you and Foxx both play radically isolated characters. In your mind, who’s “The Soloist” of the title?

[Director Joe Wright] would say he first thought it was Jamie and then realized it was me. We would all say we thought the film was about friendship and about mental illness. But we all now say the film is about faith. That’s what makes things interesting. I love the theme.

The film is full of reminders that homelessness could happen to anybody. Katrina could hit your town, you could fall off your bike and lose everything, you could be laid off, and next thing you could be living out of a shopping cart.

Yeah, and hopefully once that’s a foregone conclusion, can we now have empathy? In that scene with Steve and his wife [discussing life’s unpredictability], I said, “I think he should start talking about the Northridge quake.” Because the Northridge quake was a Los Angeles event at the time they had moved here, and had all the promise in the world of their marriage and their careers and their futures being forever entwined and beautiful. And something quite different happened. In fact, his only friend now is somebody who is a stranger to himself.

In “Tropic Thunder” your character works in blackface and tells another actor how to angle for an Oscar by playing a handicapped character. So did you and Foxx discuss either of these subjects while you were working on this film?

(Laughs.) That film is so many shades of wrong, I love it so much. It’s just so horrifically subversive and terrible. The greatest service I can do to any of my other peers of the realm, and my greatest joy, is when one of my contemporaries asks me if I will leave their outgoing message on their cell phone as Lincoln Osiris.

It’s funny, you know. What 50 years ago would have been considered either good-ol’-boy entertainment or horrific racism has become razor’s-edge, self-deprecating anti-Hollywood method actor hullabaloo. It gives me so much joy. It’s just the gift that keeps on giving.