Oh, it’s good to play bad.

Actors of all levels know this already, but guest actors get to relish their roles a little more than your average player, especially when they can dig into a villainous part with gusto.

Playing a guest character may not have the stability of long-term employment, but the roles can be fit to any size — from an Emmy winner like Alan Alda (“The Blacklist”) to an up-and-comer like Pablo Schreiber (“Law & Order: SVU” and “Orange Is the New Black”) and veteran character actors like Michael Rapaport (“Justified”). But a good visiting villain provides something else — a chance for actors to sink their teeth into a role they’ve often had a big hand in developing.

“I tried to be as imaginative as I possibly could,” says Rapaport, whose drug trafficker Daryl Crowe Jr. expired at the end of “Justified’s” season. “I did a lot of research for the accent, watched a lot of reality shows. ‘Honey Boo Boo’ had a husband with a good accent; I also watched ‘Moonshiners’ because those guys are pretty official.”

A guest role can be well-sketched out, but for the most part it’s there to service the narrative and the lead actors, so scripts don’t spend a lot of time giving bad guys back stories, and that allows actors to be creative.

Actors will always say is fun to play bad, too — and that’s evident with the baddies guesting on many series lately.

Few actors had more opportunity last season to really bite into baddie roles than Schreiber, who played a rapist/kidnapper on several arced episodes of “SVU” and a nasty, cruel prison guard nicknamed Pornstache on “Orange.” He could get nominated for either, or both.

“They were two characters that I had the most freedom to create on my own of everything I’ve ever done,” he says, noting that he worked with both shows’ showrunners (Jenji Kohan and Warren Leight) previously, which helped them to trust his choices. “They gave me a lot of latitude and freedom to create the character on my own.”

The open nature of the roles came at a good time for the Tony-nominated actor (“Awake and Sing!”), who says he harbored a lot of darkness in his real life.

“Acting can be the best form of therapy, people say, but I never understood that until this year,” he says. “We all have dark places in us and as an actor when you’re asked to inhabit that darkness it’s a chance to look at your own darkness — and if you’re a person who aspires to find the light in your daily life, looking at that darkness gives you a chance to expunge some of it.”

Even when a character is rendered in the broadest brushstrokes, however, some actors are cautious about how much detail to fill in. Alda says that in essaying dark political operator Fitch in “The Blacklist” he “never before played a guy I knew so little about. All I know really is he’s a worse person than (star) James Spader is playing, so that’s very nice.”

Characters of all kinds, including those living on the guest actor level, weren’t always drawn with so many layers. “We used to have a ‘normative score’ for what made a good hero, and a different one for villains (at the networks),” says Tim Brooks, a former executive at Lifetime, USA and NBC, now an author of books about TV. “There had to be a love-to-hate factor for villains; you couldn’t have the audience rooting for the villain.”

That’s less of an issue today, when even part-time villains are colored in shades of gray. “Actors can draw more complex characters now,” says Brooks. “An actor likes nothing better than a character with real depth — and to portray someone who is driven by dark, deep matters is a much more difficult acting assignment than playing Mr. Smiling Good Guy.”

That could explain what’s drawn Alda to so many post-“MASH” roles in which he plays flawed, obnoxious or plain old insidious characters; having inhabited a flawed good guy (Hawkeye Pierce) on that series for more than a decade, he says now “more than half the things I’ve played are flawed characters.”

But in the case of “The Blacklist,” he was drawn by the show’s star: Spader. “When you’re working with a good actor, part of you is watching how they work and you learn — you can’t help but learn,” he says.

“It’s fun when there are no restraints; none of the inhibitions normal people have — you can play that out in your imagination. With luck, it doesn’t slop over into your real life, though that can happen — Fitch is written with such an appetite for killing people that my friends have been made uncomfortable about it. But it’s very good because I don’t lose arguments with them any more.”

Rapaport jokes that he faced a similar issue when he brought Crowe home with him. “My kids and my girlfriend had to tell me to chill out,” he says. “It takes a minute to wash it off.”

Schreiber, who will soon be seen as the star of HBO’s upcoming dark comedy “The Brink,” had a different issue altogether: shifting gears.

“It’s a real difference between character acting and lead acting,” he says. “It’s fun to explore the extremities of human behavior, whether they’re on the good side of being head over heels in love or the awful side of what human beings are capable of. But when you go back to serving the narrative in a less extreme way — it’s difficult. You have to adjust.”

Schreiber, Alda and Rapaport were clearly not the only good players of villainous roles last season; they’re joined by Bill Paxton from “Agents of Shield,” Michael J. Fox on “The Good Wife,” “24’s” Michelle Fairley, “Parks and Recreation’s” Jenny Slate (well, in a hilariously villainous way) and virtually anyone who guested on “American Horror Story,” including Angela Bassett.

But even though some are household names, that’s no guarantee of Emmy attention.

“It used to be if you were a big-name person and you came onto a show you could almost be guaranteed something,” says the L.A. Times television critic Mary McNamara. “But there are so many fine performances in so many venues now there’s not enough slots for that. People do it instead because, first, they want to work without committing to a whole show, and they want to be buzzworthy and part of the conversation.”