In Lost in La Mancha, a juicy movieland documentary about the countless spectacular ways that a major motion picture can go wrong, Terry Gilliam, the ebullient pop-surrealist creator of ''Brazil,'' ''The Fisher King,'' and ''12 Monkeys,'' is caught up in such a thicket of mood swings that you may feel like slipping him a tranquilizer. For a few moments, he's in filmmaking heaven. It's early on in the shooting of ''The Man Who Killed Quixote,'' a $32 million fairy-tale adaptation of ''Don Quixote,'' starring Jean Rochefort and Johnny Depp, and Gilliam, 59 years old but still perpetually boyish, has shot some test footage of a trio of jelly bellies cast as giants. In the screening room, he gazes up at the image of the three actors looming in slow motion, and his delighted cackle is that of an artist who has never stopped being a naughty child.
A bit later, Gilliam is out in the Spanish desert, trying to stage a chain-gang scene that hasn't been properly rehearsed, and his joy turns to pure, curse-spitting vexation. It's the first week of shooting, and the bad karma has only just begun. ''Lost in La Mancha'' is nothing more than a modest, streamlined ''making of...'' diary about a movie that never got made -- it's ''Project Greenlight'' with bigger stars and bigger disasters. Yet the filmmakers, Louis Pepe and Keith Fulton, get perilously close to the glitches and backbiting, the mad logistical frustrations that derailed Gilliam's ''Quixote.'' The problems weren't of the corrupt, art-versus-commerce variety; they were mostly acts of God. A torrential rainstorm halts the shooting, literally fudging the color of the desert, while planes keep zooming over from a NATO bombing site. Rochefort, the septuagenarian French actor, is sidelined for months with a double herniated disc. How can you do a ''Quixote'' without Quixote? You can't, and the agony of Gilliam's defeat is furrowed onto a face that anyone who thinks they'd like to be a filmmaker would do well to remember.