Luc Besson’s Valerian and the City of a Thousand Planets opens with an utterly charming montage set to David Bowie’s “Space Oddity.” It depicts several hundred years of future history, as country after country after country join the International Space Station, eventually incorporating extraterrestrial cultures as well. After a while the ISS, now called Alpha, is a massive ad hoc city in space; a cobbled together urban monstrosity that has actually become a physical threat to the safety of Earth. So off it goes, drifting through the cosmos, home to thousands of races. This sequence is funny and beautifully designed, filled with colorful weirdness, setting the stage for the colorful weirdness that follows. The story that weirdness is wrapped around turns out to be pretty conventional, and a tad clumsy at times, but that doesn’t matter that much when what works works this well.

The film picks up with special operatives Valerian (Dane DeHaan) and Laureline (Cara Delevingne) pulling a heist on behalf of the human government. The prize: an adorable little critter that poops pearls. Really. And it’s the last of its kind. This sequence is set in a massive interdimensional marketplace (“Thousands of stores!” squeals one Earthling tourist.) which people in our universe can view and interact with using augmented reality helmets. The whole premise starts making less and less sense as the action gets started, but it’s inspired and breathless and overall a real hoot. This sequence might be the highlight of the film, and it establishes a set of themes the film keeps circling around: imitation, illusion and simulation.

After the mission takes them to Alpha, things become more conventional, with our dynamic duo working with military brass to figure out what’s going on with a mysterious radioactive no man’s land in the heart of the city. But the city! Oh, the city. It lives up to its moniker and is beautifully realized, immensely diverse and filled with detail. One assumes any future Valerian adventures will take place in a different location , but you could tell endless stories in Alpha. Valerian and Laureline’s mission takes them through surreal red light districts (featuring Ethan Hawk as “Jolly the Pimp”), Gilliam-esque automated computer banks, and massive underwater caves inhabited by giant leviathans with psychic jellyfish stuck in their blowholes. And you feel like you’re seeing only glimpses of what’s going on in this sprawling, chaotic town. It’s like a bonkers space opera version of Hong Kong’s Kowloon Walled City.

Again, the story becomes a bit bogged down in convention, but its core is an earnest endorsement of love and forgiveness. It sounds trite, but with the world the way it is now I can do with this kind of thing. The story is also redeemed in part by its shagginess — Besson isn’t afraid to go off on tangents which, in another film, might be considered storytelling fumbles. At one point our heroes are pulled into what might be called, to use the video game term, a side quest. It involves a race of corpulent, xenophobic aliens and a shape-shifting sex worker played by Rihanna, and it could be cut out entirely without affecting the rest of the film. But some of the movie’s best moments are in this stretch, and that it’s a digression feels of a piece with the setting and what Besson’s doing.

The weakest point in all this is, sadly, Dane DeHaan. I’ve never seen him in anything else, so I wouldn’t be surprised if he’s a fine actor, but he’s woefully miscast as Valerian. The comic this was adapted from is called Valérian and Laureline, but with Laureline cut from the title it seems the focus is supposed to be on him. He doesn’t have the hero charisma to pull off this elite special ops badass ladies man character. It doesn’t help that, despite being thirty-one years old, he looks like his voice could crack at any second. Cara Delevingne is fine as Laureline. She’s certainly given more to work with than she was in the godawful Suicide Squad, or at least she wasn’t asked to do that goofy magical light pillar dance. She’s understated but fun in this role, so it’s a bummer that she plays such a second fiddle to DeHaan throughout most of the film. She even ends up the damsel in distress for a bit, which is very disappointing. The romantic aspect of their relationship is poorly sold: It’s a thing because the movie demands that it be a thing, chemistry be damned.

Valerian and the City of a Thousand Planets is a passion project on the part of Luc Besson. He’s been working on this for years, and it shows. Much like his classic The Fifth Element, it’s a spectacular showcase of production design, visual effects and overall quirkiness. Unfortunately it doesn’t have anything comparable to Bruce Willis’ charismatic performance to anchor it, so I have my doubts about how it will go over with popular audiences, which is a shame. Despite (or perhaps because of) its rough edges, this is the kind of weirdo audacity that we need to see more of in blockbuster cinema. We can’t rely on James Gunn for everything.