All Pixar movies suck.

No, that’s putting it too mildly. Let me, in the true spirit of Pixar, take another crack at that:

Arguably no film studio in the world expends so much energy actively trying to fail. And succeeding at it. Time after time, in 15 mostly acclaimed feature films over two decades, Pixar’s history is littered with big and beautiful and once-treacherously unwieldy failures — epics of initial underachievement and momentary monuments to the quagmire of the creative mind.

The difference between this legendary animation studio and mere mortals, however, is that Pixar knows that fact, embraces it — and then, by bravely going back to the drawing board, proceeds to spin its closeted failures into open mastery and pioneering achievement and Oscar gold. As Mark Andrews, who shared an Academy Award for directing Pixar’s “Brave,” once told me: “Fail as fast as you can and fail often — so you figure out what you need to do to get it right.”

In stating those words like an in-house mantra, Andrews credits the credo to filmmaker Andrew Stanton, one of Pixar’s foundational brains and a two-time Oscar winner, for “WALL-E” and “Finding Nemo.” And that fight-toward-rightness spirit is shared by Pixar co-founder Ed Catmull, who has said: “Every one of our films, when we start off, they suck. … Our job is to take it from something that sucks to something that doesn’t suck. That’s the hard part.”

But just how does Pixar do it? How does this playful Bay Area den of animation wizards time and again convert failure to something enchanting and magical and profoundly human? How did they become perhaps Hollywood’s greatest practitioners ever at the Art of the Unsuck?

Well, for some of the most illuminating clues, look no further than Pixar’s latest, “Inside Out,” a former in-house “catastrophe” that opened this weekend to near-unanimous critical praise and some record-breaking early box-office returns for the studio. The film from another of the studio’s core minds, Pete Docter — director of “Monsters Inc.” and the Oscar-winning “Up” — is, as metaphor if not as achievement, the most Pixaresque film yet. As story, “Inside Out” is about the fragile emotional world inside an 11-year-old girl’s mind; as allegory, though, the film spelunks deep into the cerebral workings of Pixar itself.

So with the studio’s newest hit as a road map, let’s go exploring within the collective cavernous mind of Pixar. Oh, and you won’t need that light. Where we’re going, the path is lit by the passionate habit of brilliance.

1. ‘It’s like working for NASA’

It is, quite literally, a central image in “Inside Out.” Five brightly tinted humanoids embody differing emotions within Headquarters, the mental center where memories are made like racks of translucent bowling balls. And this quintet of emotions — Joy, Fear, Sadness, Anger and Disgust — stands at a console, vying for control of its girl. It is, in the truest sense of the term, the “brain trust.”

Now, perhaps it’s just coincidental, but Pixar’s storytelling genius was built from the get-go on what its employees commonly refer to as the Braintrust. And as the studio was launching into its first feature film, “Toy Story,” a quarter-century ago, precisely five minds were cited as the organic core of that creative brain trust: Stanton, Docter, Lee Unkrich, Joe Ranft and Pixar co-founder John Lasseter. These were visionaries who had emerged from Cal Arts and USC, and some of whom had been recruited to Disney by one of that studio’s legendary “Nine Old Men,” influential animator Eric Larson (who was said to care for his characters “like human beings”).

Now, this isn’t meant to paint the Braintrust’s initial members as emotional archetypes — though Docter does cop to essentially being Joy — but the First Five did each bring distinct strengths to the teaming, and the group grew more varied as gifted leaders like Brad Bird (“The Incredibles,” “Ratatouille”) and Bob Peterson (“Up,” “Finding Nemo”) came aboard and ascended.

“They’re all different personalties,” Pixar’s Angus MacLane (“WALL-E”) once told me of the Braintrust. “You see different themes. John [Lasseter] is very much about friends and families and the importance of community, and he [creates films] similar to that. … It’s like different family members have different quirks. As you go into battle, you get used to them.”

And that idea of going into cooperative battle is central to Pixar’s excellence. Only through crucibles of brutal candor can the Braintrust help a film fight for breakthrough after breakthrough. And only through the perpetual hammering out of ideas, over years, can the cinematic gold be discovered.

Michael Arndt, the Oscar-winning screenwriter of “Little Miss Sunshine,” appreciated the power of this collaboration when he was brought aboard to help write “Toy Story 3.” “This script is so dense and so ripe with invention, there’s no way I could have written this by myself … ,” Arndt has told me. “I’m just one guy on a large team. There is so much manpower and brainpower applied to these scripts — it’s like working for NASA.”

Not even NASA is infallible, of course, whether the storytelling mission is the equivalent of Apollo 11-Year-Old (“Inside Out’s” life of Riley) or trying to determine how Buzz Lightyear should deal with feeling obsolete.

“Some directors don’t like working in a group — the project can spin off if ideas aren’t helping. But I like it,” director Andrews told me after he was brought aboard midstream to steer the Oscar-winning “Brave” into port — after the Braintrust ousted director Brenda Chapman over creative differences.

“You have to know how to control your room,” Andrews continued. “And how to be able to say: ‘That idea is totally stupid and invalid.’ That’s what you’ve got to do. I see it happening in the Braintrust. … The director has to sift through it and find the answers and be able to say: “I don’t want to do what John [Lasseter] says, or Andrew [Stanton’s] way to do it. They’re all fallible. And they’re all just trying to help…

“It’s not about any one person. My job as director is to recognize the answers. The solutions are like assists.”

