Director and writer M. Night Shyamalan's latest movie, the superhero-mystery film "Glass," is expected to top the Hollywood box office as it hits theaters this weekend.

If that is indeed the case, then the movie, which is a follow-up to previous Shyamalan films "Split" (2017) and "Unbreakable" (2000), would represent the latest chapter in the director's own epic comeback story.

Much like many of his films, Shyamalan's career turnaround has featured its share of wild twists and turns, starting with his 1999 breakout as the writer and director of the massively popular supernatural thriller "The Sixth Sense," which made over $670 million at the global box office and earned Shyamalan an Academy Award nomination for his work as director.

From there, Shyamalan released multiple popular movies in the early 2000s: "Unbreakable," "Signs" and "The Village."

But a series of poorly-reviewed films (including 2006's "Lady in the Water" and 2008's "The Happening") followed by a pair of complete financial flops (2010's "The Last Airbender" and 2013's "After Earth" with Will Smith) left Shyamalan's career in serious jeopardy.

(Mega-star actor Will Smith said "After Earth" was "the most painful failure of my career" and Entertainment Weekly wrote that Shyamalan had "lost credibility with audiences" after that film. The movie had a budget of $130 million and grossed only $60 million domestically, though it made more overseas, according to Box Office Mojo.)

In a commencement speech at Drexel University in 2018, Shyamalan told graduates that he experienced a great deal of self-doubt in the period that followed his string of box-office failures. Describing his thinking at the time, he said in his speech: "I find myself questioning myself, and every thought that comes out of my head," he said. "The world of my industry decides I have no worth. I am a cautionary tale. A person who got lucky for a time but revealed himself to be a sham."