Image copyright Fox Image caption Exteriors were shot in Jordan's Wadi Rum desert, previously seen in Lawrence of Arabia

Matt Damon is lost in space in The Martian, a survival story with a difference that imagines what might happen if a Nasa astronaut were to get marooned on Mars.

Here is what its cast, director and author of the original source novel had to say when Ridley Scott's blockbuster had its premiere at this year's Toronto Film Festival.

When author Andy Weir first starting writing The Martian in 2009, little did he think it would not only be published but also get turned into a Hollywood motion picture.

Especially since, after being turned down by publishers, Weir decided to release the book chapter-by-chapter on his website, free of charge.

The Martian tells of Mark Watney, an astronaut who is believed dead by his crewmates and stranded on the Red Planet.

With no way to signal Earth, he must use all his ingenuity and science background to survive on the inhospitable orb until a rescue mission can arrive.

The serial was a hit with fans, a publisher came calling and, soon after, Hollywood snapped up the movie rights. Even then, though, Weir couldn't quite believe the interest was genuine.

"You've got to get really suspicious when people are offering to make all your dreams come true for no readily apparent reason," he says. "For a while I was worried the print deal might be a hoax.

"I kept waiting for a scam. But once they started sending me cheques, I thought: 'If they're scamming me, they're not very good at it'."

Image copyright Fox Image caption Jessica Chastain (second from left) plays the leader of the ill-fated mission

The task of bringing Weir's story to the big screen fell to Drew Goddard, a writer who lists Buffy the Vampire Slayer, Cloverfield and World War Z among his credits.

Weir says he was relaxed about the treatment his book would receive, as Goddard kept him involved during the screenwriting process.

"He called me a lot and sent me the screenplay for my feedback," he says. "I gave some feedback - and he ignored some of it - but I was calm and happy all the way through."

Most films set in space are more fiction than science, But The Martian is the opposite, with Weir grounding its theories in technologies that already exist.

Director Ridley Scott says the science content made the film easier to make in some ways, compared with his past space-themed films such as Alien and Prometheus.

"The fantasy of space is a marvellous platform where anything goes," he says. "But you've got to make your own rule book and stick within those rules.

"This was a lot easier, because you can lean heavily on the science and make a more realistic movie."

In essence, the director continues, the story is identical to that of Daniel Defoe's Robinson Crusoe, with science thrown in.

"It reads as a very dense piece initially," he tells the BBC. "It's my job to un-dense it and make it watchable."

Image copyright Getty Images Image caption The film's stars swapped spacesuits for more formal attire at The Martian's European premiere

To further boost the film's accuracy, Nasa and the European Space Agency were brought in as consultants.

Jessica Chastain, who plays commander Melissa Lewis, visited Nasa's Jet Propulsion Laboratory and spent time with US astronaut Tracy Caldwell Dyson in order to understand her character better.

The main appeal for the actress - who appeared with Damon in Interstellar last year, only to be kept firmly on terra firma - was being able to depict being in space.

"I was really looking forward to the zero gravity stuff," she says. "When I was on set, I realised how many people are involved.

"They're all on a the pulley system, controlling your movements, that makes you look like you're doing it. It's choreographed within a inch of its life."

"The thing that's totally ridiculous, as grown-ups doing this, is in tighter shots it makes sense not to do wire work," says Damon. "You act while you're standing on one foot and moving slowly, but it totally works.

"As big as these movies are, and with all the production value, you end up like you're a kid in your bedroom, pretending you're in space."

Image copyright AP Image caption Director Ridley Scott likens The Martian's plot to that of Robinson Crusoe

While a manned mission to Mars and human colonisation of the planet may still be the stuff of fiction, Damon believes it is only a matter of time before it happens in reality.

"We do need to get there, just so we don't have an extinction level event that ends the human species," he says. "We will have to get on other planets eventually."

Until then, Damon hopes the film will inspire others as well as serving as a distraction during current economic and political troubles.

"It's a really optimistic and hopeful movie - and sometimes that's our job, to put something like this out in the middle of really tough times," he says.

"Drew [Goddard] described this the first time I met him as a love letter to science, and we talked about the incredible optimism and uplift of the story.

"I thought that's something that would be wonderful to put out in the world, and hopefully it will catch on."

Additional reporting by Neil Smith. The Martian is out in the UK on 30 September.