Six years ago writer-director Pete Docter and producer Jonas Rivera scored one of Pixar’s biggest successes with “Up,” which won the Oscar for Best Animated Film of 2009. Now they’re back with “Inside Out,” which portrays the reactions of the five dominant emotions—Joy, Sadness, Anger, Fear and Disgust—within an eleven-year old girl’s brain as she deals with a variety of adolescent problems, spurred by a cross-country move.

In a recent Dallas stopover with Rivera, Docter explained that the idea for the script came as he watched his own daughter’s mood swings. “She saw the film the other day,” he remarked, “and she came out and said, ‘Good movie, dad.’ You know, she’s sixteen. She was really a rambunctious, energetic little kid, kind of goofy and funny, and then as she got older, she went into this quiet zone—that’s what started this film. It’s pretty wild watching them grow and change, and that’s what this movie is about.”

As to the five emotions that were eventually selected for personification as the basic ones, Docter said, “There’s no consensus [among scientists]. But I think the one most would agree on are the five that we chose. The really important thing that emotions give us is a connection between each other. It’s really the emotions that give those relationships depth.”

Rivera added, “We also found in the research that no one is more socially aware of external cues on the planet than an eleven to seventeen-year old girl, scientifically.”

Once the idea took hold, Docter and his colleagues led their imaginations run wild about the inner workings of the girl’s brain. “It felt like our little sandbox, where we just put whatever we want where we want,” Rivera said.

And Docter continued, “As usual, you come up with a big long list, and most of them get thrown out. Like in Imagination Land and, we had a bunch of stuff.”

“You start sorting it out due to storytelling,” Rivera added, noting that some ideas were painful to reject. “The ‘stream of consciousness,’ that’s what I sort of miss. We had this idea that like the ‘train of thought,’ there’d be this slow ‘stream of consciousness’ moving through the [inner] world, and I thought that was really beautiful. But again, there were so many ingredients…”

“…the story got really long,” Docter said, completing the thought.

But the process wasn’t simply a matter of imagination. “We talked to psychologists, psychiatrists and neurologists—folks that could really help us identify which [emotions] there were and what jobs they had,” Docter said. “I actually wrote up character descriptions. Some of them were kind of quirky, like ‘Anger likes meat.’ Then we gave all that stuff to the character designers, and they just drew, literally thousands of drawings. Some of them were great, but didn’t quite work for one reason or another. The characters kind of evolved and got honed over the months.

“I remember the idea that Fear would be very conservative—he’s prepared for everything,” Rivera added. “That just manifested itself in the design. Even in their shapes and colors they sort of echoed the [idea].

“We also thought about idioms and phrases that we use,” Docter added. “Like ‘I feel hot under the collar,’ or ‘I feel blue,’ that could be clues about how they’d look. The job is to take this very abstract idea and make it physical.”

In addition to the emotion characters, the creators had to imagine the look of the control room where the emotions did their work, including arranging memories.

“The first idea was that the memories would be in jars, like mason jars. It seemed kind of cool,” Docter recalled.

Rivera added, “I remember someone drawing it almost like a snow globe, and that felt more lyrical and beautiful. It just felt right.”

Of course, once the look of the settings and characters is decided, voices have to be added.

“That was a fun part, actually casting the movie,” Rivera said.

“Some of them were a little more obvious—even as I would pitch the idea, I’d say ‘Think of the fun we’ll have when we get to voice casting—like imagine Lewis Black as Anger,” Docter recalled. “Other ones we found relatively late. Joy was probably the toughest to write for, because Joy as an emotion could lean a little annoying, wearying. We struggled with that for awhile, before we finally said, ‘Let’s talk to Amy Poehler.’ We were pretty upfront with her about our difficulties, and she said, ‘I think I can help you guys.’ Her character in ‘Parks and Recreation’ is similar in that she’s an overachiever, and I think some of that is what makes Joy sympathetic.”

“Amy could really thread that needle,” Rivera noted.

“She and Bill Hader, and to some extent Mindy, were really involved in writing as well,” Docter said. “We spent the lion’s share of the work crafting the story, the structure, the sort of emotional bedrock. Then we’d go to those guys and talk about individual lines. ‘Can we make this funnier? Do you have any ideas for adjusting this?’”

Rivera emphasized Hader’s contribution: “It turns out he’s a huge animation fan. So we met him and just talked about animation, and we ended up bringing him on just as a writer, and then we said, he has to be in this movie. He had this idea that Fear was like Barney Fife, like Don Knotts. He was the perfect fit.”

As usual on animated films, the voice cast recorded their lines individually—most of the time. “For scenes that they were together on, we got Amy and Phyllis [Smith, who plays Sadness] to record together a couple times,” Docter remembered. “People aren’t aware of this, because the illusion is so successful, but you record all these people separately, in different cities and different months, and then our editor Kevin Nolting puts it all together in a way that makes you feel they’re actually conversing. That’s all a complete illusion.”

Toward the close, the conversation turned to Pixar, and its amazing success in producing a series of smash hits.

“We have amazing people,” Docter said. “But they’ve also crafted a system that allows us to make the calls. Unlike most studios, where the creative calls are sometimes driven by executives who are not actually storytellers—they’re more businessmen—in our case John Lesseter is the final, final word, and he’s a filmmaker. He’s always thinking on behalf of the audience.”

Rivera added, “He’s an executive, but he thinks and responds as a director. I’ve only been at Pixar, but it seems from everyone I’ve spoken to, that’s rare. The other thing is that Pixar gives us the time. We only release the movies when we think they’re good enough to release. That’s how we think it should be done.”

Docter continued, “And they know that we’re going to make mistakes. At some point every one of our movies sucks. And we’re not just being modest. It’s genuine. They’re not very good. And thankfully everyone believes in us and the concept enough to move it forward and build on that, and the next time it sucks a little less, and then you go forward until finally by the time it comes out, it [doesn’t]. We had eight different screenings of this film building up to the one that we made. That’s like performing off-Broadway or something, where you can really kind of test-run it.”

“By screening four of this movie, if you saw it, you’d probably be shocked at how [bad] it is,” Rivera said. “It’s not good. We were proud if it at the time because we knew it was on its way. We showed it to Disney [people] sometimes too, and instead of them going ‘Let’s kill it,’ they believe in us and John and our group’s ability to take something and build on it and find the pieces that work and push it through. We give ourselves that runway, and I think that’s why the films tend to work. The studio should get a lot of the credit. The structure…makes it possible for us to kick these films around until they’re ready.”

He added, “After five years’ work, even if no one saw it, we’d be proud of it. I grew up loving Disney movies and wanting to work for Disney. So it’s such a dream come true to be able to make these films. And people so far seem to like this one.”

If the early reviews are any indication, that’s a real understatement.