These days, when a Pixar movie is as close to a sure thing as films get, it's hard to remember what a risky venture the first one was. After all, when "Toy Story" arrived 20 years ago this week (on November 22, 1995) as the first feature-length computer-animated movie, it was hailed as an instant classic and was a huge hit, launching Pixar as a reliable entertainment brand and creating a new industry of digital filmmakers.

Still, "Toy Story" almost never got off the ground. Here's the behind-the-scenes story you don't know, about the daunting obstacles that Woody and Buzz and the rest of Andy's toys had to overcome in order to travel to infinity and beyond.1. Future Pixar chief and "Toy Story" co-writer/director John Lasseter (pictured) was a junior animator at Disney in 1982 when he saw the studio's groundbreaking "Tron" and first recognized the potential of computer animation. When he suggested to Disney brass that the studio make a computer-animated feature, they fired him.

2. Lasseter soon found himself at Pixar, then a computer graphics company owned by Steve Jobs and best known for its hardware. In 1988, to show off what Pixar's machines could do, Lasseter directed a short all-CGI cartoon called "Tin Toy." The film won an Oscar, starting Lasseter back on the path toward making a full-length computer-animated film -- and toward negotiating with his old employers to distribute it.

3. Before "Toy Story," Disney had a relationship with Pixar as a user of its computer-assisted production system ("CAPS"), which Disney animators used on the wedding sequence in "The Little Mermaid" and the ballroom sequence during the title number in "Beauty and the Beast." Critics singled out that scene with praise, helping persuade Disney to expand its collaboration with Pixar.

4. Lasseter's Cal Arts classmate Tim Burton -- another former Disney animator -- returned to the Disney fold with the release of "The Nightmare Before Christmas." Made by animators independent of Disney, working at a studio in San Francisco, "Nightmare" was the first animated feature made by outsiders to bear the Disney brand. The success of that 1993 stop-motion film was the final straw that convinced Disney that it could make a feature with the independent Bay Area team at Pixar, Lasseter has said.

5. Still, the Pixar team ran into frequent opposition with Disney because they wanted to make a movie that was not at all a typical Disney cartoon. They didn't want a fairy tale, they didn't want a musical, and they didn't want a story where the side characters were more colorful than the protagonists. They wanted to tell the kind of story that had never been told in a cartoon before: a mismatched-buddy comedy, à la "48 Hrs." or "Midnight Run."
6. The original Woody (pictured) got his name because he was a ventriloquist dummy. He was also creepy and tyrannical. Over time, he evolved into a pull-string cowboy doll with the reassuring voice of Tom Hanks, but the animators kept the name, now as a tribute to Western character actor Woody Strode.

7. The initial idea for "Toy Story" was to pair the cynical Woody dummy with Tinny, the wide-eyed soldier from "Tin Toy." The premise of toys that came to life seemed well suited to Pixar's capabilities, since, in the early days of CGI, the easiest things to render were plasticky, artificial surfaces like those that characterize toys.

8. The filmmakers deemed Tinny too old-fashioned and updated him to a more modern soldier toy, and finally settled on an astronaut.

9. Buzz Lightyear was originally named Tempest, after the Atari game that obsessed the animators. The name "Buzz," of course, came from astronaut Buzz Aldrin.

10. While Tom Hanks was always the filmmakers' first choice for Woody, they initially sought Billy Crystal. (He would eventually play the lead in Pixar's "Monsters, Inc." and "Monsters University.") They also considered Bill Murray and Jim Carrey before going with Tim Allen, then starring in the hit sitcom "Home Improvement" on Disney-owned ABC.
11. Future "Buffy" and "Avengers" guru Joss Whedon (above) was a script doctor on the film. He came up with the beloved line, "You are a sad, strange little man, and you have my pity."

12. Lasseter's wife, Nancy, was the inspiration for Bo Peep.

13. Not yet famous for his kick-ass female characters, Whedon wanted to make Barbie a heroic presence late in the script, but Mattel declined to license her image to the filmmakers. Years later, of course, Barbie and Ken became major characters in "Toy Story 3."

14. On November 19, 1993, almost two years to the day before the film's release, Pixar took a rough cut of animated storyboards and screened it before Disney executives. The disastrous result was known in Pixar lore as "Black Friday." The characters were ornery, their chemistry was awkward, and the story didn't work. Disney threatened to pull the plug on the project, but the animators begged for three months to give the script a complete overhaul. When they returned, Disney approved the new script, and the filmmakers were off and running.

15. Pixar initially thought it would be able to render the film with a team of eight animators and 53 computers. It ended up using 33 animators and 300 computers. Each machine was named for an animal and would emit the animal's signature cry when it completed a frame of the film.
16. To figure out how the green plastic army men would move, the animators nailed planks to their own shoes and spent a day trying to walk with their feet attached to a board.

17. The film was initially budgeted at $17 million (compared to $45 million for Disney's 1994 hand-drawn feature "The Lion King"), but the cost soon ballooned to $30 million.

18. In North America, "Toy Story" earned $192 million at the box office. Overseas, it took in another $170 million. The three movies to date in the franchise have sold $1.9 billion worth of tickets worldwide.

19. "Toy Story" became the first animated film nominated for an Original Screenplay Oscar. Randy Newman earned two Oscar nods, one for his instrumental score and one for his song, "You've Got a Friend in Me." The movie didn't win any competitive Oscars, but Lasseter did get a special achievement Academy Award, "for the development and inspired application of techniques that have made possible the first feature-length computer-animated film."

20. Hanks improvised so much during the voice recording sessions that the Pixar team saved the outtakes he generated in 1994 and used them as dialogue in the sequels, including the forthcoming "Toy Story 4," due in 2018.