Director Trey Edward Shults has said that his film Waves emerged out of period of depression where he felt “misunderstood”.

The 31-year-old US director drew from his own upbringing to write the domestic drama, which traces the emotional journey of a south Florida family as they navigate life in the wake of a loss.

The film centres around high school student Tyler Williams (Kelvin Harrison Jr) and his relationships with his domineering father Ronald and his girlfriend Alexis Lopez.

Shults told the PA news agency the script had been “brewing for a very, very long time”.

He said: “When I actually started writing the first draft, that I sent to people and stuff, I was a bit depressed, and I felt a bit misunderstood and just had things going on with my life.

“And I just wanted to put, as crazy as it sounds, everything where I’m at as a human being into something.

“Putting it all out there, there’s no way I could be misunderstood, I guess, if that makes sense.”

Shults, who was also behind films Krisha and It Comes At Night, said writing and shooting Waves had been a “cathartic” experience.

He added: “Shooting was kind of similar, it was the best summer of my life, no joke.

“It was incredible, but then we had some of the hardest things in the world, that all of us had ever done, and ultimately now, it’s like putting out, it’s the same high and low.

“It’s incredibly fun and humbling and beautiful and then very scary.”

Shults, who is white, penned the story based on his own experiences as a young man.

The film, however, focuses on an African-American family.

Shults said his partnership with Harrison had prompted this shift in perspective.

He said: “We were continuing to collaborate on the script for eight months before starting to shoot, and it was really finding the commonality in our experiences.

“That’s why it starts at such a personal, autobiographical level, but then at the end of the day I’m a white dude and this is a black family, and that’s purely because of Kelvin and we wanted to do this thing together.

“But we felt if we were going to do that, collaboration was everything, because it had to feel real and it had to feel nuanced.”

Waves is out now.