Dirt has an amazing ability to take in practically anything and end up better than when it started. You could bury the nastiest, angriest thing imaginable and, in no time at all, it's pushing up daisies.

This seeming inexhaustible capacity of dirt to forgive us our sins is the root of our planet's biology. It's also the heart of a charming, if occasionally cloying, new documentary, "Dirt! The Movie," airing nationwide Tuesday as part of the Independent Lens series on PBS.

Filmmakers Bill Benensen and Gene Rosow start at the beginning, covering in a matter of seconds the big bang, the birth of the planet, the slopping over of early life-forms from sea to shore, and millions of years of birth, death and decay.

All that rotten stuff, mixed with clay and who knows what, piles up to form the very ground beneath our feet. Actually, it forms our feet, too, and all the rest of us, more or less, in a way the movie tries to make clear as mud.

We take dirt for granted. "Dirt!" asks us to dig down a little deeper, turning the world inside out to show us what living muck is really about.

"We need to stop treating it like, well, dirt," says actress Maggie Gyllenhaal, who introduces the series.

It sort of makes sense, in a mystical sort of way. The documentary alternates between reverential and goofy. The reverence derives partly from "Dirt: The Ecstatic Skin of the Earth," by William Bryant Logan, an earnest New Yorker who worships the stuff others clean out from under their fingernails.

Grubbing about wearing an ancient ball cap, Logan is a veritable Doctor of Dirt, an expert on things like root-balls. He appears in the movie as a man on a mission. He wants city dwellers to wake up and smell the crap. He relishes the very names for it, putting "dirt" on a list of "strong words" like "house," "eat" and a bleeped-out synonym for merde.

One of the more charming among the many animated segments illustrates a chapter from Logan's book in which a worker named Clyde, after parking his pickup beneath a maple tree, falls 40 feet from a scaffold. While he is recovering in the hospital, the refuse and gunk in the back of the truck sprouts a garden.

Ordinary miracles

That's just one everyday miracle covered in "Dirt!" Another one is how the movie manages to explain the microbial minutiae underlying the ultimate pedestrian substance without bogging down, or losing its good humor.

The goofiness - starting with the exclamation point in the title - comes from the filmmakers' desire to make a watchable documentary.

"We hope to go beyond the dedicated environmentalist audience and reach everyone," Rosow said during an interview. "We wanted to give people a real sense that this is a living substance."

There are very few multisyllabic words. Instead, we get gaggles of animated preverbal dirt critters, chirping like hamsters, looking annoyed when asphalt is poured over them and protesting with picket signs against the rapacious humans.

The main point of all this is that we diss the living dirt - the Rodney Dangerfield of natural resources, Rosow said - at our peril. We may have a future, it seems, but only if enough of us make it to the "companion interactive Web site" (dirtthemovie.org) and learn how to "come back into balance with dirt."

Evil farmers

In the simple moral calculus of the movie, the evil comes in the form of corporate monoculture farming, which wages a soul-killing war on Mother Earth and her happy bugs by unleashing giant-clawed digger machines.

Some of these scenes seem cut from "War of the Worlds." The dirt lovers, by contrast, fairly skip along through their organic gardens, producing hearty soups under the supervision of Alice Waters or turning Rikers Island convicts into gentle weed whackers who wouldn't hurt a turnip.

They are all ingredients in an easygoing, funny and occasionally profound tale of our planet's pestered organic layer. There's too much sweetness, for my taste, in the circle-of-life philosophizing and nowhere near enough gross stuff to satisfy the 14-year-old longing to see something dead and oozing, its eyes bugging out. At least Logan's book had a memorable chapter about the guidance system of earthworms. You only get a handful of worms in the film, and only a single close-up of a fresh cowflop.

Benensen and Rosow found no time for even a single corporate clod to explain things from the agribusiness point of view. Instead, they linger among potterymakers and mushroom hunters, tell us an African folktale about a hummingbird fighting a forest fire and show us a wine snob tasting dirt in a vineyard.

Maybe all we are is dust in the wind, but cheer up. At least there's no Kansas soundtrack.

In the forgiving spirit of the subject matter, we let it go and end as we began - fertilizer, if we're lucky. We should try to save the dirt, for the sake of civilization. But if we don't, dirt is perfectly capable of saving itself, one way or another, even if the way turns out to include tossing the entire human species into the slop bucket.

Dirt! The Movie: 10 p.m. Tues. on KQED. Check local listings for channels and repeat broadcasts. dirtthemovie.org.