Shuttling among the realms of jazz, classical and rock/pop over his career, Chicago native Herbie Hancock has occasionally veered off in other pursuits; his latest creative diversion, a supporting role in the sci-fi epic “Valerian and the City of Planets,” opens July 21.

Herbie Hancock and Luc Besson on the set of “Valerian and the City of a Thousand Planets.” | Photo: Lionsgate/Europa Films

Directed and written by Luc Besson, “Valerian” marks Besson’s return to science fiction 20 years after his pioneering “The Fifth Element” (1997). It co-stars Hancock as a defense minister guiding the mission of two space operatives played by Dane DeHaan (Valerian) and Cara Delevingne (Laureline) as they race to save the universe from sinister forces.

Best known as a pianist, composer and music visionary, Hancock has a few acting roles on his resume, including a part in the jazz biopic “Round Midnight” (1986), but “Valerian” is a change of pace. Besson cast Hancock, whom he regards as a longtime influence, because “[he] is a legend,” as the filmmaker wrote last year in an Instagram post. “His music was my only friend at 14. … I learn so much listening this genius… I’m proud to have him for a role in ‘Valerian.’ ”

Hancock, who’s the middle of a European tour, returns to the States next month for a series of concerts, including a date Oct. 21 for an SCP Jazz show at Symphony Center. “Visually, it’s like … the most far out sci-fi experience that I have ever seen,” Hancock said in an interview with the site Electronic Urban Report. “Like, the most far out on steroids of sci-fi. I’ve never seen anything this mind-blowing ever. And I’m a sci-fi freak. I’ve seen everyone that I could possibly see, and this is beyond any of those. But it’s not just a visual experience. The film ‘Valerian’ has so many messages about humanity, about compassion, about female empowerment. That’s a very important message.”

To read the complete interview, click here.

Trailer for “Valerian,” with Herbie Hancock appearing at the 27-second mark (courtesy of Lionsgate/Europa Films, via imdb.com)

TOP: For his role in “Valerian,” Herbie Hancock often appears on a digital monitor. | Photo: Lionsgate/Europa Films