The documentary photographer Vincent Cianni has chosen an opportune time to release his new book of images and interviews attesting to the struggles and triumphs, dignities and indignities of gay and lesbian service members. Begun while “don’t ask, don’t tell” was still in place, the project is an apt coda to an experience marked by an evolution from darkness into light. And the shadows and exposures of photography make it the ideal medium to give visibility and humanity to the sacrifices of gays and lesbians in uniform. “I would hope that my service mattered to someone,” says one young soldier in an interview. Mr. Cianni shows that it does, and, with an eye toward history, helps give gays and lesbians who valiantly served, finally, their day in the sun.

The closet began to crumble well before Congress ended the military’s anti-gay policy. As a result of the rising expectations gay people had about their right to be open and equal, thousands of troops had already come out to their unit mates notwithstanding the law. But even as the culture changed both outside and inside the military, the continued threat of expulsion meant that harassment could not be reported and resolved without risk of being outed and discharged. It meant that intimacy and even friendship were often casualties of the need to conceal.

The United States military’s ban on openly gay service members ended two and a half years ago, its demise one in a succession of triumphs for gay rights. But for more than two centuries, homosexual conduct was a punishable offense in the armed forces. Although “don’t ask, don’t tell” was supposed to be a step forward — the compromise reached after President Bill Clinton’s failed effort in 1993 to end the ban altogether — in many ways it made things worse, prompting a new fixation on sexual orientation in the military that contributed to spiking rates of harassment and expulsion of gay and lesbian troops.

An Interview With Vincent Cianni

Q. You’ve always been opposed to military action and to the military as an institution, demonstrating against Vietnam as a student. And you’ve described yourself as having been “uninterested” in examining much about our nation’s armed forces. So, how did you come to a years-long project that focused on the military? A. In 2009, I heard a radio interview with the mother of a soldier who had been discharged under “don’t ask, don’t tell.” And I felt not only an emotional connection with what she was saying but also a political connection, and I think those are the two elements that are the basis of my projects. I realized I wanted to be part of the repeal movement, and I asked myself, “What’s the best way I can contribute to the repeal of this policy?” The best way I can contribute is to start talking to people and photographing people about this.

Q. Did working on the project change your views about the military? A. I wanted to find out who these people were, people who were gay like me, but were in the military. But I also had to remove myself personally and look at this as a civil rights issue and a human rights issue and stand up for that. So no matter how I felt personally about the military or about war, what trumped it was my strong feelings about civil rights and human rights. I came to understand the people who were not only part of the repeal movement but those who were part of the military, and the necessity of this project to stand for the sacrifices they made.

Q. When you started this project, you were asking people to share with you very private aspects of their lives, in many cases when the ban still applied to them and exposing themselves entailed risks. How did you gain their trust? A. At the beginning it was really difficult to break through that wall because they didn’t know who I was. But the interviews were a big part of how I established trust. I always thought of myself as part therapist when I did these interviews. I’d talk with people about things that sometimes they hadn’t visited for many years or had never visited. There were things they said to me on tape that they had never discussed with anyone else. Sometimes I shared with them my own experiences and difficulties. By the time the interviews ended, we had shared something just like you share in boot camp.

Q. How did the camera affect that relationship? A. The camera always came out at the end of the interview. Having established that connection allowed the photography to be really intimate. They didn’t have to let their guard down, because it just flowed naturally.

Q. You view your photographic work as a collaboration between you and your subjects. In your book, a curator compares your images to Walker Evans’s sharecroppers “collaborating with strangers” to reveal lives previously unseen. Viewers of your photos get the sense that it’s not just the end product you care about but the process itself, that the troops and veterans you shoot, who were long forced to hide, can, with your help, finally arrive. A. Photography allows entry into people’s lives in a way that no other medium can, especially when the subject is participating in making the photograph. But for this project specifically, because subjects were silenced and invisible for such a long time, there was this real strong need to be vocal and visible.

Q. That was palpable to you? A. It was very palpable. So many times people said this to me. “I needed to do this. I wanted to do this. Because my life would have been nothing otherwise. Everything that I worked for and everything that I gave was stripped away.” In some cases even their service was stripped away. It’s like an annulment of a marriage.

Q. Is anything lost in making the private public? A. No, I think there’s something to be gained: to show that we’re human beings with the full range of needs and desires and roles. And in showing that, I hope to show that gay people are part of the larger community of humans and are no different from them.

Q. One of the most tragic and under-appreciated consequences of the military’s gay ban was that it caused some people to go their entire careers — even lives — repressing their feelings and sometimes forgoing intimacy altogether, an added sacrifice they were willing to make to serve their country. And, in addition to losing their jobs, some endured harassment and abuse with no recourse. Yet many refused to carry anger or hatred toward the military or even toward those who wrecked their careers. Did any of these cases stand out to you? A. Some of the most poignant ones were the ones who showed very intense bravery. A common theme was that people wanted to prove they could do this, and didn’t want to let down their friends and family. Several couldn’t tell their parents when they were harassed or kicked out. They were embarrassed. People had said to them: “You’re joining the military? You’re not going to make it.” And they wanted to prove people wrong, to show that we’re just like anyone else and we can join the military and fulfill those functions and jobs just as well, if not better, than anyone else. But it’s true: Some had so much generosity that they were not able to hate anybody and continued to love the military and wanted a role in it.

Q. The exclusionary policy has been gone over two years now. How different is the military now that official discrimination has been scrapped? How much of the added burdens for gay people have fallen away? A. When the law changed, that changed what could be done to people, but it doesn’t change the attitudes and it doesn’t change the fact that gay people still join the military and are not always ready to come out. That hasn’t changed. And it can be as repressive to them as it was before the ban.

Q. Your focus was larger than just “don’t ask, don’t tell.” What do you hope people will take away from this project? A. It became clear to me from the beginning that I was not only building this history, not only fulfilling something I needed to as a photographer and as a human being, but I was also allowing people to have a voice. When you think about a photograph, one of its basic functions is it holds our memories. Think about the pictures we keep of loved ones. These embody lives, histories, feelings. The project will enter into the archives at Duke University as part of the history of the L.G.B.T. community and as such be available to people for generations to look at this time in history. This and the book are a way to reach out to as many people as possible with documentation — physical proof — that these things occurred. The effects of the ban were very profound, I think, and that’s an important part of it all. I have a tendency, though, not to think about what effects my work will have, but to allow it to take on a life of its own.