The animation community was shocked to learn that the “Despicable Me 2” team was recasting Al Pacino’s role in the toon sequel less than six weeks before the film’s Annecy festival premiere. Though both sides are mum on the reasons for Pacino’s departure, citing “creative differences,” the larger question remains: How do you replace a lead voice in a major toon after all the animation work is complete?

“I’m not aware of any of the major animated films of the last 15 years that … has brought an actor in at such a late stage,” admits Illumination Entertainment honcho Chris Meledandri.

The role of “El Macho” had been fully voiced and animated at the stage Pacino and the studio parted ways, which sent the filmmakers back to some of the names they had considered during the casting process — including Benjamin Bratt. “He loved the first movie, and he had actually come in and done a voice audition for the role, and so we went back and we listened to that again,” Meledandri says.

Co-helmer Chris Renaud, who had directed the actors during most of the voice sessions, still felt enthusiasm for Bratt’s take on the character, so they invited him in to watch the film with Pacino’s voice (Bratt complimented the brilliance of Pacino’s performance at the film’s press day). As Meledandri remembers it, Bratt said to him at the time, “Look, there’s no question that what you’re describing to me is theoretically very challenging, but I’m curious, and I like a challenge.”

Over the course of five days, Bratt worked with Renaud and editor Greg Perler to re-record El Macho’s performance, starting with an almost mathematical approach, where Bratt attempted to precisely match the character’s mouth movements (the way an overseas actor might dub the foreign-language version). According to Meledandri, a day or so into the process, Renaud decided to switch gears, telling Bratt, “Stop thinking about anything other than what you’re feeling from this character. Stop thinking about any voice that was done before and just own it.’”

Instead of trying to match Pacino (whose facial expressions fans may still detect in the animation, which didn’t change at all after he ankled the project), Bratt focused on reinventing the character. His performance settled into a more natural vocal range and found a fresh way to inhabit the existing animation.

“I have to tell you that some of the best ADR mixers in this town, their jaws were on the ground by Day Four,” Meledandri says. “They were like, ‘I’ve never seen anything like it. You look in the eyes of this character, and you listen to that voice, and there is a complete marriage of that vocal performance and that character performance.’ Benjamin had risen to this challenge, creating something that really defies expectation.”