For Mr. Reznor and Mr. Ross, the work was slow and deliberate, beginning not with scenes from the film but a blueprint of moods. The composers requested “a laundry list of emotional settings that we could draw upon” from Mr. Burns and Ms. Novick, Mr. Reznor said. “A lot of it was about tension and fear.”

The filmmakers also provided field recordings from the period to inspire the compositions. “Mortars, helicopters, people talking — we would process those sounds and use them as rhythmic starting points,” Mr. Ross said.

Working simultaneously on several projects provided the musicians a sense of creative freedom within each, they said, though gloom remained a constant theme.

“The tone of concern in ‘Before the Flood’ led perfectly into the pure dread, evil and melancholy that we explored in ‘Patriots Day,’ which also provided us the momentum to make the Nine Inch Nails record ugly and confrontational,” Mr. Reznor explained. “We could go deeper in each pool knowing it wasn’t forever. We could take a break from the end of the world by going into a terrorist bombing, or take a break from that by making an ‘I want to kill myself’ album.”

This year may be somewhat calmer. Mr. Reznor said that with no additional feature film work scheduled so far, he would prioritize new Nine Inch Nails music in 2017. (He and his wife also had a fourth child last month.) And while he called a full tour unlikely, the band will headline the Panorama music festival in New York on July 30, its first live show in nearly three years.

More opportunities could still arise, and Mr. Reznor and Mr. Ross have grown more confident in their balancing act — “as long as we don’t put off writing the paper until the night before,” Mr. Reznor said. “We’re getting better at that.”