In the past year, Chris Hemsworth has appeared onscreen as an emaciated sailor, a supersized Norse god, and a fleet-footed hunter. Depending on the demands of each role, he’s had to either quickly drop weight, add muscle, or improve his agility.

The key for him—and for all of us—is to figure out the best way to eat and train to achieve results. It helps, of course, to have a live-in trainer and nutritionist like Hemsworth does.

(For a great total-body workout that will help you blast belly fat at home, try THE 21-DAY METASHRED—one guy lost 25 pounds of fat in 6 weeks!)

That would be food and fitness guru Luke Zocchi. To lose 30 pounds for In the Heart of the Sea, the 6’3”, 200-pound actor’s eating plan emphasized foods that were low in calories and high in nutritional density.

Hemsworth, who appears in the May issue of Men's Health, took in as few as 500 calories a day for four weeks to reach his goal.

“It was lots of big vegetable soups and giant salads,” he said. “You feel like it’s a large meal and you have a sense that you’re filling up.” That’s what helped him stick with the plan, he said.

“The problem is that you’re underfed. The challenge is not physical but emotional,” said Hemsworth. He endured the extreme diet by joining forces with other actors in the movie.

Related: 5 Ways to Lose Your Spare Tire—and Keep It Off For Good

“We were losing weight together—the bond we formed was incredible. It reminded me of being on a football team growing up, where we’d do anything for each other.”

During his diet, Hemsworth did daily bodyweight drills to maintain some muscle mass. But as he transitioned to playing Thor in Avengers: Age of Ultron, he added in heavy weights and isolation exercises to gain back the lost muscle and jack up his arms.

Related: 4 Ways to Build Bigger Biceps—Fast

To guarantee muscle growth, Zocchi had him slow the tempo of every lift to maximize the amount of time the muscles were under tension.

For example, he might do 3 sets of 12 lifts where the eccentric phase—the lowering of the weight—takes three seconds. Then, on the fourth set of 12 reps, he’d go very slow—eight seconds.

“We do that for the shoulder press, bench press, standing bar curls, and skull crushers,” Zocchi said. Hemsworth also did lots of pullups with varying hand positions—underhand, overhand, mixed, wide, narrow—on a bar or with gymnastic rings.

Zocchi also flipped the eating strategy: It still emphasized nutritional density but with more chicken and fish, and daily protein smoothies.

When he’s not trimming down or bulking up, Hemsworth said he prefers to be lean, fast, and functionally fit.

Hemsworth’s latest movie, The Huntsman: Winter’s War, opens Friday, April 21. The role required more athleticism, so Hemsworth cut back on the smoothies and isolation lifts and did more body-weight circuits and cardio work—specifically boxing drills and ab circuits.

Hemsworth likes to put on a harness connected to high-resistance bungees (ankorr.com) and do 3 to 10 three-minute rounds of shadow-boxing. Between rounds he does 30 seconds of bear crawls.

To carve his core, he does 4 rounds of this circuit: Hang from a bar; bring your knees to your chest 15 times; move your knees side to side 15 times; raise your knees to your chest and hold for 30 seconds; rest 40 seconds.

Like any good Australian, Hemsworth also surfs. He recently moved with his wife, the actress Elsa Pataky, and their three children to Byron Bay in southeastern Australia.

The ocean temperature there averages 74 degrees Fahrenheit year-round, so he has plenty of opportunity to get on his board.

Hemsworth enjoys competing on the waves with his father and two brothers, Liam and Luke. While bragging rights are important, so is the time catching up with them.

“Sitting on our boards out in the ocean beyond where the waves break waiting for the next set, you can forget about everything,” he said. “It’s a great place to talk and have a laugh.”

(Get the May issue of Men’s Health, available now at the iTunes News Stand.)

This article originally appeared on MensHealth.com.