What happens when you put Frank Begbie and Liam Gallagher in a room together then tell them to party like there's no tomorrow?

They were heady times, those Britpop days, when Oasis flew the flag for Cool Britannia and Trainspotting led the charge for a British cinematic renaissance. Of course, that face-to-face didn't quite happen like that (one of them is a fictional creation, the other is a real-life character, although over the years it's sometimes been hard to tell which is which). But in a way they did meet up, as actor Robert Carlyle, then enjoying back-to-back success with the Irvine Welsh adaptation and feelgood hit The Full Monty, often found himself hanging out with the cream of the music crop. And, whether he realised it or not at the time, part of his brain was taking notes.

Carlyle plays Lachlan MacAldonich, former guitarist in a crashed-and-burned Britpop band, in his latest big-screen outing – California Solo, a low-budget, independent American movie that premieres this month at the Edinburgh International Film Festival. Lachlan, in self-imposed, guilt-ridden exile because of his role in his singer brother's drug overdose when the band was at its height, experienced first-hand the adrenaline rush of those mid-1990s glory days – as did the man who plays him on screen.

"I had a blast, an absolute blast," admits the 51-year-old actor, looking back on his 35-year-old self. "I was friendly with all the personalities of the day, or certainly the ones who would have been considered the cool lads. It was like when you're a wee boy, dreaming of meeting rock stars and seeing that type of life. But, within weeks of meeting all these people, I knew I wouldn't swop my life for theirs."

This suggests that, despite the iconic status of the Trainspotting poster and the fact that Carlyle-as-Begbie was seen on the front of T-shirts the length and breadth of the country, the actor could tell there was a difference between being a rock star and being a movie star.

"With the rock star fans, it's really full on," he says. "I've been with the Gallaghers a few times [he appeared in the Oasis music video for Little By Little], and the stuff from the outside ... I mean, you don't want to go walking down the street with them. I can go anywhere and get the recognition. People will sometimes stop you and shake your hand. And 99.9% of the time, it's lovely and nice. With these boys ... they just cannot do that. They will get mobbed."

When it came to playing a former Britpop star who has been hiding away for years, quietly working on a Californian farm while drunkenly making podcasts about dead rock giants, Carlyle found that he had a lot of valuable material stored away in the old grey cells. As he has done throughout his career when playing the bad guys as well as the good, he tapped into the shared humanity of the character, the everyday nature that's a bridge between someone who seems larger than life but who, deep down, really isn't all that distant.

"What I was trying to get was the absolute normality of these people," Carlyle explains. "If you take all this music life away, this six or seven year blast that Lachlan had in his life, he's just a normal guy working on a farm. They're all like that, these boys. They're elevated into this ridiculously lauded position as rock star, but they're like you and me. They come from the same place. They didn't ask for any of this. It's very difficult to cope with the adoration, the money. Everything that comes with that lifestyle is fraught with danger unless you've got a really strong mind. And a lot of these boys don't have the strength of mind to keep it together."

Rather than return to the UK and face the hostility of family, fans and the music industry over his brother's death, Lachlan buries himself in his American exile. Anyone who has been watching Carlyle's career – as he's gone from acclaimed Glasgow stage actor with his Raindog Theatre Company to Trainspotting icon and James Bond villain to seasoned low-budget player and American TV star – might think he too has been something of an exile for the past four years.

While keeping one foot firmly in the UK film and television industries (notably in small but quality movies such as I Know You Know and Summer, and memorable turns in series such as The Last Enemy), he has signed on for a couple of longer-term roles (as Dr Nicholas Rush in Stargate Universe and Rumplestiltskin/Mr Gold in Once Upon A Time) that have seen him work for months in Canada and the US.

"It's funny how things sometimes go hand in hand in your life," he notes. "Of course, I've never been in exile as long as Lachlan – and never will be – but it did give me some kind of insight into what it would be like to be away from home. In Lachlan's case, he doesn't want to come back, and with me it's a different thing."

That thing being, of course, that he'd rather be back in the UK with his wife Anastasia and children Ava, Harvey and Pearce, although they did make regular visits to Vancouver while he was working on Once Upon A Time. "They've been coming back and forwards for the past wee while, in the summertime and Easter breaks," he says. "It's not ideal, but whose life is? It's the price you pay, really. But we see each other all the time, so it's worked out ok."

But, as Carlyle is the first to point, North American telly is where it's at these days.

"For me, 24 was a game-changer," he says. "It elevated the whole thing, and television became almost like an event.

"Suddenly people were given box sets and had 24-hour weekends and stuff like that. That goes hand in hand with the fact that, about 10 or 12 years ago, the number of movies being produced and released in and around Hollywood was on the dip. The writers were out of work in film and into television, and suddenly you get these fantastic scripts. It all comes down to the writing. And, at the moment, that all comes down to the US and Canada."

On a personal level, Carlyle feels blessed to be working with Eddie Kitsis and Adam Horowitz, creators of Once Upon A Time, previously writers on Lost. To him, Rumplestiltskin is as important as a cameo character in a movie, who changes everything that's going on around him every time he turns up on screen. So there's no sense that he's missing out on the greater glitz and glamour of the movies.

"I have always been a great admirer of the small screen," he insists. "When you get good quality drama in your own home, it's tremendous stuff. I've been involved in it from the very beginning. Cracker, for me, was a big break-out piece as well [he memorably played a traumatised Liverpool fan turned killer], and I've always gone back and forward between film and television for that reason. I like the intensity of the working day. It's sometimes as basic as that. Film: you'll sometimes do one scene in the day, maybe two, maybe three. Television: minimum of 10 or 12 scenes in a day. So you're on the whole time. You're not spending hours in a trailer waiting – you're on and you're doing it. The character is fresher in your mind, scene by scene by scene by scene. The arc is a lot more satisfying as an actor to play."

If British films and television aren't currently that much of a draw, is there anything else, I wonder, that might encourage him to work again in his homeland. I point out that David Hayman, who directed him very early on in Silent Scream, has just played King Lear at the Citizens Theatre and that his contemporary, Alan Cumming, is now performing a one-man Macbeth at Tramway. Could Carlyle, the man who first came to notice with Raindog's devised works, be enticed back to the Scottish stage?

"I don't know. I really don't know. I really, really, really don't know." He draws in a long breath, then exhales in a big sigh. "I think Shakespeare is probably where it would be. I loved my time with Raindog – crazy, crazy times. And I've always said I would come back to it one day. I've always loved Macbeth, and directed it twice at Raindog. So maybe it would be something like that ... with some tasty Scottish actress playing Lady Macbeth. That might drag me back."

California Solo ( Cineworld, June 28, 6.10pm, and June 30, 1pm) is part of the Edinburgh International Film Festival. Robert Carlyle will be interviewed live on stage by Sunday Herald arts editor Alan Morrison for the Bafta In Scotland Interview at Filmhouse on June 24 at 5pm. See www.edfilmfest.org.uk for tickets and details.