"The Martian" just topped the box office for a fourth weekend. Here are six surprising things you might not know about this Red Planet survival story.

Based on the novel by Andy Weir, "The Martian" tells the story of astronaut Mark Watney, who, during a mission to the Red Planet, is mistaken for dead by his crewmates and left behind. In order to survive on Mars, Watney has to rely on his incredible problem-solving skills and his sense of humor. We think it's going to go down in history as one of the most realistic space movies ever made.

Space.com attended a screening of the movie last September that was followed by a panel discussion featuring the movie's director, Ridley Scott, screenwriter Drew Goddard, producer Simon Kinberg and members of the cast. The panel members shared lots of awesome facts about the movie and the process of making it. Here are six things you might not know about "The Martian." [How to Survive in 'The Martian' By Doing Math (Infographic)]

A page of the script flew on NASA's Orion spacecraft

According to Goddard, NASA put a page of the script inside the Orion Multi-Purpose Crew Vehicle when it made its first test flight in December 2014. Orion may one day carry humans to Mars, so the gesture was fitting. Goddard said Scott would sketch storyboard images and other drawings on the script pages, and the page that was chosen featured one of Scott's drawings of Watney.

Scientists from the European Space Agency (ESA) visited the set while the Philae lander was touching down on a comet.

Chiwetel Ejiofor, who plays a NASA mission director named Vincent Kapoor, seems to have been deeply influenced by an ESA scientist who visited the movie set as a science consultant. Ejiofor got to see how the scientist reacted when he heard the news that the Rosetta mission successfully set down the Philae lander on the surface of comet 67P/Churyumov-Gerasimenko on Nov. 12, 2014. This was the first time humans had soft-landed a probe on a comet.

"The excitement of that was so palpable," Ejiofor said at the panel discussion. "For [ESA] of course it was a very exciting time. It was also a way for me to observe that there was a kind of calmness as well. Only when they landed did you see the dude scream. Before that he was [very calm]."

The "Mars" landscapes can be seen in other Martian movies and "Lawrence of Arabia."

The majority of "The Martian" was filmed on indoor sets in Budapest, Hungary, according to the filmmakers, but many of the exterior shots of Mars were filmed in Wadi Rum, also known as the Valley of the Moon, in southern Jordan. This same location was used for certain shots in the epic Hollywood classic "Lawrence of Arabia" (1962), according to Scott. (While he didn't mention it at the panel session, according to the Internet Movie Database, Wadi Rum was also a location in Scott's film "Prometheus" (2012)).

To make the already lovely desert region look more like Mars, Scott said he later changed the color of the sky (because Mars has almost no atmosphere, it would not have blue skies like Earth), and some effects were applied to make the landscape look slightly more red.

It appears Scott isn't the first person to use Wadi Rum as a stand-in for the Red Planet. It is also listed as a location on the movies "Mission to Mars" (2000), "The Last Days on Mars" (2013) and "Red Planet" (2000).

Scott considered giving names to the cameras that Watney talks to.

More than half of the book version of "The Martian" consist entirely of Watney's internal monologue, so there was always a question of how filmmakers would translate the story to the screen.

Matt Damon plays Mark Watney in the movie "The Martian," based on the book by Andy Weir. (Image credit: 20th Century Fox)

"In a book, you're inside the head of a character," Kinberg said. "So you have the luxury or the crutch of being able to say what the character is thinking. And in a movie, usually you need dialogue between characters to express that and we didn't have that. And [Goddard and Scott] figuring out how to do that, to me, was the biggest challenge."

Scott overcame this by having Watney make frequent video logs where he would describe his status and activities. From a practical standpoint, Scott compared these video logs to the black box on an airplane, but from a human standpoint, it's easy to see how someone in such an isolated environment would find comfort in having "someone" to talk to. (There are similarities to be drawn with the volleyball Wilson from the movie "Cast Away" (2000), starring Tom Hanks.) In fact, Scott said he considered giving the cameras names (like Pete and Doug), as if they were literally Watney's silent crewmates. [5 Manned Mission to Mars Ideas]

They tried to come up with a scientifically accurate alternative to replace the Martian windstorm.

Weir worked on the book version of "The Martian" for about three years, and did an incredible amount of work making sure the science was as accurate as possible. The one glaring exception is the storm at the beginning of the film: Mars' atmosphere is too thin to drum up such strong winds. In fact, Scott said this was the one scientific note NASA sent back after it reviewed the script. According to Scott, Weir and Goddard tried to come up with an alternate scenario that would lead to the same crucial outcome: Watney's crewmates mistaking him for dead and having to get off the planet in such a hurry that they had to leave him behind.

"The alternative was terrible," Scott said. "So NASA said, 'What the hell, it's only a movie.'"

In the movie "The Martian," the astronauts must evacuate due to a storm. Mars' atmosphere wouldn't actually allow for such high winds, an inaccuracy that the screenwriter and book author tried to correct. (Image credit: ™ and © 2015 Twentieth Century Fox Film Corporation. )

What was the alternative?

"I can't remember, it was so boring," said Scott.

The author, Andy Weir, wasn't a professional scientist or a professional writer when he wrote the book.

Not many people can say they do rocket science for fun, but Andy Weir is one of them. In a short essay printed in the back of the first paperback edition of the book, Weir writes that he "[studies] orbital dynamics as a hobby. My idea of a good time is sitting down and drawing on that knowledge to imagine a space mission from beginning to end, getting right as many details as I can."

While writing "The Martian," Weir had a full-time day job as a software programmer, working on orbital dynamics and writing stories in his spare time. (He wrote two other novels before "The Martian," but he says the first one is so bad that he has deleted every copy.) Weir uploaded "The Martian" to his website chapter by chapter, getting feedback from a "small but loyal following of readers," who helped him fine-tune it. Eventually, he made the completed e-book available on Amazon.

"After that, things got a little crazy," he wrote in the essay at the end of the book. "Next thing I knew, it was one of Amazon's top five sci-fi bestsellers, and tens of thousands of people had downloaded it. Then a literary agent and publishers came knocking, and movie studios started bidding on the film rights. And ultimately, in one of the more surreal moments of my life, I found myself looking at my name on The New York Times best-seller list."

According to Goddard, Weir was slow to accept the idea that he had become a professional writer.

"We got to call him one day and say, 'Hey, I think you can quit your day job. Your life's about to change,'" Goddard said. "It was one of those special moments in Hollywood when you get to actually do that. And he didn't quit his job because he didn't believe it. For about a year. And then we went into production and said, 'No, you can really quit your day job now, it's actually happening.'"

Follow Calla Cofield @callacofield.Follow us @Spacedotcom, Facebook and Google+. Original article on Space.com.