It's staggering good luck and Ed Solomon, who's making his directing debut at 42, knows it. "Levity," which opened the Sundance Film Festival in January, is the intimate, melancholic tale of Manuel Jordan (Thornton), a convicted killer released after 22 years in prison. A ghost of a man, haunted by the past and numb with apprehension, Manuel returns to the inner-city neighborhood where he killed a young boy. He seeks out the boy's sister (Hunter), and prays for redemption.

Freeman, who also served as executive producer, plays Miles, a bogus preacher who's set up a pulpit in an abandoned basement, and Dunst is a rich teenager bent on self-destruction.

Amazingly, even with commitments from that powerhouse cast, it took Solomon a year to line up financing for "Levity." "It was awful," Solomon remembers. "People thought it was too dark. Also, I was a first-time director, so it was so-called 'execution dependent' . . . (which) basically means that you can't sell it if it's bad. It's not 'high-concept.' "

Studio suits didn't know what to think of his intimate chamber piece about a spooked convict seeking comfort in a morally ambiguous universe. "It doesn't deal with typical Hollywood issues," Solomon says, "and it certainly doesn't deal with them in typical Hollywood ways."

Married to a former actress, Cynthia, and father of two small children, Solomon is engaging, intense -- a gray-haired but boyish man who loves to talk and share his passion for ideas and work. For most of his career, he wrote glib, successful screen comedies ("Men in Black," "Bill and Ted's Excellent Adventure"). "Levity," he says, is more true to his character.

The seed for the film was planted when Solomon was 18 and a freshman at the University of California at Los Angeles. As a volunteer for the UCLA Prison Coalition, he tutored teenage offenders in a maximum-security youth penitentiary in Calabasas.

"There was this one kid, not yet 18, who'd been tried as an adult for killing someone and was sentenced to life in prison. He kept a photograph of the person he killed.

"The photo was all faded, and he kept fingering it, folding and unfolding it. The photograph in a way was an inspiration because there was this haunting feeling in it: I just remember the eyes and the smile of this boy he had killed."

At the time, Solomon wasn't planning to be a writer, "but (the photo) stuck with me. Then in my mid-20s I started wondering what would happen if somebody like that, who thought they were going to spend their life removed from the world, suddenly was put in the world? What if they felt terribly guilty about a huge mistake they made when they were very young? Would you try to make up for it? Is it possible to make up for it?"

The questions stayed with Solomon. He tried crafting a screenplay but shelved it. Then he tried again and four years ago sent it to Freeman. "Morgan liked the idea and he liked the characters, but he didn't like some of the things in the script. He turned it down."

Solomon rewrote and approached Freeman a year later, but the actor was wary.

It wasn't until Thornton and cinematographer Roger Deakins ("A Beautiful Mind") signed on, and "Levity" starting looking like a "go" project, that Freeman committed.

Like so many in the film industry, Solomon is a "huge fan" of Freeman's. "I think there's an inner life, really deep, behind the eyes," he says. "There's a keen intelligence and a benevolence and a kind of world-weariness, all at once. You can't manufacture that, and I think that's what makes him really special."

When Freeman arrived on the Montreal set early last year, Solomon acknowledges, "I was really intimidated. But part of the job was having to rise to the occasion. And the truth is, at first it was hard. It took me a little bit of time to get my sea legs."

At first, Solomon made the mistake of talking too much to his actors, spelling things out. "Morgan's character is purposely mysterious. In my mind, he refuses to look at the mistakes he's made in the past. He's constantly on the run, fueled by this almost manic need to help everyone around him.

"We had a long conversation about it. And I asked him, 'Do you want to talk about what it is in his past? I have certain ideas in my mind, and I'm sure you do, too.' And he goes, 'Let's keep them to ourselves.' "

It took a while to grasp this, Solomon says, but "when you work with someone like Morgan -- who has a deep and complex grasp of the character he's playing, and his own internal logic and rules -- you need to believe in the fact that you've cast this person, and then work with them, collaborate with them on that level.

"Sometimes I would get wedded to a certain way. . . . As a first-time director it's hard, because you haven't had the experience to know where it's OK to let things change and where it's necessary to keep them. Sometimes Billy would say to me, 'I know you think you want that, but trust me, you want this. ' "

Ultimately, Solomon learned to cede to his actors' instincts. "Morgan let me know early on, in many different ways, that what he needed from me was to be a director, not a screenwriter. He would say, 'I need you to send the writer away (so) I can can go to the director.'

"And I would go, 'Oh, I get it.' It's one thing to imagine a film and hear it in your head. But when it's three-dimensional and it's humans interacting, there's a thing that occurs that you can't account for when you're writing. It's chemical and organic."

Latest from the SFGATE homepage:

Click below for the top news from around the Bay Area and beyond. Sign up for our newsletters to be the first to learn about breaking news and more. Go to 'Sign In' and 'Manage Profile' at the top of the page.