When director Lee Unkrich wrapped the hugely successful “Toy Story 3” in 2010, he started looking for his next project at Pixar Animation Studios. Unkrich had long been interested in the Mexican holiday Dia de los Muertos, or Day of the Dead.

“I was always fascinated by the holiday and the iconography,” he said by phone. “There is something fascinating about the mix of skeleton imagery with bright colors and festivities. It is so different than most cultures relationships with mortality.”

The holiday, also just Dia de Muertos, takes place around Nov. 1 and 2 and focuses on remembering and celebrating deceased family members and friends.

“The celebration isn’t really about death; it’s about life and families and this obligation we have to remember our loved ones,” he said. “I realized we had the potential to tell a story that would not only be a big adventure and funny and visually dazzling, but could also have a lot of heart and emotion.”

The heartfelt result is “Coco.” Unkrich co-directed (with Adrian Molina), co-edited and co-wrote the animated extravaganza, now showing nationwide. It will likely become the latest in a long string of hits for Pixar, whose films include the “Toy Story” and “Cars” franchises, “Inside Out,” “Finding Nemo,” “Up” and many others.

“Coco” follows the travails of 12-year-old Miguel (voice of Anthony Gonzalez), a Mexican boy who longs to be a musician, despite his family’s strong objections to being musical in any way. He ventures to the Land of the Dead, where he meets a collection of colorful skeletons and discovers several ancestors.

Unkrich and his team made multiple trips to Mexico, not only to study the look of houses, churches, markets and landscapes, but also to meet with families.

“We had a big responsibility to tell this story authentically because for the first time we were setting one of our stories against a real culture,” he said.

It helped that Pixar films are known around the world.

“On one of our trips, we were in the middle of nowhere way out in the country. We were with this family, and they took us down a path into the woods to meet more family and we came upon this remote compound. The first thing I saw was a Buzz Lightyear beach towel hanging from their clothes line.”

Coco is a sweet film, but it has stirred controversy.

In 2013, Disney, which owns Pixar, committed a PR blunder when it attempted to trademark “Dia de los Muertos.” It was criticized heavily for trying to co-opt a culture and “own” a holiday. After the protests, it withdrew the trademark request.

“A lot of people were upset about it and we understood why,” Unkrich said. “We apologized, and it really ended up being a blessing in disguise because it made us appreciate the necessity to surround us with as many cultural advisers from the Latino community as possible.”

One of the loudest critics, cartoonist Lalo Alcaraz, was hired as a cultural consultant, and the film’s credits are now crammed with Hispanic contributors.

Some movie fans also complained that “Coco” was treading too closely to the themes, skeleton people and imagery of “The Book of Life,” Jorge R. Gutierrez’s animated feature from 2014.

“In terms of the ‘Book of Life,’ you know, sometimes two asteroid movies come out in the same year,” Unkrich said. “I’ve since gotten to be really good friends with Jorge R. Gutierrez, and he and (filmmaker) Guillermo del Toro have been very supportive of ‘Coco.’ There are lots of Christmas movies in the world. Why not have a few Dia de Muertos movies?”

One thing “Coco” gets very right is the realism of the musical numbers and the musicians’ playing techniques. The body parts that have always confounded animators are hands and fingers. (Tentacles are also very challenging. See Hank the octopus in “Finding Dory.”)

“Traditionally, with our characters’ fingers, you have to figure out how much rotation you want in each joint,” said Christian Hoffman, “Coco”‘s characters supervisor.

“But for ‘Coco,’ because we knew there was going to be a lot of intricate fingering on the guitar, we built a whole new system for the fingers.”

Once Miguel crosses into the Land of the Dead, he encounters a hustler named Hector (Gael Garcia Bernal). But his primary obsession is the music legend Ernesto de la Cruz (Benjamin Bratt).

“Ernesto de la Cruz is this larger-than-life celebrity in the Land of the Dead, and the amount of detail in his suit is mind-blowing,” said Hoffman, who has worked on characters for such films as “The Incredibles,” “Monsters, Inc.” and “Ratatouille.”

“I think it’s the most beautiful garment we’ve ever done at Pixar.”

While the film deftly blends English with Spanish, an all-Spanish-language version was shown at the world premiere Oct. 20 in Mexico City. In a rare move, the film was also released across Mexico on Oct. 27, nearly four weeks ahead of its U.S. debut.

“We dub our movies into about 47 different languages. We did the Spanish-language dub of ‘Coco’ early, so that we could open the film in Mexico,” Unkrich said.

Despite the early criticism and complaints, audiences are going in big numbers. Earlier this month, “Coco” became the top-grossing film of all time in Mexico.