LOS ANGELES — When Ang Lee first read Yann Martel’s “Life of Pi” soon after its 2001 publication, the “Brokeback Mountain” filmmaker came to the same conclusion as any number of reasonable people in Hollywood would: There’s no way this novel can be made into a movie.


Lee’s concern was tied less to staging the bestseller’s central conceit — how could you stick a human actor and a tiger on a lifeboat without the loss of life? — than whether show business economics would transform the book’s metaphysical narrative into something less than thought-provoking.


“If you spend the amount of money it takes to film it, the movie has to be mainstream,” Lee thought at the time. “But if you don’t spend the money, you are not doing the book justice.”


The Oscar-winning director and 20th Century Fox ultimately decided there was a narrow path to satisfy the competing agendas, even if there were more than a few detours along the way, including two previous directors (M. Night Shyamalan and Jean-Pierre Jeunet), Fox’s near abandonment of the production two years ago and the last-minute replacement of Tobey Maguire as a writer character expanded from the novel.


“It’s the biggest gamble I’ve ever taken,” said producer Elizabeth Gabler, whose Fox 2000 spent 10 years bringing the movie to the screen.


“Life of Pi,” which opens Wednesday, represents not only a bold wager by Gabler and Fox, which co-financed the film’s steep $120-million budget, but also a shake-up in filmmaking technology.


One of a handful of live-action, literature-based movies shot in 3-D (another, Baz Luhrmann’s stereoscopic “The Great Gatsby,” comes out next May), “Life of Pi” also benefited from profound advancements in computer animation, which gave Lee the ability to put a menagerie of virtual animals on the lifeboat with newcomer Suraj Sharma, who plays Pi for most of the film.


Closely following the contours of Martel’s book, Lee’s movie primarily focuses on the 227 days the 17-year-old Piscine Militor Patel spends in the Pacific Ocean after a freighter carrying his family and their zoo animals from India to Canada sinks in a storm.


Most everyone and everything perishes in the disaster save Pi and four animals, all unwilling passengers on the lifeboat: a hyena, an injured zebra, an orangutan named Orange Juice and a Bengal tiger called Richard Parker. Natural selection being what it is, only Pi and the tiger remain before long.


Pi has learned as a child that Richard Parker is no pet but a mortal enemy; but with only a few square feet of space (and limited food supplies) the two must learn to coexist, or both will die.


Filming that very personal story of faith and friendship presented Lee, who last directed 2009’s “Taking Woodstock,” with numerous cinematic challenges. He gravitated toward using 3-D cameras because he felt a stereoscopic presentation made the story’s emotions more immersive. “I think it’s the new medium right now, even if a lot of people don’t feel that way,” Lee said. “But it’s uncharted territory for me.”


To mimic the ocean and its epic storms, Lee’s production team built a 1.7-million-gallon wave tank not far from the director’s hometown in Taiwan. “Life of Pi” shot on the tank for more than three months, over which Sharma lost 37 pounds to look like a proper castaway. “We would all break for lunch, and Suraj would have to go exercise,” Lee said.


Perhaps the film’s most remarkable technical achievement is the performance of “Life of Pi’s” shipwrecked animals, particularly Richard Parker. Though some sequences used a real animal — such as the tiger’s jumping into the water or swiping at Pi — the majority of Richard Parker is a computerized creation.


And though they are scarcely anthropomorphic, the animals do express nearly human emotions: The orangutan looks heartbroken, the tiger seasick.


Lee hopes all of the wizardry will disappear, leaving audiences talking not about visual effects but faith and miracles. And for Lee, making the movie was itself a leap of faith.


“The biggest fear for me is not being fresh, being stale,” Lee said. “And to overcome that, I have to take on something that scares me.”