But the typical Imax length of 40 minutes left him yearning for a larger canvas. The factuality of documentaries necessarily limited his creative range. And while his Imax films certainly qualified as family-friendly, they did not afford room to explore the issues of faith that Mr. Swofford, as a believer, felt were inextricably part of the human condition.

From 2006 through 2010, he gave over his talents to the film series “I Am a Mormon,” a set of cinematic portraits meant to correct the perception of Mormons as cultish or bigoted. Then he came on board as director of content for Brigham Young’s broadcasting division.

Ten years old at that point, BYUtv remained ineffectual. For cable and satellite providers, the network helped fulfill requirements to make educational programming available. Brigham Young’s fan base went to BYUtv for football and basketball broadcasts. As for original dramatic programming, there was virtually none.

So, in 2011 and 2012, Mr. Swofford had two media-research companies conduct focus groups for television consumers who were at least nominally religious. The questions were basic. What do you like and hate about TV? What do you want more or less of?

The answers could not have been more contradictory. “They spoke the language of values,” Mr. Swofford recalled, “but they watched ‘American Horror Story’ and ‘Real Housewives.’ ” Pressed to reconcile those seeming opposites, the consumers essentially said, “We want to be entertained. Then we’ll stick around for the message.”

For Mr. Swofford, that answer took the form of a mantra: broccoli and pizza. He had to devise a show that made the broccoli of values taste like the pizza of entertainment. That recipe arrived in the form of a Brigham Young student’s film, set in the early 1960s, about a boy whose Air Force pilot father has been killed. Mr. Swofford and that student, James Shores, collaborated on what became the pilot for “Granite Flats,” further developing the Cold War setting and introducing the plot devices of the teenage detectives and the Mkultra program, which had actually existed and been run by the C.I.A.

By placing “Granite Flats” in a small town in the early 1960s, Mr. Swofford was able to make modest language and conservative social mores feel intrinsic. (His lead writer for the series, John Christian Plummer, is an observant Buddhist.) The creative team discusses every script in a “tone meeting.”