I had one of those very rare experiences watching Filth, whereby when I emerged bleary eyed from the cinema I truly wasn’t sure what I thought of the film. Did I love it or did I hate it? I just wasn’t sure. It was certainly an experience and I wanted to be careful that I didn’t let too many of my biases come in to play (being that I’m a fan of the source material and rather partial to James McAvoy), so it has required an unfounded amount of thought on my part in the build up to writing this review. Perhaps I’m being a tad overdramatic here; it is just a movie after all and one that has received pretty much universally favourable reviews across the board.

Filth is based on Irvine Welsh’s third novel, released in 1998 and widely regarded as one of his best (an opinion that I share). Like much of his material you may be inclined to label it as unfilmable, and would indeed have good reason to do so. Trainspotting remains the sole example of Welsh’s work having been successfully transferred to the screen, and with the attempts to make The Acid House and Ecstasy best left forgotten, Filth is certainly the best attempt since.

I think part of the problem with Welsh is that he likes to push things as far as he can into the realms of the vulgar and the absurd, which creates indelible images that sear into your brain from the pages of his novels, but conversely would be almost entirely impossible to portray on screen. I read Trainspotting shortly after the film was released in 1996 and I can still recall certain scenes very clearly even after all this time: an adolescent Begbie’s novel masturbation technique, a used tampon dunked into a bowl of soup that is served up in a restaurant etc. – both of which are absent from the film, and perhaps with good reason too. Filth treads this line perhaps a little too close to the edge, with some of the more surreal aspects of the book providing the weaker elements of the film; a talking tapeworm being replaced with an Australian Jim Broadbent sporting a bizarrely large forehead springs to mind. As a whole though it is largely successful as an adaptation, but as someone who has recently read the book it’s difficult to say how much of the plot I’m filling in that those new to the story may miss.

James McAvoy gives a powerhouse performance as Detective Sergeant Bruce Robertson, a vulgar mess of a man strung out on alcohol and cocaine and fuelled seemingly by his own selfish need for one-upmanship in a bid to secure a promotion at work, not to mention his continued struggle with bipolar disorder following the departure of his wife Carole (Shauna Macdonald). McAvoy is one of the best and most likeable actors around today and here he goes completely against type with greasy hair, bad skin and a few extra pounds, as he spews forth some of the most misogynistic, racist and homophobic insults imaginable with almost entirely unrestrained glee and joie de vivre ,creating and inhabiting one of the vilest characters imaginable. It is both horrifying and thrilling to watch, not to mention very, very funny. Having impressed in roles ranging from a young Charles Xavier in X-Men: First Class to his recent run on stage as Macbeth, McAvoy is clearly a versatile actor, but here he is truly something else and essentially (and successfully) carries the weight of film. With almost anyone else it’s entirely foreseeable that Filth just wouldn’t have worked at all on the screen.

Although I had my issues with the film, there are a few stand out scenes that had me laughing out loud in the cinema, most notably when Robertson and his hapless best friend Bladesey (Eddie Marsan) take a vice filled trip to Hamburg. Following on from his scene stealing performance in The World’s End, Marsan is proving himself to be some sort of comedy genius. Then there’s the Christmas party scene where male members of the police force are goaded by Robertson into photocopying their cocks, and trust me you’ll never be able to look at Jamie Bell in the same way again! I also enjoyed how the film attempted (although with varying success) to capture the surrealistic nature of the book and Robertson’s mental deterioration, providing us with some genuinely unsettling and frankly bizarre imagery that will undoubtedly stick with you for days following the film.

So, going back to my apprehensions about film – I think tonally it’s all over the damned place, and although I understand that it’s very tricky to balance the humour with the truly abhorrent behaviour of the characters, Filth doesn’t quite manage to pull it off. It is very broadly comedic in places, lifting it at times into farce, causing the more sinister elements to sit slightly uneasily and smoothing out some of the truly nasty stuff that’s in the book. There is the occasional whiff of simply trying hard to offend without really being particularly transgressive. One minute we’re seeing Robertson force an underage girl into giving him a blow-job, then we’re laughing at a tasteless joke, the next we’re being encouraged to feel sorry for him based on some early childhood trauma.

I also didn’t really understand why the central case surrounding a murder was changed from being a black victim to an Asian victim. Are words like “gook” or “chinky” more acceptable than the alternatives? Also, from setting it in the present day I’m not so sure that the bigoted representation of the male dominated world of the police force entirely rings true (or at least I hope not), despite the fact that it’s intended to be exaggerated parody. There are also far too many characters pushed to the sidelines with very little to do in the shadow of Robertson. Eddie Marsan and Jamie Bell do a fine job with what they’re given, as does Shirley Henderson who is fantastic as Bladesey’s wife Bunty, the victim of a cruel prank caller that pretends to be Frank Sidebottom. Elsewhere we have Imogen Poots, Pollyanna McIntosh, Martin Compston, Kate Dickie and even David Soul, not to mention a whole treasure trove of Scottish character actors all vying for attention, even if for a brief moment.

Overall, I think that I decided that I do in fact like Filth. It’s extremely funny, very weird and absolutely disgusting. It will no doubt provoke walkouts as it’s a far stranger film than the trailer and marketing suggests, and the language will no doubt offend. But if you go into a cinema and buy a ticket to see Filth, you’ll get exactly what you paid for…

Filth is released in Scotland on 27 September and across the rest of the UK from 4 October.