ENLIGHTENMENT can come at any time. Just ask the artists behind Anything That Gives Off Light, the international co-production between American wunderkinds The TEAM, the National Theatre of Scotland and Edinburgh International Festival, which is at EIF this week.

As is usual with the TEAM, the company's artistic director Rachel Chavkin has worked with a group of TEAM regulars to create a show that explores national identity in a post Scottish Referendum, post Brexit, climate in which the shadow of the forthcoming American elections has been looming large and increasingly loud.

For Anything That Gives Off Light, Chavkin has been joined by Glasgow-based writer and director Davey Anderson as associate director. The show's writing credits feature Chavkin and TEAM member Jessica Almasy on the American side, with Anderson and actors Brian Ferguson and Sandy Grierson providing input from the Scottish members of the team.

“Because we're in different countries,” says Chavkin, “we've been working on this piece so much off and on that at times so many events have happened in the world that it's been hard to keep up. We started working on it before indy referendum one, now we have Brexit and a call for indy ref two, so who knows where we'll end up?”

Anderson too acknowledges how the white heat of history has overtaken the play.

“We did a work-in-progress presentation in 2014, just before the independence referendum,” he says, “and there was a real feeling of hope in the air. Now this summer following the fallout of the EU referendum, there's a real sense of trauma and people going around asking who are these people who voted for us to leave the EU.”

The roots of Anything That Gives off Light dates back to 2008, when the TEAM and the NTS collaborated on Architecting, which in part looked at slavery and the American Civil War through the prism of Gone With the Wind.

“That was a piece that investigated how America's past has influenced its present,” says Anderson, who worked as assistant director on the show, “and through Gone With the Wind how it tried to represent itself after the War. I'd been a huge fan of the TEAM, and during Architecting, Rachel and I started talking about collaborating on a story about American and Scottish history and the shared mythology between the two countries.”

With a working title of The Scottish Enlightenment Project, what emerged from a series of development periods in both America and Scotland was a story about what happens when an American tourist in Edinburgh and a Scottish emigre in London embark on a road trip to the Highlands of Scotland that takes a few timeslips en route.

“They're trying to find some kind of personal enlightenment in dark political times,” Anderson explains. “The man is bringing his granny's ashes back to Scotland, and is wondering what to do with them when he encounters an old friend he's drifted apart from. There's this wary reunion, and then there's this American tourist who's trying to exorcise her own demons, and these people are all recalibrating in some way, and trying to find an identity.”

Part of the research for Anything that Gives Off Light saw the company embark on a pilgrimage of sorts to Virginia, a place where eighty per cent of its population consider their heritage to be Scots or Irish, and where an annual Highland games is held. Two weeks of interviews with local residents yielded some surprising results.

“Not everyone in America is a gun-toting, loud-shouting, Trump-supporting anti-intellectual,” says Anderson. “I had a lot of really nuanced conversations with people, who were talking about taking political positions that I vehemently disagree with, but which, through talking to them, weren't abstract anymore.”

This taps into the response to the results of both the Scottish independence and EU referendums, whereby vocal liberals have attempted to come to terms with results they don't like. It also points up how many of the finest minds of every generation have been American. As Anderson points out, “There's bits of American culture that comes from Scots, but so much of Scottish and British culture comes from America. Literature, music, film, I adore so much of that, but it also comes from a very dark history. If you feed into it some of the hate and despair that's around just now, you can see what might happen if Trump becomes president.”

Received wisdom about Scotland also looks set to be upended in the show.

“It's been fascinating getting into Scottish history and looking at the complexity of it all,” says Anderson. “The Jacobite Rebellion, Culloden and the Highland clearances are stories we think we're familiar with, but they tend to be told simplistically. Scots tend to identify with the underdog rather than the bad guy, and sometimes I think we have a problem with that in Scotland. Sometime we can go, no, it wasn't us, it was them over there, when sometimes we've been the bad guys ourselves."

As is often the way, the umbilical link between nations can often be found in music. In Anything That Gives Off Light, this is seen and heard in the connections between Appalachian and Scottish folk traditions, and is made flesh by New York based husband and wife led band, The Bengsons.

“The music that's played live in the show will reflect the themes of the play,” Anderson points out. “The band will be made up of both Scottish and American musicians, so the connections should be made explicit.”

If Anything That Gives Off Light is about three people finding out who they are while living through complicated times, it also reflects how post indy and post Brexit those on the losing side respond.

“Do they come out of it transformed?” Anderson asks,”or do some give up and focus on their own world and hope it fans out from there?”

For the three people in the play, the choices are the same.

“Each of them changes in a different way,” says Chavkin, “and I think we've managed to steer clear of any kind of epiphany they might have, but basically they have to ask themselves, as we all do: Okay, if I've rewritten my history, where do I stand?”

Anything That Gives Off Light, Edinburgh International Conference Centre, to August 25, 7.30pm (except August 21); August 20, 24, 2.30pm; August 26, 12 noon, 4pm.

www.eif.co.uk