“It felt as good as the first time,” director Wim Wenders said of the experience of working again with playwright-actor Sam Shepard, with whom he’d successfully collaborated on “Paris Texas” more than two decades ago and had joined again to make a second film, “Don’t Come Knocking,” in which Shepard himself plays Howard Spence, an over-the-hill cowboy star coming to the end of his career, who flees the desert shoot of his current project and travels ro Butte, Montana, in search of a son he never knew he had.

“I’d forgotten how good it was to work with the man,” Wenders continued in his soft-spoken, methodical way. “We actually would always sit, as we are, at a table together. He would sit there and be tying, and I would sit here, doing my e-mails or whatever, and he would be sitting at his old typewriter…and he needs me to sit there, because he needs me to read the scene that he’s writing. And I have to read it, and then we discuss it, and if we like it, then the inevitable question comes, ‘Well, what is next?’ And we never knew more about the entire story or how it was developing than the next scene. So you really invented as you go. There is no plot, no preconceived story, only the characters–and you write it and ask yourself, ‘What’s next?’ It’s as if you’re living the story. I don’t know anybody else who works like that. I’ve worked with many writers, and nobody [else] would consider working like that.”

Actually, though, when Wenders initially approached Shepard about working together again, he’d brought with him a narrative concept that was very different from what finally emerged. “I hadn’t thought of Howard as a cowboy, myself, when I came to Sam with my idea,” he recalled. “I had written him actually for a New York broker who eventually ended up in the West because he was trying to visit his children, and then found out he had a son he never knew about. And Sam couldn’t care less about a New York broker–he was not going to write a script about a guy like that. But he liked the little grain of an idea that there was an unknown son and a man who realized his life had really been only for himself and he hadn’t created anything meaningful. This was a little thing in my script, and he took it and said, that’s it. And in a way my treatment had been a pretext to go see Sam. I was happy that he didn’t like it–it was much better to start fresh. I had written that thing in one night, and I was happy that he tore it, shredded it to pieces. But at least we had the beginning of something.”

What emerged was a sort of journey of self-discovery in which Howard reconnects with his roots. “Road movies are sort of a modern kind of western,” Wenders said. “The westerns are full of these people who really are driven by one thing–they want to find out where they belong. And that’s why after some hesitation I accepted Sam’s suggestion to turn Howard into a western movie star. Somehow the frame of the western, in which we would move freely, was proper for the character. And it brought out something even in a very ironic way, almost satirical way, because you can see this film as also some sort of deconstruction of western myth. And I like that.”

He added, “I’m drawn to these guys [lost characters], because I think for so long I’ve been a movie hobo myself. I like these drifters. And really the first films I made in Germany, before I ever came to America, had these characters. Maybe that’s just in the nature of somebody who’s born right after the war, in a society that was aimless and without direction and lost, and was in ruins. And somehow maybe that’s really formed me in a big way. And I think a lot of people relate to these characters who are looking for a purpose in life and who are searching for an identity, a place to belong. And in the end there are quite a lot of people who are on that same journey. And maybe that’s why Sam and I connected in such a big way. We like the same characters, and we found out we like the sane music [and movies]. And so we have a lot in common. Sam grew up in the California desert, and I grew up in the desert of post-war Germany.”

But turning Howard into a cowboy was only the start of a long collaborative writing process between Wenders and Shepard. “Once we started from scratch,” the director said, “after about a year we got to a place where we didn’t want to be, and said, ‘Well, how did we end up here?’ And we went back and started again with the same opening scene–Howard rides away in the distance–and then just went to him mom, and not where he went before. That’s the adventure with Sam–you really live the story, you meet characters you’ve never met. And he doesn’t work from plot or from story, and as he’s not allowed to think ahead, you can’t say, ‘I have a beautiful ending in mind, and if we write this we’re never going to get there.’ That’s out of the question. You just write scene-by-scene, and when you get to your shoot, you realize that the beauty of it is that you can really trust your characters, because they are driving the story–it’s not the other way around. Everything relies on the characters–and that is his strength.”

One of the elements in Wenders’ original concept that stayed, however, was the main location. “Some of the places in the film I brought to the table when I came to Sam,” he said. “So Butte was sort of my input into the story. Wherever Howard was going to find the lost life that he never had, that for me had to happen in Butte. Sam knew that, and he liked the idea; he knew Butte. I think Butte is an amazing town. I think there is great beauty there. When we shot the film, we never pronounced the word ‘beautiful’ anymore, the whole team said ‘Butte-ful,’ got used to pronouncing it that way. They put that on the benches [in the parks] and we thought they were right. And the strange time-warp in which it’s caught–you see the entire history of the twentieth century in this town; it was a rich [copper] mining town, and then one day it’s gone, abandoned, and I don’t think there’s any other city of that size that is a ghost town. When I first encountered Butte, I saw this incredible beauty in my book, and I realized that you could shoot in this city as if you were in a big, open-air studio built by Edward Hopper, or that all his paintings were sort of stolen out of that city, as if he had painted only that city. Everything was there, all these lonely hotels and motels, windows looking in and out these empty streets, all the cityscapes. We learned a lot from his paintings. We looked at them and we realized sometimes how little the figures were in these landscapes and these cityscapes, and how there’s always windows, and you’re always looking out or sometimes you’re looking from the outside in, and we learned how he painted these, because he’s the only painter I know who never painted the window–he makes no effort to paint a reflection. It’s always as if there were no glass. So we said, we’re going tro try that, too. Of course, we couldn’t take all the windows out of Butte, so we found a way we could do that in the camera, with a Polaroid filter that eliminates all reflection. All of a sudden it looks as uf there were no windows. So we learned from Hopper.”

Wenders brought another lesson to his work with Shepard, who’d declined to star in “Paris Texas” more than twenty years earlier. “I had him in mind [for this movie] as soon as I read the first page, and Howard was riding away from the set. From that moment I thought, is he going to put me down again? Because he did that on ‘Paris Texas.’ I had learned from my failure, so I didn’t ask him [this time]. And then finally when I’d read fifty pages, I said, ‘When we finish with thus, Sam, I’m going to give it to Jack Nicholson. I’m sure Jack will love this.’ And I didn’t look at him–I just did not look at him. He might have looked at me, but he didn’t answer. And then he started to make plenty of mistakes as he was typing–he actually had to take the keys and get them untangled, which he never had to do.

“And I knew I had an actor,” he said with a laugh.