Brave's Princess Merida shows guts, masterful archery skills and equine artistry. But theatergoers who made Pixar's first film with a female lead No. 1 at the box office ($66.3 million for its opening weekend) also couldn't help but admire one rare attribute in animation: She has one heck of a head of hair.

The flowing red locks perfectly define the teenage princess's fiery temperament. They also mark animation's progress: It took six Pixar research engineers and artists more than three years to bring the groundbreaking strands to life onscreen.

"We've never seen anything like Merida's curly hair," says Claudia Chung, the movie's simulation supervisor. "Technically, that was incredibly hard to achieve."

Brenda Chapman, one of the directors who conceived of the characters, acknowledges she was "naive" when she insisted that Merida would need to have curly hair — a near-impossibility in animation because of the sheer number of curls that have to move naturally in every frame.

"My poor crew just looked at me and said, 'Oh, my God,' " Chapman recalls. "But they really believed in it and set out to make it work. It's not just pretty hair. It's about who she is."

Trailer: 'Brave'

The task was made all the more difficult because Merida is an action princess.

"We knew this was going to be a big deal," Chung says. "It wasn't just creating hair that didn't compromise the character, but also making sure the intricate movement looked just right."

Pixar has achieved cutting-edge computer animation in hair with Sulley's intricate fur in 2001's Monsters, Inc. Teenage superhero Violet's straight, long hair presented the next phase of animation challenges in 2004's The Incredibles.

But Brave was such a big next step that it took researchers six months to see whether realistically depicting flowing curly hair was even feasible. Two and a half years in, Chung's team finally developed a computer-generated simulator that exquisitely detailed the soft movement.

"When we finally figured it out, we were ecstatic," Chung says. " Then we realized we had six months to finish this film, so it was 'Let's get back to work.' "

The new hair computer program (called Taz, after Warner Bros.' Tasmanian Devil cartoon character, because "it's crazy fast," Chung says) was so successful that it was used on everything from the princess's curly-haired brothers to her horse, Angus.

"When they first showed me pictures of Princess Merida with her hair, I was blown away," says Kelly Macdonald, who voiced Merida. "It was amazing. Even the horse was extraordinary."

Director Mark Andrews says the hair provided a key final touch to the feisty heroine. "Merida had to have the wildest hair we could imagine. She's a wild spirit. She wields that curly hair in confidence. It's her identity."