Jon S. Baird's decision to write and direct a film based on an Irvine Welsh novel could be called a crazy brave move.
Based on the 'Trainspotting' author's book of the same name, 'Filth' tells the dark and twisted story of crooked Edinburgh cop Bruce Roberton's bid to secure promotion amid his descent into drug-ravaged, sexually-depraved madness.
“I was introduced to Irvine through a mutual friend at the book launch for 'Crime', the follow-up to 'Filth',” he says.
“We were both pretty drunk at the time and the first thing I said to him was I think 'Filth' is his best book, it was the first one I read and I'd love to do it, just as an off-hand comment. That was back in 2008.
"Someone else had the rights at the time, and I think there had been four previous attempts to do it — all of which didn't work for one reason or another.
"The first thing we said was that at its heart, it should be a very dark comedy. The book is funny, but also so dark that we needed to give the film some sort of empathy with Bruce and we started that with comedy.”
The film stars James McAvoy ('X-Men', 'Atonement') in the lead role alongside Imogen Poots, Jamie Bell and Jim Broadbent.
“It was weird because before we cast James, he was probably the last person we thought was going to be Bruce,” Baird says.
“We'd looked at his other roles and we thought he didn't seem right. Then when we met him he just blew us away, he's such a clever and edgy guy.
"Irvine has gone on record to say that of every character he has created that have been translated onto the screen, James's portrayal of Bruce is the most like what he had in his mind, and there's some pretty big company to keep there. That says it all really, if Irvine is saying that about you.”
Finding the middle ground between the literal filth of the book and that which is suitable for a film audience was an added challenge for the Scottish director.
“I didn't want to be a slave to the tapeworm, you know?” he says. “I wanted to include it, because it's such a big part of the book, but it was never a stress or anything like that.
"We decided quickly that we're going to personify the tapeworm, we're going to take the doctor from the book who is looking after Bruce's physical ailments and involve him in more of a psychological decline.
"His conscience in the book is the tapeworm, and we added that to the doctor to make a psychiatrist. Irvine gives you the best characters and dialogue in the world, but he doesn't give you the clearest of narratives, which was a challenge.
"If the book was sanitised too much I'd have been absolutely murdered, and if it was a literal translation nobody would have gone to see it.
"The litmus test was Irvine himself. He was the first person I showed it to, and thankfully he liked it, and that gave me confidence to go on.
"Obviously when you're making the film, there's a whole new challenge to bring it off the page.
“The scene that James thought the hardest to shoot was the one with the young girl in the bedroom, but I wanted to give him as much reassurance that it wasn't going to come across as harsh as it felt on the day.
"There's always an element with Bruce that the joke is on him, and that scene could have been a hell of a lot darker.
"My favourite is the scene where Bruce and Amanda are on the staircase; the part where they're arguing to-and-fro, and then they get to the bottom and there's a big explosion of emotion and insanity. We could tell on the day we shot that by the crew's reactions that this was a good scene.”
Working with Irvine Welsh has had some side benefits for a director relatively new to the business.
“Throughout the process we've became very good pals,” he says.
“In the next few days we're going off to Japan to do some of the press over there, and it doesn't feel like a work trip at all; more like a boys' holiday together. He's became such a good mentor, for want of a better word.
"He's 55 going on 15, and is such a sweet, self-effacing guy and very unlike what people think he's going to be, myself included.
"He's just a really solid human being, and I don't know where all his stuff comes from to be honest. He gave a lot of emotional support throughout the process, but wasn't massively involved – apart from writing the book obviously!”
'Filth' is in cinemas from Nov 21, and as part of BIFF 2013 — it will screen Monday November 18 at Palace Centro Cinemas.
Click here to win tickets to the BIFF screening.