Hollywood's take on history tends to be formulaic, with several regular plotlines.

Movies about history are often tragic, heart-wrenching stories of historical injustice or inspirational tales of triumph. They're stories about good vs. evil, sometimes with a dash of fictional romance thrown in. And if it's about British history, Dame Judi Dench's inclusion is seemingly guaranteed.

Rarely, though, are these films scary, and this distorts the reality and experiences of the past by omitting a crucial element. Just like in our world today, people in history experienced fear and terror. If anything, these sentiments were arguably more prevalent in the past, as people struggled with the fear of an angry God and phenomena they couldn't explain.

This is something Robert Eggers, the mastermind behind the historical horror films "The Witch" (2016) and "The Lighthouse" (2019), understands. Which is why Eggers — a master of psychological horror — is one of the most exciting directors tackling history today. He's filling a gap in historical fiction that helps today's viewers see the past in its full dimensions.

What distinguishes Eggers' films from a historical perspective is his painstaking research. "My entire process is research-based," he explained recently to Vox. Often starting with a historical folk tale, Eggers not only uses archival records to set the scene and dress the characters, he takes the language of the past to fashion how they speak.

This research enables Eggers to tell stories from the past that we rarely engage with, let alone take seriously. These are stories of fear and terror that are rooted in a belief in the spiritual or supernatural world and how it afflicted humans before the 20th century.

Eggers first film, "The Witch" tells a story which he dubbed "a Puritan's nightmare." The movie starts with the banishment of a family from their community in 1630s New England, after the father, William, spars with fellow settlers over differing interpretations of the Bible. The family finds itself alone on a wagon, leaving the physical and spiritual safety of the enclosed settlement. Like many Puritans did, the family sees the 'wilderness' that engulfs them as a source of both terror and salvation. In a stirring image, they fall to their knees and pray, while staring up at the foreboding forest. "What went we out into this wilderness to find? Leaving our country, kindred, our fathers' houses, we travailed a vast ocean. For what? For the Kingdom of God," William prays.

Soon, strange things start to happen, particularly in the woods and particularly to the oldest daughter, Thomasina, who's approaching womanhood. Katherine, the mother, wants to return to the settlement but William believes their struggles are a test from God. As events unfold, the family, stricken with grief and filled with terror, start to suspect Thomasina of witchcraft. Eggers told Vulture he used period pamphlets that described how "afflicted children" spoke to craft the dialogue.

Not surprisingly then, "The Witch" accurately portrays widespread fears of witchcraft in the 16th and 17th centuries. Circulating widely in Europe, these fears came to New England with the Puritans. For Cotton Mather, the noted Puritan minister and author of several pamphlets about witchcraft, the whole experience of colonization was a battle with Satan, who lurked in the woods, among the indigenous people around them and occasionally in the souls of New England settlers themselves. These fears coalesced into the notorious Salem Witch Trials of 1692 and 1693, in which roughly 200 people were accused of witchcraft and 19 people (14 women and 5 men) were executed.

Historians have long explored this topic, but Eggers goes in a different direction: He takes Puritans at their word and accepts that witches existed, lurked in the woods and occasionally stole children. In other words, the film inhabits the psychological and spiritual fears of Puritans, rather than looking for explanations.

Similarly, in his new film "The Lighthouse," which is in theaters now, Eggers explores 19th century sailors' folk tales, which often touched on the supernatural and included stories about the dead. The story takes place on a rocky island off the coast of Maine in the late 19th century. It begins when Thomas Wake, the keeper of the island's lighthouse, arrives with a new second-in-command, Ephraim Winslow, to tend to his beloved lighthouse.

Over several weeks, the two experience the madness of isolation. A heavy fog envelopes the rock they're stranded on, ensuring the monotonous drone of the foghorn rarely stops. Meanwhile, nautical mythology — stories of sea gods, mermaids and supernatural seagulls — fill their heads. Wake delivers searing monologues reminiscent of curses that warn Winslow of the superstitions of the sea.

The audience is left wondering about Wake's power, the sea's power and the blurred lines between what people believe compared with what's real. For the film Eggers mined both maritime dictionaries and the stories of Herman Melville and Samuel Taylor Coleridge, as well as Sarah Orne Jewett, a 19th century writer who interviewed sailors and wrote their words down phonetically, to get the vernacular right.

"The Lighthouse" maintains a haunting atmosphere and upends you when you least expect it. In other words, Eggers evokes the feeling of the late 19th century, when spiritualism, a religious movement concerned with conversing with the dead, had taken the country by storm. As folklorist Christina Hole notes, sailors acknowledged, "Christ on shore" but took care "not to offend the Old Gods when at sea." This meant that while most believed dead sailors traveled onto the next world, many also believed that if a sailor drowned, he inhabited the bodies of seagulls and albatrosses. Anyone who killed those birds risked being cursed.

The experiences of Wake and Winslow fit accurately into this world with its blurry lines and supernatural elements.

And yet, as prevalent as this sort of mythology was in the 19th century — like witchcraft in the 16th and 17th centuries — our historical fiction often omits these ideas and feelings. That's why Eggers's films are so unique and important.

Like all good history, as well as good storytelling, Eggers makes these strange stories real to modern audiences. Few of us today fear the presence of a witch or one-eyed seagull. We do, however, know how it feels to be afraid of what we cannot explain, to struggle to make sense of the world and for some of us, to feel like we're going mad from isolation or anxiety.

If you're willing to suspend disbelief for 90 minutes while watching one of Eggers' movies, those fears morph into strange and terrifying spirits that would have made a lot of sense to 17th century Puritans or 19th century sailors. Understanding the psychological horror that's implicit in history can intimately connect us to those who lived in the past. This helps us better understand what motivated people, how they saw the world and how they dealt with the existential challenges of their worlds. But it also makes seagulls very, very scary.

Melissa J. Gismondi is a historian and journalist. She holds a Ph.D. in North American history from the University of Virginia. She wrote this article for the Washington Post.