Dan Scanlon, who directed “Monsters University” — the sequel to Docter’s “Monsters, Inc.” — trusts the greater wisdom and feedback of the Braintrust, even if he must ultimately find the exact answer himself. “When it came time to get help, I saw how their gut [instinct] is always right,” Scanlon has told me. “It’s not always the right solution, but they’re right when pointing out the problem.”

And that doesn’t mean the Braintrust, like some sentient robot in “The Incredibles,” can apply the same lessons to every film. There are no easy formulas.

“Story is the alchemy of turning lead into gold,” Andrews has told me. “Once you get to gold, some people say: ‘We can just make it gold every time.’ But that’s not going to work. You have to start from scratch every damn time.”

2. Docter in the house

“Toy Story 3” was Pixar’s 11th film, and in some ways was like the 11-year-old Riley at the beginning of “Inside Out”: a warm, engaged, joyous presence to behold — before studio skies turned a bit grayer. In 2010, the third “Toy Story” film capped a four-year run of brilliance perhaps not seen since midcentury Disney, when Uncle Walt’s Nine Old Men were helping crank out classics. “Ratatouille,” “Wall-E,” “Up” and “Toy Story 3” gave Pixar a consecutive winning streak of Oscars. Ever since, though, with two sequels (“Cars 2” and “Monsters University”) sandwiching “Brave,” some critics said the studio was losing some of its creative mojo.

Docter’s “Inside Out,” however, has been hailed as a masterful return to form — and should reinvigorate many fans who cherish Pixar for its the depth of feeling and its commitment not only to tickling the funny bone, but also striking a nerve. For every guffaw, a tear must fall.

Ever since his work on “Toy Story,” starting at age 21, Docter has imbued his films with the personal. His moving “Ellie’s Theme” montage from “Up” is considered a creative pinnacle — “the five greatest minutes in animation history,” says Pixar’s Peterson. Docter, like some others in the Braintrust, entered the animation industry by mining his childhood; eventually, though, they also begin to tap the poignancy of parenthood. Pixar artists, in other words, are generously giving us a piece of themselves.

“We just try to be sincere with people,” Peterson has told me. “I’m a dad and I’ve got three kids. You have to pay attention to relationships and interactions and to what happens between people. It’s just a matter of this funny idea and a simple plotline — then really pay attention to what would people normally do. What would a person do if they got fired? Or lost their car?”

At the center of that — what viewers can detect, whether it seems authentic, or instead rings artificial — is the quest for human truth, even if it’s being portrayed by a toy, a bug, a robot or a talking dog.

“You tell the truth of how people would react,” said Peterson, who co-wrote the story for Pixar’s “The Good Dinosaur,” due out later this year. “We’re always concerned about the relationships — are we telling the truth? Jokes are one thing, but we sacrifice thousands of jokes if they get in the way of the emotional narrative.”

(And his use of “sacrifice” is no overstatement: Lore surrounds all the months and years of cutting-room footage from Pixar films — whether it was re-navigating “Finding Nemo” or the overhaul and rescue of “Ratatouille.”)

As parents and grownups still vividly in touch with their childhoods, the gifted artists at Pixar know that the most universal chords to be struck revolve around change and its companion that is loss; around innocence and experience; around the necessity of relationships and the inclines and declines of life. And around the fact that Joy leavens our lives, yet Sadness deepens the journey. In striking these chords, Pixar plays an emotional symphony of dualities.

Never so literally as in “Inside Out,” for example, has Pixar depicted the embodiment of “for every laugh, a tear.” (Sadness is even shaped like a teardrop.) And perhaps never so literally by Pixar have we seen a many-voiced brain-trust rendered as a necessary engine toward growth, be it emotional or creative.

Consider the “Inside Out” character of Joy, as voiced by Amy Poehler. She was written as eternally upbeat, forever pushing and pushing, to the point of irritation, Docter says. “Once we discovered this, [co-writer] Meg LeFauve said that Joy needed to have moments of vulnerability … so we can root for her.”

3. The last laugh, the final cry

So why do we laugh, and tear up, and laugh again at a film like “Inside Out” or “Toy Story”?

Well, for “Toy Story 3’s” Arndt, it helps to employ emotional misdirection. “You want the audience to be uncertain at some point about Woody’s loyalty,” he once told me. “You have to have had his love of Andy seem irrational. Part of the secret to screenwriting is to confuse the audience — then give them a sense of clarity at the end.”

And according to Docter and colleagues, a Pixar film gradually pulls you into becoming invested in the characters, through a range of universally true sensations, so that when loss and peril are introduced, and magnified, you are tense or disoriented during moments of intended confusion — and then experience the emotional release of reveal and resolution, of clarity and a positive statement.

“That was a core thing throughout the film … ,” Docter says of identifying with “Inside Out’s” interior journey. “Kids grow up and it’s sad and it’s beautiful and it’s necessary.”

Some of the voice actors who worked on “Inside Out” tell me that Docter is a “genius.” And that word gets applied to
most every core member of the Braintrust. But perhaps the greatest trait in the genius of leadership is to get every member of the studio to believe in the larger vision. And so much began with John Lasseter.

“He sees it so clearly in his head,” Pixar effects master Robert Moyer has told me, “and it’s great just to be pulled along by his enthusiasm.”

“The best directors have the ability to inspire, but John also has the ability to get everyone involved in the process, and makes it an enjoyable experience for everyone,” MacLane once told me. “There’s a community sense to it — making films with friends — and he makes it an experience where he wants to hear what people have to say.

“That made Pixar.”