Emile Hirsch, left, and Paul Rudd bicker while they work in “Prince Avalanche.”

“Prince Avalanche,” out Friday, follows two men (Paul Rudd and Emile Hirsch) as they tackle the Sisyphean task of painting lines on a newly paved road that winds through a burned Texas wilderness. Director David Gordon Green (“Pineapple Express”) found inspiration not only in the 2011 Icelandic film from which he adapted the screenplay, but in the Lone Star landscape where the film was shot.

What brought the film to Texas?
Before any concept of this film emerged, the backdrop emerged. I was hiking around a state park after the [2011] wildfires and something about that haunted feel felt really cinematic. What was most striking is the subtle rebirth it was going through, with seedlings of pine and oak trees poking through. Here was a devastating backstory, but here was the strength of Mother Nature.

Did that isolation cause any problems in production?
The beauty of the location shoot is everybody is stuck out there. When the film wrapped [each day], we’re going out for beers and burgers and conversation and not burdened with the outside world. We were able to treat this production as a summer camp, to really focus on the roles. The environment played not only an emotional role in the film, but a pivotal role in the production.

Neither main character is particularly likable. How do you keep that from turning off your audience?
You make them relatable and human, and you keep a balance of the likable internal element — what really makes them tick. But the deeper answer is in casting people you want to root for; with Paul especially, we see an actor we know really well and for the most part we like. We put a spin on that. To me, it’s an opportunity to capitalize on his talent and notoriety as an actor; for him, it’s an opportunity to stretch as an actor. Most of his films have been broad and comedic, and this brought out a wonderful side of him that’s going to open people’s eyes.