The first third of Aftershock tests both our patience and ability to watch pretty people sling cheesy lines across the dance floor.

Sure, co-writer and star Eli Roth serves up some pithy laughs, but the funny banter can’t distract us from vapid people canoodling in egregious fashion. Or so we think. There’s a method to the film’s hard-partying madness, one not immediately evident even after that first quake strikes.

Aftershock tricks us with its violent tonal shift, but the emotions we feel for the hapless partiers stuck between Mother Nature and some nasty survivors is palpable.

Roth stars as an American tourist in Chile hanging with his Chilean buds (Nicolas Martinez and Ariel Levy). The trio dance, and flirt and crack wise until a massive earthquake rocks the disco and sends structural beams crashing onto the dance floor.

It’s chaos, plain and simple, and we see Roth’s genre fingerprints in play as several partiers die quick, very painful deaths. The gruesome sequences suggest an offshoot of Roth’s ugly Hostel franchise, but instead director Nicolas Lopez takes control of this savvy indie offering. It’s rare to see a disaster film on such a small budget, reportedly around $2 million. But the shocks are both economical and real, even if the film’s bleak tone will offend non-genre fans.

Aftershock scores not just with its relentlessly ugly trappings, but how it makes us cheer on both the trio of lusty males and the women they connect with before the earth starts to shake. And we’re not bludgeoned by any overt, anti-American jibes along the way.

When the body count starts a rising, we have a vested interest in the raw numbers, something viewers may not have expected during the film’s oft-labored opening.

Martinez is the sweetest surprise here. The actor dons an officially licensed Zach Galifianakis beard but brings an empathy to his role that lesser actors may have pushed aside for easy laughs.

Roth is better known as a director than star, but he gives his character’s slim backstory depth and proves an unconventional leading man, at least in a film where falling debris is his co-star.

Aftershock shows the ugliest side of human nature, but its crackling second half makes the experience oddly uplifting. Here’s a summer movie that doesn’t need a huge budget, marketing machine or fast food tie-in.