The actor dialed in his diet and training for a beastly transformation. Here's how he did it.