Though he’s played his share of good guys — Eric on “That ’70s Show” — and bad guys — Venom in “Spider-Man 3” — and even had a crack at doing self-deprecating parodies of himself (“Ocean’s Eleven” and “Twelve”) — Topher Grace found he was dealing with a whole new animal when he took on the role of David Duke, the former Grand Wizard of the Louisiana chapter of the Ku Klux Klan in Spike Lee’s new film “BlackKklansman.” When Grace first heard that Lee was making a film based on the true story of Ron Stallworth, a black police officer who, in the 1970s, infiltrated and exposed the Klan by “passing for white” during a series of phone conversations, he got his hands on the script, and immediately knew that he wanted to play Duke, a man he considers not just villainous but also evil.

The genial Grace, 40, who admits that he relishes challenges, first had to get past the vitriolic, no holds barred hate speeches he’d have to deliver in the film, which he made it through under the comforting guidance of Lee. Then he could explore and get to the dark heart of Duke. Grace spoke about the film by phone from New York.

Q: Did you know much about Duke before this?
A: I was aware of who he was in a general way. Then there was that moment where Spike Lee calls you personally to say you’ve got the film, and I was so thrilled. It was the happiest day of my life, followed by the worst month of my life when I did my research. I read “My Awakening,” which is Duke’s autobiography and kind of a thinly veiled “Mein Kampf.” I read books about him, I watched interviews with him. I watched the Phil Donohue shows that he was on in the early 80s, which taught me a lot about his mannerisms. I listened to his radio show. You can’t help but get so depressed listening to something so overwhelmingly negative.

Q: You’ve certainly played villains before. Besides Venom, there was the doctor in “Predators,” and you started out in film as a drug dealer in “Traffic.” But Duke is on a different level because he’s real and he puts up a front that hides the snake inside. What was the challenge to doing this role?
A: The first half of the movie deals more with the idea of what racists were in the early-70s, which is kind of beer-bellied rednecks or whatever the general idea of a racist was. But what happens in the second half of the film is kind of what happened to America in the sense that David Duke has a new approach: He only wears three-piece suits and he’s well educated. The thing I hated about all the research is it became so obvious how intelligent he was, which makes him more evil than the average bad guy. They said that when you’re playing the role of a villain, you have to find the way that he’s a good guy to himself, but I couldn’t do it. I just played pure evil.

Q: Spike is known as a guy who really knows what he even wants before the camera rolls. Was there much room for Topher Grace to make suggestions on how to play David Duke?
A: Oh, Spike is so open! John David Washington (who plays Ron Stallworth) and I did most of our rehearsals together. That was great, but they’re all phone calls, and we can’t see each other on the phone. When we were filming, Spike set up the two offices right next to each other on the soundstage, so we were actually on the phone with each other while the cameras were on us. Those conversations are essentially live.

Q: Did you ever hear from Duke or his people?
A: I was interviewed for an article in which I condemned him and said how much I personally hate him. I made the point that when I was watching David on those episodes of “Donahue” from 1983, he used the terms “make America great again” and “America first.” That stuck out to me when I was watching it in 2017. When we were doing the rehearsals, we were talking about that, and Spike said, “Let’s find a place to put some of that in the film.” That was all mentioned in the article. I woke up one day and my wife said, “David Duke is tweeting about you.” The tweet said, “Thank you so much, Topher. You’re right, those ARE my expressions. Maybe I should sue Donald Trump.” But I resisted the temptation to tweet back.

Q: “BlackKklansman” won the Grand Jury Prize at Cannes and got a six-minute standing ovation. What was going on in your head at that screening?
A: To watch it with an audience and have that kind of reception was one of the great experiences of my career. It was such an amazing confirmation that I was in something that just for a second might be part of the national conversation.

“BlackKklansman” opens on Aug. 10.
— Ed Symkus writes about movies for More Content Now. He can be reached at esymkus@rcn.com.