Actor Mark Ruffalo premiered his new film, “Infinitely Polar Bear,” at the Sundance Film Festival this weekend, which is based on the life of the film’s writer-director Maya Forbes.

Ruffalo plays Cam Stuart, a manic depressive husband to Maggie and father to daughters Faith and Amelia. As the family struggles to make ends meet due to Cam’s inability to hold down a job, Maggie decides to change the course of her life and go back to school — leaving the two young girls in Cam’s care.

“Infinitely Polar Bear” is based on Forbes’s own experiences growing up with a bipolar father, and at the premiere Saturday, she said the story took her 40 years to write. Her father passed away in 1998, so writing the story “was like saying goodbye to him again,” she said.

Ruffalo sat with Speakeasy to discuss inhabiting Cam, and how he approached the role of a manic depressive. For example, he watched videos of Forbes’s father, including an 8mm film during one of his manic episodes.

“Mental illness is all around us and some of the most exciting people in the world are manic depressive people,” Ruffalo says. “When they’re in their mania they can be pretty fun, like Cam. I know it well enough that I could play it.”