It is a scorching hot day in June and day-trippers in shorts and T-shirts are congregating at a barrier halfway up the historic cobbled Main Street in Haworth.

Further up the street can be seen a red-haired dynamo organising a group of people in Victorian dress, and then an actor dressed from head to toe in unseasonal black, who on closer inspection is revealed to be Joe Armstrong, takes another canter along the road on an impressive-looking horse.

The woman with red hair in the distance is Sally Wainwright, writer of such TV hits as Happy Valley and Last Tango in Halifax – and this production, To Walk Invisible, which tells the story of a snapshot in time in the lives of the Brontë sisters and which is Wainwright’s directorial debut.

The centre of Haworth, in the heart of West Yorkshire, has been impressively transformed to look as it would have done in the mid-19th century. The cobbled street has become a dirt track, the upmarket boutique shop fronts have been given a dressing down to embrace an image that is less tourist honeypot.

This is one of the last days of filming, and the weather is sweltering. The sun glints off the windows and Armstrong looks hot under his high collars as he takes another turn up Main Street, film crew out of sight blowing bellows-loads of smoke behind him as he passes. A lone crow watches proceedings from the gutter of Hatchard and Daughters bookshop and tries its best to offer some sense of Gothic atmosphere.

Sally Wainwright, a veteran screenwriter, is making her directorial debut (Rex)

Fortunately, the British summer has not disappointed and has previously provided plenty of foreboding dark skies and squalls of rain for the filming, the results of which we see tonight, when the one-off two-hour drama hits BBC1 at 9pm.

To Walk Invisible covers three years in the lives of the Brontë family, 1845-1848. But what crucial years they were. In a break in filming Sally Wainwright shelters from the sun with a bottle of water under a marquee near the top of Main Street, and says, “It was an absolutely pivotal time for the Brontës and an incredibly rich time for things happening. The family is living with the alcoholic brother Branwell, who was very ill, and from there goes through to 1848, when he died, and covers the years the three women started to be published.”

To Walk Invisible stars Charlie Murphy as Anne Brontë, author of The Tenant of Wildfell Hall, Chloe Pirrie as Emily (Wuthering Heights) and Finn Atkins as Charlotte (Jane Eyre). Although the works of the sisters have been dramatised many times, this is the first time a TV drama has taken an extensive, exhaustive and, most importantly, authentic look at the lives of the writers.

The Bronte sisters in ‘To Walk Invisible’, clockwise from top left: Chloe Pirrie as Emily, Finn Atkins as Charlotte and Charlie Murphy as Anne (BBC)

“It was very important for me to make this as authentic as possible,” says Wainwright. She is from Calderdale, where Happy Valley and Last Tango are set and filmed, and that is just down the road from Haworth, so her fiercely loyal and protective attitude to the area would allow nothing less. “I wanted the viewer to see just what it was like living at that time. This is not a chocolate box vision of England, it’s not England for an American audience. History is usually written by and about posh people; the intelligent lower classes don’t often feature and I wanted to change that. The Brontës were not particularly well off, and their father Patrick was from a pretty poor background.”

Ah, yes, Patrick Brontë. Played in the drama by Jonathan Pryce, Patrick was born in Northern Ireland, named Prunty or Brunty, which he changed to Brontë at Cambridge, either because he thought his given name sounded too Irish or because people had trouble spelling it. Patrick met and married Maria Branwell of Cornwall in 1812 and in 1820 he took up residence in the Haworth parsonage as the town’s curate. Together, Patrick and Maria had six children; two died: Maria, named for her mother, aged just 11 in 1825 (she would have been the oldest) and Elizabeth, 10, who died a few weeks after Maria.

The Reverend Patrick Bronte, the sisters’ father (Getty)

Those who survived into adulthood achieved lasting fame, though they did not have what you would call long and fruitful lives; Charlotte died aged 39, Emily, 30 and Anne, 29. Troubled Branwell, born in 1817, lived until the age of 31, addicted to alcohol and laudanum.

