New ballets usually come into being behind closed doors - doors leading into warm studios, with proper dance floors and mirrored walls that reflect how the choreography is shaping up.

But Scottish Ballet's recently premiered Hansel and Gretel - currently on-stage at Edinburgh's Festival Theatre - owes as much to the woodland forays, the creative writing workshops, the story-telling sessions and the drawing and painting projects that took place all across Scotland as part of an ambitious outreach programme called Hansel & Gretel and Me.

Chances are that this very afternoon, when the company perform Wee Hansel and Gretel - a specially adapted hour-long version for younger audiences - there will be children (and adults, too) whose enjoyment is heightened by a sense of ownership, all because of their prior involvement with the work. If Scottish Ballet's Education team can look back with some satisfaction at months of strategic planning and full-on interaction with communities, partnership organisations and local authorities then so too can Christopher Hampson, who originated the idea.

Back in September 2012, when Hampson came into post as Scottish Ballet's artistic director, he had already set the wheels in motion for Hansel & Gretel and Me. The National Library, National Galleries Scotland and Forestry Commission Scotland were on board, ready to host a raft of events. Author Louise Welsh had also agreed to take part, a definite plus because creative writing was a key strand in the activities for children and adults alike. As Hampson said at the time, this was a tremendous opportunity to take something that every-one felt was familiar - namely the original Grimm tale - and use it as a starting point for other stories, other imaginings.

In time, there would be writing competitions for children and adults - which Welsh would help to judge - as well as a children's art competition. The latter brought in 5836 entries, some of them focusing on specific characters or aspects of design while others responded to the Grimm story with their own take of what would be scary encounters in the deep, dark woods. In fact, the Woodlands Project that the Scottish Ballet Education department ran in conjunction with Forestry Commission Scotland, was probably one of the most magical and memorable elements in the entire H&G and Me programme.

Woodlands all across Scotland became the setting for an exhilarating adventure when a team of choreographers - working with local dance groups from Dundee, Edinburgh, Glasgow, Aberdeen, Inverness and Stirling - created site-specific pieces that took inspiration from the out-of-doors surroundings and the nature of Hansel and Gretel's experiences.In one location, it actually snowed - the kind of special effect that challenges technicians and stage crews in even the best equipped of theatres!

When Hampson first announced H&G and Me, he spoke in terms of "harnessing and harvesting" ideas from the participants, saying at the time that "they will feed directly into the final production in a way that will give the people of Scotland a real feeling of what it is that goes into making a new full-length production. Usually the education and outreach work comes when all that is already complete. For Hansel and Gretel, that research and engagement will be part of the production's ongoing journey. In the run-up to the Hansel and Gretel premiere at Glasgow's Theatre Royal in December, it soon became clear that his comments were neither high-end window dressing, nor glossy lip-service to the cause of outreach engagement with the public. His office pinboard was adorned with some of the children's drawings from various workshops, his conversation was peppered with references to what had emerged during the story-telling and writing sessions. "We found that a lot of the children remembered quite specific things," he said. "And the birds were one of them. Because of that, we decided to create The Ravens - and in our ballet, they become something more menacing than just birds who eat up the trail of crumbs. They become these black, threatening attendants to the Witch. I just love the fact that sitting out there, in the audience, there will be children who recognise that the Ravens are connected back to their artwork, their stories. So that it's absolutely H&G and Them."

Scottish Ballet are at Edinburgh's Festival Theatre until tomorrow, His Majesty's Theatre, Aberdeen (Jan 15-18) and Eden Court, Inverness (Jan 22-25).