FORT EUSTIS, Va.  A Humvee bumps along a dirt road fringed by mountains, their snowy peaks glinting in the sun. Rifle shots crackle from a rocky bluff, signaling a Taliban ambush. Suddenly an explosion rocks the vehicle, tossing it from side to side before it bounces to an uneasy stop, smoke billowing into the cab.

This is a roadside bombing, Hollywood style. But this is no film set. The Humvee is part of an elaborate simulator that prepares soldiers for one of the most hazardous jobs in Afghanistan today  driving.

Training to defend against the Taliban’s most lethal weapon, the improvised explosive device, or I.E.D., can feel a bit like taking a ride at Disney World these days. Or watching a 3-D movie. Or playing an interactive computer game.

The simulator is just one example of how the Pentagon is trying to harness the high-tech wizardry of the entertainment industry to counter the low-tech bombs, which have killed more American troops in Afghanistan over the last two years than gunfire.