New research shows why people might feel good about characters who do bad things.

Morality matters, says Matthew Grizzard, an assistant professor in the University at Buffalo communication department. Viewers tend to like the good guys and dislike the bad guys. But the new study, which builds on previous research, also suggests that we don’t necessarily need to see behavior to make a distinction between the hero and the villain.

Grizzard’s study manipulated what characters looked like and measured audience perceptions. They hoped to find out whether simple differences in appearance—for example black clothes compared to lighter colors—would be enough for viewers to categorize a character as a hero or villain.

Earlier research, meantime, had found that heroes and villains differ in morality but not competence. “Villains aren’t just immoral. They’re good at being bad,” according to Grizzard.

The previous research gave Grizzard’s research team a pattern for determining whether they were activating perceptions of heroes and villains or whether they were simply creating biases unrelated to narrative characters.

“If our data had come out where the heroic-looking character was both more moral and more competent than the villain, then we probably just created a bias. But because the hero was more moral than the villain but equally competent, we’re more confident that visuals can activate perceptions of heroic and villainous characters,” says Grizzard.

Beyond an understanding of how visuals can influence perceptions of character, the findings indicate that judgments of characters depend on comparisons audiences make between characters—and the order of introduction plays a role.

Heroes were judged to be more heroic when they appeared after a villain and villains were judged to be more villainous when they appeared after a hero.

“What’s happening here is that we’re not making isolated judgments about these characters using some objective standard of morality,” says Grizzard. “We’re constantly making comparisons about these characters and the forces they face.”

With Walter White, for example, the audience sees the evolution of a character whose ethics progressively spiral downward from season to season, and yet audiences remained loyal to him. That loyalty surprised Breaking Bad creator Vince Gilligan.

Gilligan said in an interview that at some point he thought the audience would turn against the character. But Grizzard points out that the show’s antagonists concurrently get worse along with White.

“We see a trend where White is not decreasing by himself. There’s likely to be a constant comparison with other characters,” says Grizzard. “So White is probably benefiting from the comparisons the audience is making.”

Grizzard says it’s a polarization effect. The hero seems better when compared to the villain, while the villain seems worse when viewed in light of the hero.

But being bad isn’t, well, all bad, at least in the world of fictional narrative. It comes with certain advantages, according to Grizzard.

“We find that characters who are perceived as villains get a bigger boost from the good actions or apparent altruism than heroes, like the Severus Snape character from the Harry Potter books and films.”

These findings, published in Communication Research, could be informative for public service campaigns or telenovelas that try to promote certain behaviors. “It shows the importance of how these characters are framed,” he says.