ELLEN DeGENERES had spent the night in the balcony, listening to friends and peers rave for hours about her as a comedian and colleague. She basked in the glow of the warm tributes, but she also seemed a bit uneasy, as if this was all too much concentrated adulation. The moment called for a dose of self-deprecation.

And so, when DeGeneres finally took the Kennedy Center stage to accept the 2012 Mark Twain Prize for American Humor, I was struck by how swiftly, and deftly, she undercut the parade of encomiums. She mocked her early-career attire and appearance, mentioning a detour down “Mullet Drive.” And she recalled her first comedy gigs in New Orleans, including when her name was on an eatery’s sidewalk chalkboard, and she got second billing to soup.

The crowd ate it up.

And this all speaks to why DeGeneres’s newest film, the Pixar sequel “Finding Dory” (opening Friday), is poised to become one of the studio’s biggest films ever. Perhaps even bigger than “Finding Nemo,” which grossed nearly a billion in 2003 dollars.

The new film is a litmus test for the popularity of Dory, the lovable, oft-apologetic blue tang. And the movie also reflects that special appeal of the self-deprecating actor who voices her.

“Absolutely, she is one of the most popular [Pixar] characters,” “Finding Dory” co-director Angus MacLane says of his film’s title character. “And Ellen brings a certain warmth and openness and generosity to the role.”

Within the DNA of Dory’s high popularity, MacLane believes there are two reasons that interweave like tightly coiled strands. And the first reason involves Dory’s uncommon traits.

“She has such a positive outlook and point of view on things,” MacLane tells The Post’s Comic Riffs. “That is so unusual in modern characters — to have a very positive character who isn’t [uttering] some kind of sarcasm. She is this positive id.”

In the new film, Pixar nimbly pits that id against a quest more than tinged with sadness. But even in a situation of despair, MacLane says, the sympathetic Dory — ever apologizing for her short-term memory loss — has a confidence and a charm. “She is a people-pleaser — or a fish-pleaser.”

Plus, it doesn’t hurt, he notes, that “visually, she is very appealing” — brightly tinted body led by the large, bright eyes of innocence.

The second main reason for her appeal, MacLane says, is how seamlessly intertwined the character and actor seem to be. Like few other Pixar characters, the face and persona of the performer seem to profoundly feed the animated role.

“Making this movie, it was interesting to see how much of Dory is Ellen, and how much of Ellen is Dory,” MacLane says.

When “Finding Dory” was announced several years ago, Pixar soon had DeGeneres back in the studio.

“We started recording with her right away,” says MacLane, who also worked on “WALL*E.” “We were getting stuff we can’t even describe [that reflected] how integrated she is with the character.

“Her voice is so important, and her timing,” he adds. “She can make [lines] that aren’t even jokes into jokes.”

MacLane likes working with gifted standup and improv comedians as voice actors in part because they so intimately know their own long-crafted comic strengths. DeGeneres is at the top of that list. “She has a point of view that is tremendously helpful,” he says.

DeGeneres’s standup forte is observational humor, and MacLane emphasizes how well her “now here’s a funny thing” approach plays into Dory’s dialogue. For the memory-challenged blue tang, everything is new — and thus can spark that running “gee whiz” commentary over things that should ring familiar, from ocean trenches to fish tanks. DeGeneres can “play” fresh wonder for both laughs and pathos.

“She has that rare thing,” the director continues, “where she has both an understanding of how to say it funny, and can deliver an emotionally true performance.”

And ultimately it doesn’t hurt, MacLane adds, that DeGeneres has such a highly popular persona so tied to being cheerful and kind and upbeat.

“Ellen has a personality that is very appealing and warm. It’s like she’s your best friend.”

Which, none too coincidentally, is the exact feeling that Dory herself so often engenders.

Read more: