Animated films may dazzle with feats of artistic achievement, but it takes the voices of actors working in relative solitude in a sound booth to give the characters and the stories real depth. The process can take years of sporadic recording, and the actors’ performances can affect how an animated character is designed or the direction of the story itself.

Chris Sanders, co-director and co-writer of DreamWorks Animation’s “The Croods” along with Kirk DeMicco, says the development of Eep, the strong-willed, rebellious Neanderthal teen, was greatly influenced by Emma Stone’s performance.

“We always use live-action reference whenever we record actors … on the off-chance we’ll see the actor do something and we want to capture the essence of movement or character when it does happen. And it never happened more than with Eep’s character,” he says. “Emma Stone is an extremely animated human being and many times during a recording session, we’d make a note on the script to show Eep’s lead animator Line (Andersen) to make sure she saw this particular character trait.”

Stone says she was surprised by how much more physical recording the role was than she thought it would be. “I could be a lot more exaggerated” than in a live-action film, she says.

Stone notes that she changed Eep’s voice about halfway through production. “It started out much higher, but when I saw how she was evolving, I thought she should have a deeper voice and (Sanders and DeMicco) were very open to that.”

Chris Buck, who co-directed Disney’s “Frozen” with scribe Jennifer Lee, says they had similar experiences with their actors. “Josh (Gad) did an amazing amount of improv for Olaf,” he says. “We just let him go and we knew we were going to get gold.”

Buck also credits actor Jonathan Groff with changing the direction of the character of Kristoff, the mountain man. “We were looking for something a little more gruff, voice-wise,” he says. “Then Jonathan came in with a warm and wonderful voice. Jen rewrote Kristoff because we loved his voice so much.”

Buck says there’s a lot of collaboration between the directors and the actors that can affect the story. “They’ll come in and give ideas,” he says. “If it’s a good idea, we’ll go down that road. Whatever it takes to make the scene stronger. That’s our job.”

Chris Renaud, co-director of Illumination’s “Despicable Me 2” with Pierre Coffin, agrees.

“We always work to include (the voice actors) in the evolution of our story and script,” Coffin says, adding, “they very often have keen insights into the character and are able to riff on their scripted lines to make them their own. We encourage that kind of spontaneity since it helps create a more believable character.”

Voice acting in an animated film can be a solitary affair, with a single actor recording the role in the booth without fellow actors present. But several of the directors say they’d be in the room with the actors to give them someone to play off.

“Chris and I actually sit right in the room with the actors,” DeMicco says. “I think it allows us to feel the energy in the room and get a flow going with the actors.” Nicolas Cage, who plays Neanderthal patriarch Grug in “The Croods,” appreciated that, he adds.

Sanders and DeMicco were thrilled to get the cast they had in mind when putting together “The Croods.”

“The idea for the actors that we’d love to put in the roles comes very early in the writing process,” says Sanders.

That wasn’t the case for “Frozen.” “We actually went to New York and here in L.A. (to audition actors) because it’s a musical and we wanted people who could sing,” Buck says.

Kristen Bell, who plays the adult Anna in the film, was one of the first to audition and one of the first cast. “It was a surprise to find out how good a singer she was,” says Buck. “We loved her voice and we loved her spirit.” And for Anna’s cursed sister, Elsa, the filmmakers turned to Broadway powerhouse Idina Menzel.

It’s very rare for an animated film to have a hiccup in casting late in the process. If something is just not working, it’s usually handled before the production process has gone too far. But for the team behind “Despicable Me 2,” it almost was too far along. Al Pacino had recorded all his scenes as the shifty El Macho when he parted ways with the project over creative differences. This was less than six weeks before the film was set to premiere at the Annecy Film Festival.

Co-helmer Renaud has nothing but praise for Benjamin Bratt, who came in on short notice to re-record the role.

“The challenge for replacing a performance late in production is matching the animation with a new actor who is working to craft his own take on the character,” Renaud says. “Benjamin Bratt was able to execute such a flawless vocal performance that we did not have to reanimate a single shot. He also gave a sense of authenticity to this bigger-than-life, cartoonish supervillian.”

As poet Maya Angelou once said, “Words mean more than what is set down on paper. It takes the human voice to infuse them with deeper meaning.”