By PETER JACKSON

WELLINGTON, New Zealand — In 1998 we were in pre-preproduction. Film-speak for limbo. Pre-preproduction is the tenuous time before a project is greenlit; before the studio commits to spending real money. This is the most vulnerable period for any film because it’s the time when your project is most likely to be put into turnaround. That’s film-speak for killed off.

The phone rang. It was Richard Taylor, friend, partner and longtime collaborator. Richard said there was a paint factory in Miramar for sale. A huge space. It would make a fantastic studio, it could be a drive-on lot, there was room enough for two, maybe three stages. In spite of the fact that we couldn’t afford it, we went to have a look. The site was impressive; we immediately thought of what we could do — how we could best use the space to build sound stages, props stores, wardrobe and make-up rooms. It was perfect for our needs. There was only one problem — we had no idea if we were making a movie.

What if we went into debt up to our eyeballs, bought the site and the film fell over? It was a scenario too horrible to contemplate, but then this was a building too good to let go. What to do? We climbed the stairs that led to the empty cafeteria. No chairs, just tables, clean counters, a worn and yellowing linoleum floor. Wait! There was one thing — sitting on the table nearest the door, a book, turned over as if someone had just put it down and didn’t want to lose his place. We walked over and as we drew closer, things started to feel a little strange because I could now read the title — I could see the words “‘The Lord of the Rings’ by J. R. R. Tolkien” on the battered front cover, and for a moment we all just stood there. I looked at Richard. I knew now we would buy the factory and that somehow the film would be made.

I first read “The Lord of the Rings” as an adolescent. It’s a dense novel, a sprawling, complex monster of a book populated with a prolific number of characters caught up in a narrative structure that, frankly, does not lend itself to conventional storytelling.

Imaginatively, this story is a filmmaker’s dream, but translating it to the screen is quite another matter. Nine major characters vying for screen time in a story that has not one key villain, but two (each with different agendas) who have almost identical sounding names, is by no means an ideal screen story scenario. Setting aside for a moment the challenge of distinguishing Saruman from Sauron (both of whom reside in eerily similar tall, dark towers), you are faced with the larger problem of how to be faithful to the world of the story and somehow not send an unitiated audience into information overload.

Not to mention that we were embarking on something never before attempted: making three films at once on a 274-day shooting schedule that required filming 6 days a week in more than 100 locations with more than 20 major speaking roles.

“The Lord of the Rings,” published in the mid-1950’s, was intended as a prehistory to our own world. It was perceived by Tolkien to be a small but significant episode in a vast alternate mythology constructed entirely out of his own imagination. A British scholar of language, Tolkien drew upon his formidable imaginative and intellectual powers to create a fabric of mythic history spanning many thousands of years. And that became our problem: What to include? And what to leave out? For the telling of this story seemed to offer up endless possibility. As Tolkien says, “The road goes ever on and on,” a reference not only to the path we take through life but also, it seems, to the nature of storytelling itself.

It is late 1999 in Queenstown, N.Z., two days after record rainfall caused the worst flooding in the history of the district. We have suffered some setbacks; the weather has stuffed the schedule. Two of the actors, Sean Bean and Orlando Bloom, have been caught between two landslides and are now trapped in a tiny town in the middle of the South Island. They have been taken in by a kindly woman who has offered them food and a bed. They were last reported to be cooking spaghetti and cracking into a bottle of red wine.

We have no choice but to reschedule their scenes. The decision has been made to shoot the lake-shore scenes instead. The location manager shakes his head: “We can’t do that.” All eyes in the room swivel in his direction as he finishes somewhat apologetically: “The lake is under water.”

There were 1,300 people employed on the crew. At the height of this insanity we had seven units shooting multiple elements simultaneously for the three different movies that make up “Lord of the Rings”: “The Fellowship of the Ring,” “The Two Towers” and “The Return of the King.” The “video village” was my constant companion on the set. This consisted of a bank of monitors relaying flickering images of indifferent quality, from second units scattered all around the country. Most of our shoot was spent on location in wildly isolated places, and we were completely at the mercy of New Zealand’s temperamental weather. There were days when we could not get to a location because of unseasonal snow. There were other days when roads were washed away and sets simply disappeared in overnight floods.

