The way industry insiders were talking about "Dunkirk" before it opened well this weekend, you'd have thought it was a little independent art film, not a major studio's $150 million action epic with decent Oscar prospects.

Predictions for the combat tale's premiere were all over the map, from as low as $24 to as high as $38 to $40 million, though most guesses were in the 40s. After all, "Dunkirk" belongs to a genre that doesn't do well among young audiences (World War II films), addresses an event few Americans know about (since it took place before we entered the war), and features a cast of British actors known more for their prestige than their ability to sell tickets. So Warner Bros. deserves to boast that "Dunkirk"'s estimated opening weekend of $50.5 million came in above expectations.

That's an especially good number considering that "Dunkirk" faced competition for the male audience from sci-fi spectacle "Valerian and the City of a Thousand Planets," which debuted on a similar number of screens, as well as an unexpectedly strong turnout for ensemble comedy "Girls Trip," which opened with an estimated $30.4 million, about $10 million above expectations.

How did "Dunkirk" and "Girls Trip" succeed, while "Valerian" pretty much bombed with an estimated $17 million? The reasons why reinforce some lessons the box office has been teaching us all summer.

1. Brand Value
More than any of the stars of "Dunkirk," the biggest box office draw attached to the film was surely director Christopher Nolan.

After the massively successful and acclaimed "Dark Knight" trilogy and "Inception," he's one of the few directors who's a household name, one whose distinctive style promises strong visuals, epic scope, and brainy storytelling -- but with mass appeal. Even his mind bending sci-fi saga "Interstellar," which many viewers found disappointing, still made a profit while offering substantial food for thought. So Nolan's name alone may have been enough to overcome the movie's arcane topic and modest star power.

Will Packer isn't as familiar a name, but the "Girls Trip" producer also has a signature style, one that has resulted in a long string of successful, modestly-budgeted comedies with predominantly black casts. After the "Think Like a Man" and "Ride Along" movies, Packer has a loyal core audience but also attracts crossover viewers as well. Add on director Malcolm D. Lee, known for the "Best Man" movies, and African-American viewers had a solid idea of what to expect from "Girls Trip."

French director Luc Besson may be an even less familiar name here, despite such stateside hits over the past quarter-century as "The Professional," "The Fifth Element," and "Lucy." Besson fans know his reputation for butt-kicking heroines, fanciful plotting, and sensory-overload visuals. That's what he delivers in "Valerian," but Besson and the movie may have been simply too exotic to have had much impact on domestic viewers.

2. Originality
There's been a lot of talk about viewers' franchise fatigue this summer, though much of that can be chalked up to just bad movie fatigue. This week's new wide releases, however, weren't typical franchise fare. Well, "Valerian" is based on a French comic book series, but it's one that almost no one in America has heard of. The other two movies are original stories, one drawn from history but still unfamiliar to Americans. So "Valerian" can't blame sequelitis. What mattered more was...

3. Execution
Critics loved "Dunkirk," giving it some of the year's best reviews to date and a high 92 percent on Rotten Tomatoes. Audiences agreed, with the film earning an A- CinemaScore.

But ticket buyers liked "Girls Trip" even better, giving it a rare A+. (Critics liked the comedy nearly as much, giving it an RT score of 89 percent.) "Valerian," however, scored a weak 54 percent among RT reviewers and a similarly meh B- at CinemaScore. So it seems fair to say that "Dunkirk" and "Girls Trip" did what they set out to do. "Valerian," maybe not so much.

4. Genre Is a Major Draw
"Dunkirk" and "Girls Trip" were both surprisingly successful for their genre. World War II movies haven't done well as historical memory of the conflict recedes; the biggest recent hit in the genre is Marvel's "Captain America: The First Avenger." Similarly, R-rated comedies have done poorly all summer. So execution and brand value were especially important for these two hits.

Sci-fi, however, is often a crap shoot. Besson minimized the risk by spreading out the film's reported $180 million cost among multiple financiers in several countries. Still, when creating massive futuristic fantasy universes, the line between the next "Avatar" and the next "Jupiter Ascending" can be awfully thin.

5. Social Media
For a teen icon, Harry Styles is surprisingly inactive on social media. Not like, say, "Girls Trip" star Queen Latifah, who can claim tens of millions of online followers. To the extent that movies are depending on stars' social media presence to drive interest, especially among younger viewers, that made a difference.

6. Visuals
The one element of "Valerian" that critics raved about was the way it looked. But as they say about Broadway musicals, no one ever goes home humming the scenery. Then again, "Dunkirk" may have stolen its visual thunder.

Nolan got a lot of attention for his panoramic cinematography, much of it shot in IMAX and other wide-screen stock. The director also strived to create massive battle scenes the old-fashioned way, without CGI and with a literal cast of thousands. As a result, "Dunkirk" earned an impressive $11.7 million, or about 22 percent of its premiere gross, from IMAX venues.

7. Timing Is Key for Nolan's Summer Movies
Besson staked out "Valerian's" release date two years ago, perhaps unaware that he'd be up against Nolan. By the way, you'd think Warner Bros. would wait for a fall date for an Oscar-hopeful movie, but he likes July, since his Batman movies did well during the summer month. (In fact, the filmmaker insisted on the July slot, opening in a corridor similar to the one "Saving Private Ryan" used in July 1998.) Since no other Oscar-chasing movies are out now, Nolan had the field to himself.

"Girls Trip" also had no real marketplace rivals, though its makers couldn't have guessed it would benefit from being the one well-liked R-rated comedy after a string of disappointments in the genre.

8. Domestic Audiences Have Weight
"Valerian," like most of this summer's mega-budgeted movies, was not really made with domestic viewers in mind. Like those films, from "Pirates of the Caribbean: Dead Men Tell No Tales" to "Transformers: The Last Knight," "Valerian" should make the bulk of its money overseas -- though don't count on it. It could ultimately earn a profit and justify its international financing despite proving a dud here.

"Girls Trip" may not do as well abroad, since comedies tend to translate poorly. But like Packer's other comedies, as well as such recent films as "Get Out" and "All Eyez on Me," it should prove that there's profit to be made from movies that smartly target African-American viewers, and that such films can become crossover hits as well.

As for "Dunkirk," there may not have been much in the subject matter or the casting to interest American audiences. Still, the film's opening weekend shows that we'll go see a movie about an obscure (to us) wartime event as long as it's well-made, shot by a director we like, in a manner that justifies seeing it on a (very) big screen.