The most startling visual effect in Marvel’s “Captain America: The First Avenger” isn’t any bit of superhero derring-do but rather the sight of star Chris Evans shrunk down to a proverbial 97-pound weakling.

In “Captain America,” scrawny World War II recruit Steve Rogers is transformed by a “super-soldier” serum and “Vita-rays” into a tall, muscular stud with enhanced physical abilities.

Popular as the effect is, there’s been plenty of confusion about how it was done. Some have assumed it was a “Benjamin Button” style head replacement on a skinny body double. Others thought it was forced perspective and careful camera placement, a technique Peter Jackson used to make actors appear Hobbit-sized in “The Lord of the Rings” trilogy.

In fact, it was a combination of digital effects techniques — and the one used most represents a step forward for the vfx art.

Lola Visual Effects, the Santa Monica-based studio that specializes in digital cosmetic enhancement, did Evans’ slenderizing. Lola vfx supervisor Edson Williams says the company’s f/x techs used three separate techniques.

For about 5% of the shots, he says, Evans’ face was digitally attached to a body double, Leander Deeny, using the same method developed for “The Social Network” to put Armie Hammer’s face on a double. For another 10% or so, Evans’ head was attached to Deeny’s body, “Benjamin Button” style.

But the vast majority of shots, according to Williams, were done by digitally shrinking Evans’ own face and body. “That was mandated by the director and the studio, because they wanted Evans’ performance,” Williams says.

Evans, too, resisted the use of a body double except where absolutely necessary. So the Lola team had to invent a method for shrinking him down. They nicknamed the approach, “Steve slimming.”

On the set, the camera team captured each shot three times: Once with Evans doing the performance, once with Deeny doing his best to match Evans’ performance, and once “clean” — without the character of Steve Rogers in the shot at all.

Without motion control rigs, the different versions of the shot didn’t match perfectly. That sped up shooting and saved money in production, but made Lola’s work somewhat more expensive and difficult.

“In post, we’d decide (which of the three styles) was the best technique,” Williams says. “If it was at all possible, we did the ‘Steve slimming.’?” That entailed starting from the original shot of Evans doing the role, then shrinking him down.

One unexpected problem: Evans’ bulked-up arms were simply so big — “like tree trunks” says Williams — that in profile they’d block as much as a one third of his body.

“So we had to replace the fabric and the shirt and whatever was behind his arm with something,” says Williams. “That was by far the most challenging part.”

The Lola team also altered Evans’ face for those “skinny” scenes, shrinking his jawline. “It’s a tricky thing to do,” says Williams, “because if you start adjusting (face) geometry incorrectly, you’ll start getting feminine traits. Like the corner of the eyes: Do they go up or down? If they go down, it’s more masculine. If they go up, it’s more feminine.” Adjusting the shape of the face also could subtly change Evans’ performance, and it took many watchful eyes to ensure that his expressions translated properly.

Even when Evans’ digitally altered face was attached to Deeny’s body, the slimming process was involved, Williams says. “They cast this incredibly skinny guy to be skinny Steve Rogers, then decided to make him even skinnier. On the head replacements, we had to slim down the slim body.”