Once again, Hollywood has captured the imagination of the world with the release of the latest Star Wars film, following on the success of The Martian in the summer. One is pure fantasy, the other science-based, but both can inspire young people and scientists to reach higher.

While both films involve scientific principles, The Martian attempted to be as realistic as possible, using sets and props based on actual NASA technology designed for colonizing Mars. The habitation modules, inflatable lab and dune-buggy rovers are all on the space agency's drawing boards.

NASA scientists were also consulted to accurately represent the Martian environment, then the movie makers pushed that technology just slightly into the future to see what might happen to people struggling to survive there. That's science fiction.

Then there's Star Wars, where science fantasy will show some scientifically accurate scenes, such as planets orbiting double stars, but really, anything goes. Characters can carry lightsabers, which pack an enormous amount of energy in a handle the size of a flashlight and give light a powerful physical force, which it doesn't actually have. Spacecraft make screaming sounds and turn like airplanes in the silent, airless vacuum of space. And when the battle looks hopeless, our heroes can jump to hyperspace and escape using faster than light travel.

Then there is "The Force" itself, which only a few of the characters in the movie even understand.

The Millennium Falcon

The Millennium Falcon is one of the returning fan favourites in Star Wars: The Force Awakens. (Disney/Lucasfilm/Associated Press)

Scientists are often asked to comment on the accuracy of science-based movies. And it's fun to pick out mistakes, especially in films that are trying to be accurate — such as the powerful dust storm on Mars as depicted in "The Martian." There are dust storms on the Red Planet, but the atmosphere is so thin that even high velocity winds don't carry anywhere near the force depicted in the movie. But that storm was central to the plot, so it was overlooked for the sake of drama.

Meanwhile, one NASA scientist has come up with a better way to build a Death Star. Sure, it would be cheaper to build one out of an asteroid, but if you want to wipe out a planet, just throw the entire asteroid at it to cause an extinction event like the one that wiped out the dinosaurs. You don't need to build some incredibly expensive beam weapon.

The Martian

Astronaut Mark Watney (Matt Damon) finds himself stranded and alone on Mars, in The Martian. (20th Century Fox)

But whether they are accurate or not, science fiction and fantasy films are important because they are dreams of the future. They have the ability to inspire young people to imagine what is possible, and encourage scientists to ask, "How could we travel faster than light?" or "Can we build a tractor beam?"

Experiments such as Advanced LIGO are attempting to detect elusive gravity waves, where space-time stretches and fluctuates as Einstein predicted. If we could artificially compress space in front of a spaceship and expand space behind it, we might be able to achieve a warp drive. Of course, we are nowhere near doing that, but it's important to think about the physics of it, whether it leads to warp drive or not.

Star Wars Force Awakens Paris Disney Dec 16 2015

A character in costume takes part of an event held for the release of the film Star Wars: The Force Awakens at Disneyland Paris. (Benoit Tessier/Reuters)

Recently, a group in England created a type of tractor beam using precisely focused sound waves. It's not suitable for towing a disabled spacecraft, but it's a start.  

This week on Quirks, we speak to the author of "Ten Billion Tomorrows," which looks at many scientific endeavours that have followed science fiction.

Regardless of how accurate they are, most science-based films involve people overcoming some form of adversity, whether it's a hostile Martian environment or an evil empire. In all cases, characters use whatever technology is available, but more importantly, rely on ingenuity and determination to win the day.

As a society, we face some serious challenges as our population grows, natural resources shrink, the planet warms and the environment changes. We will need new technologies, imagination and determination to overcome these hardships. Dreams and fantasies can play an important role, pointing to new solutions as we move forward.

So, if you decide to catch a science fantasy film this weekend, let your imagination run wild — and enjoy the popcorn.