It became a sort of dark expectation that whenever we turned up on a new location the weather would turn bad — and sure enough, the locals would announce: “Hasn’t rained like this in 16 years!”

There were moments of absurdity that will stay with me forever. The sight of a velveteen La-Z-Boy armchair suspended in mid-air against a backdrop of towering mountains. Watching as it is slowly lowered on to plush green grass — a field in the middle of nowhere — and John Rhys Davies, lurching gratefully toward it between takes: the only chair wide enough to seat him in full Gimli costume. Or making the long drive back to our accommodations after a hard day of filming on an isolated lake. It is freezing cold, we are all exhausted, night is falling, when suddenly a figure darts across the road in front of us! I could swear that that was Aragorn, or rather Viggo Mortensen, still dressed as the warrior Aragorn, clutching a fishing rod! The figure disappears into some bush. Hours later he returns to the hotel, triumphant with his catch. And then there was the memorable conversation one of our actors had with Geoff Murphy, one of our second-unit directors, when upon asking for some clues as to his character’s motivation he was told: “I don’t know — just run like a bastard!”

It was always a relief to get inside a studio where shooting conditions were much more controllable, if not always comfortable. Air-conditioning, a vital component on any set for people in heavy costume, arrived in the form of long, snaking hoses that would blast out cool air at ground level. It was, at best, a makeshift measure designed to keep escalating temperatures at bearable levels. Walking behind the Rivendell set one day — the Elven refuge where the fellowship of the ring is actually formed — I was taken aback to find an extra, dressed as a dwarf, with an air-conditioning hose stuck up his tunic. The look of profound relief on his face rapidly changed into one of horror when he realized he was not alone and he quickly extracted himself, blurting out, “It’s not what you think!” before making a hasty exit.

There is something inherently comic about spending all day in the company of people wearing false noses, flowing hair and ridiculously long beards. It was not uncommon to see as many as four Gandalfs in wizard regalia roaming around the studio at any one time; Gandalf stunt double, Gandalf stunt rider, Big Gandalf (a seven-foot-plus actor who was used to make our hobbits look three and a half feet tall) and even — on occasion — Ian McKellen himself. This is not taking into account the Gandalf digital double, who took on tasks in the Mines of Moria that mere humans could not expect to survive. Ian was not the only actor to find himself with a virtual “other.” All the main cast had their faces scanned and body movements captured by Weta Digital, our New Zealand-based special-effects company, which grew from a staff of 30 to more than 250 during the course of production.

The 14 months it took to film the trilogy could accurately be described as a protracted bout of willful madness. Those who weren’t mad going in were close to being certifiable by the end. The sheer length of the shoot and the grinding tiredness that enveloped everyone in those last weeks was a form of suffering akin to that of Frodo, the Hobbit, staggering up the lower slopes of Mount Doom. Dailies would sometimes be four hours long — only the most stoic sat through them. On more than one occasion the pathos of a moving scene would be interrupted by the honking snores of an exhausted crew member who had failed to stay awake.

Throughout all this insanity, the feeling I had when I saw that book on the table in the abandoned paint factory never left me. No matter how close we got to the edge of the abyss (and we got pretty close sometimes), fate, it seems, would always show up. It showed up in the 11th hour after Miramax had put the films into turnaround and Bob Shaye and Michael Lynne at New Line Cinema made the jaw-dropping decision to take control of “Lord of the Rings” and make not two films but three. It showed up when the project landed on the desk of a New Line executive, Mark Ordesky, a longtime fan of the books. And, finally, it showed up when a dream team of actors, along with the veteran producer Barrie Osborne, all said yes, they’d come to New Zealand for 18 months.

If Professor Tolkien wrote the book he wanted to read —we got to make the movies we wanted to see. Fate, hard work, good will and yes — madness — saw us through.

The New Zealand filmmaker Peter Jackson is the director of “Lord of the Rings: The Fellowship of the Ring” and is co-writer of the screenplay with Fran Walsh and Philippa Boyens.