Like “Up,” about a septuagenarian coping with the loss of his wife, “Inside Out” seeks to both entertain and leave viewers with a deeper understanding of themselves. The success of “Up,” which took in $731 million worldwide in 2009, is one reason Pixar was willing to let Mr. Docter tackle another sophisticated story, part of which will undoubtedly go over the heads of young viewers. “Inside Out” again finds Mr. Docter grappling with loss — the end of childhood bliss.

“We knew from the first pitch of this idea that it had the potential to be really special, but in the same breath we knew it would be really hard,” Mr. Lasseter said. “It turned out to be one of the most difficult films we’ve ever made.” As for the bumps along the way, he said: “We’re always tearing up work and starting over. At Pixar, we trust our process, and we trust each other.”

If anyone could pull it off, said Ed Catmull, Pixar’s president, it was Pete Docter. Perhaps more than anyone at the studio except Mr. Lasseter, the shy Mr. Docter is imagination incarnate. “But it’s not just creativity,” Mr. Catmull said. “Pete has always had an intense focus on emotions, and the ability to convey those emotions to those he works with and to the audience.”

With his first film in 2001, “Monsters, Inc.,” Mr. Docter set out to answer a question: What if the creatures under your bed were really nice guys? “Up” made tying balloons to a house and floating off into the South American jungle believable. Mr. Docter, who is married with two children, also has writing credits on “Wall-E” and “Toy Story.”

“I guess you may know that he lives in a tree house,” Mr. Catmull said dryly in response to a question about Mr. Docter’s childlike, cynicism-free sensibility.