On an overcast morning last week, Marianne Murray stood behind a waist-high yellow tape at the Topsfield Fair and could barely control her excitement.
Several yards away, actors Larry David and Kate Hudson were shooting a scene for “Clear History,” an upcoming HBO film.
Murray, who is from Winthrop, once went to Hollywood in search of fame. But on this day, just the sight of Hudson — her favorite star — seemed enough.
“I’ve always wanted to be a movie star, so seeing Kate Hudson is almost like having my dream come true,” she said, standing on her toes to get a better look at Goldie Hawn’s daughter, best known for her performance in “Almost Famous.”
“I’m a humongous fan. I’ve seen every one of her movies. She’s just as beautiful in real life as she is in the movies.”
Until a few years ago, Hollywood seldom set up cameras north of Boston. But that changed after the state began offering a tax credit that allows producers to recoup millions in rebates, a move that has lured major stars such as Michael Douglas and Sandra Bullock to shoot in the region.
“Clear History” is the second film that has set down roots on the North Shore this summer, following Adam Sandler’s “Grown Ups 2.” Sandler’s film was shot in Lowell, Lynn, Marblehead, Saugus, Swampscott, and Tyngsborough, and provided a substantial revenue boost to local businesses.
David, who cocreated “Seinfeld” and also created and stars in HBO’s “Curb Your Enthusiasm,” chose areas to replicate Martha’s Vineyard, where the film — about a fallen marketing whiz — is set (and where David owns a summer home). HBO is scheduled to release it next year. In addition to David, it stars Hudson, Jon Hamm, Michael Keaton, Danny McBride, and Amy Ryan. Filming is scheduled to continue until Thanksgiving, and besides Topsfield, scenes have been shot in Beverly, Essex, and North Andover.
David and the rest of the cast were not available to speak to the Globe, but Bradley Thomas, the film’s executive producer, said he scouted the state and determined that north of Boston was a good cinematic match for Martha’s Vineyard. Since the film takes place on an island, cities and towns with shoreline backdrops such as Beverly and Gloucester were chosen, said Thomas.
Monica Levenson, the film’s producer, noted that preproduction work began on the film in July, and said there are now almost 300 full-time workers on the set, with at least 275 of them local residents. They include film technicians, art and wardrobe consultants, carpenters, and about 50 local actors who serve as extras.
“I’d say we’re spending at least $10 million on the film during production,” she said, and added that most of the Hollywood stars are staying in a local hotel.
The economic boost could not have come at a better time for the Topsfield Fair, where rain kept some of the expected crowds away last week. “It helps supplement some of the income that we lost due to the weather,” said David Thomson, a fair spokesman, who was on hand last week when the film crew shot scenes over a two-day period.
It was an added value for fair-goers to see Hollywood actors on the midway, he said. “For people in this area, it’s not every day you have movie stars hanging out. I think it’s kind of neat for people to see that world.”
Last week the crew also spent two days filming in Beverly, which pleased Mayor Bill Scanlon. “We’re always happy to have these people come. We have attractive locations to shoot scenes,” he said.
In addition to a scene at West Beach in Beverly Farms, the film spent a couple of days at the North Shore Music Theatre on Dunham Road. Crews are expected back at the theater later this month to film exterior and backstage shots.
According to Bill Hanney, the theater’s owner, it was the first time a Hollywood film has used the facility. The crew arrived on a Sunday, just after the production of “9 to 5 The Musical” had concluded. Workers began transforming the lobby, placing art logos, lobby banners, and even stickers on the entrances that recast the venue as “The Martha’s Vineyard Music Center.”
Hanney said he hopes that other producers will consider filming at the theater. “This brings us publicity, and I think it will bring more films here,” he said. “We’re reasonable. Since we did a good job for them I’m sure they will think of us the next time a theater shot is needed.”
One afternoon last week, more than 300 volunteers were sitting in the theater in the round, along with dozens of paid extras.
Chris Carr, who processes computer parts, had the day off, and made the short drive from Danvers to volunteer. Carr once met Bruce Springsteen after a 1978 concert, and was hoping to meet David, whom he called “the funniest guy going.”
By late afternoon, Carr and about 100 extras had sidled over to an aisle where David was filming a scene with Hamm, Hudson, McBride, and Ryan. David appeared aloof and occasionally practiced his lines aloud. He wore a denim shirt over a striped, buttoned-down shirt and T-shirt, brown slacks, and tan work boots. When a fan tried to engage him in a conversation, he took notice and addressed a small group of people.
“You volunteered? Oh, my God!” he said, breaking into a smile. “I had no idea. Does that mean I have to meet every one of you?”
The volunteers laughed and seemed satisfied that they had been noticed. Meanwhile, in the next few hours, David did more than a dozen takes, occasionally going off the script and ad-libbing, as he is known to do in “Curb Your Enthusiasm.” This seemed to please the volunteer extras, who gauged the filming and applauded when they deemed that a scene had been successful.
During one of the last scenes, Kati Enscoe walked into the theater as the cameras rolled and took a seat a few rows behind David, Hudson, and Hamm. Enscoe, who lost her full-time marketing job in September, said working a few days as a paid extra occurred at the right time. The Marblehead native has little acting experience but hopes to do more extra work, which pays around $150 a day.
Enscoe said part of the perk of being a paid extra is schmoozing with the stars. “Larry David is just hilarious. He was super cool during the filming and telling us that we did a great job, and he gave us feedback,” she said. She also stood next to Hudson for a couple of hours one day. “I said, ‘I like your jacket,’ and she said, ‘I like your boots.’ ”
Carr, who was given a beer bottle (filled with water) that he pretended to drink during the filming, briefly met David and Hamm following the final scene. After some small talk, he followed an exit sign and was descending a wide stairway when he heard voices behind him. When he turned around, he saw that it was David, Hudson, and Hamm discussing Japanese food. Carr kept on walking, content that he had done something different that day.
“It was fulfilling and kind of surreal,” he said. “I never felt overwhelmed or intimidated. I felt like they were regular people, just like me.”