Patrick Brontë was widowed in 1821 when his daughters were very small, and he outlived all his children. He lived until the age of 84, a surviving portrait of him from 1860, the year before his death, showing him white-haired and staring sternly out from the frame. Does, I ask Sally Wainwright, veteran actor Pryce bring a suitable dourness to Patrick?

“Why do you say that?” she says sharply, and I realise that by dint of his position as clergyman and the age in which he lived, I have made a lot of assumptions about the Brontë patriarch – which Wainwright is about to put me right on.

“Patrick has had a very bad press,” she says. “He was a Tory but he was extremely enlightened for the period. He set in motion a couple of pioneering programmes for Haworth, one to improve the sanitation and another to establish a school in the village.”

I speak to Pryce much later on in the year, when he’s already on his next job, filming in Scotland with Glenn Close on The Wife. But his role as Patrick has made a lasting impression on him. “I knew about the sisters, of course, but I didn’t know a great deal at all about Patrick before I read the script,” he says. “I was incredibly impressed by him, to be honest. He encouraged his three daughters to read and expand their horizons from when they were very young, which was quite progressive. But then they became published writers without his knowledge, and that came as a huge surprise to him, but instead of being angry or forbidding them he encouraged them in that as well. He was very forward-thinking for his time.”

The first published work by the Brontës was a book of poetry written by all three sisters, a project led by Charlotte, which appeared in 1846. Charlotte had sent some of her work to the poet laureate, Robert Southey, who sent a less than encouraging response, writing that, “Literature cannot be the business of a woman’s life, and it ought not to be. The more she is engaged in her proper duties, the less leisure will she have for it, even as an accomplishment and a recreation”.

Undeterred, the sisters published Poems, under the pen-names Currer, Ellis and Acton Bell, suitably gender-neutral names that the reading public would assume were male.

But, says Wainwright, the battle to get published is only half of the story in To Walk Invisible (the title is taken from a letter Charlotte wrote to her publishers about the secrecy afforded to her by her pen-name). It is, says Wainwright, “really about these three women living with an alcoholic brother and how they start trying to publish”.

Branwell was the black sheep of the Brontë family. Adam Nagaitis (Banished, Houdini & Doyle) takes the role of the troubled male sibling, who although exhibiting some of the talent for poetry that got his sisters on the road to literary fame, preferred to drift between casual jobs, entertaining himself with portrait-painting and embarking on a doomed affair with a married woman, eventually sinking into alcohol and laudanum addiction.

“It’s a very powerful portrayal of Branwell,” says Pryce. “It was extremely difficult for Patrick to watch his son crumble before his eyes. It must have been horrible for him to watch, the loss of his son to alcohol.”

Wainwright adds that it was hard on the sisters, too, having to cope with Branwell’s decline while trying to forge their own careers. “It was very difficult for all of them,” she says. “Anne had to leave her job because of him. Charlotte was coping with depression and living with a brother who was never going to help support the family.”

Up on the hills above Haworth – near Top Withens, the ruined farmhouse that was the inspiration for Wuthering Heights – a replica of the Brontë parsonage was built for filming. The original parsonage still stands – indeed, you can tour around it – but the area around it has been built up considerably in the past 150 years, necessitating the construction of an identical full-sized model up on the hills.

It is the desire for authenticity from Sally Wainwright – on her directorial debut – that led to this being built and the centre of already-historic Haworth being painstakingly taken back in time to the 1840s.

Wainwright turns away for the next round of filming on Main Street. Armstrong (he plays coachman William Allison) saddles up again for another canter up the dusty track so the director can get it exactly right.

Before she calls “action!” again, I ask Sally Wainwright if the Brontës are still relevant today. “I think they’re increasingly relevant,” she says. “Charlotte was one of the first people to write about how women actually felt. I hope after people have watched this they will want to go away and know more about the Brontës, read their novels and read Emily’s poetry, and see just how relevant it is to our lives today.”