TORONTO -- When his friend Robin Williams passed away last month, "Night at the Museum: Secret of the Tomb" director Shawn Levy eventually had to return to the editing room to watch the late comedian's final performance.

The "emotional" experience has taken a toll on Levy as he continues to edit daily ahead of the film's release in December, but he said it's ultimately been an honour.

"It's sad but I do feel in some weird way honoured to be serving this legacy of work, this legacy of performances of which this will be his last. It will be around long after him and long after all of us," he said.

The third chapter of the popular family franchise stars Ben Stiller as a security guard who journeys to London to work at the British Museum. Williams reprises his beloved role as a Teddy Roosevelt statue that comes to life.

Levy, who is premiering his star-studded dramedy "This is Where I Leave You" at the Toronto International Film Festival, said in an interview that Williams has a "huge" role in the final "Museum" film.

"The scale of spectacle is bigger than the other two movies, but more to the point, the depth of feeling is more poignant because Ben and I felt like this was our last chapter," he said on Sunday.

"In saying a certain kind of farewell to this franchise, there are themes built in that are very poignant. And so Robin's performance is already emotional, and I think the weight of the emotion that he brings to these final scenes will have added depth."

Levy, who was born in Montreal and also directed the first two "Museum" films, said his favourite part of editing is seeing Williams and Stiller joke around between takes.

"You're hearing me go, 'Robin! Ben! Stop cracking each other up, let's shoot!"' he said. "To hear Robin's laugh and craziness and delicious comedy in the downtime is such a great reminder of him as a friend and as just an electric human being."

The director added that he mourns Williams' passing both as a filmmaker and a fan.

"I have a hard time naming any actor who has a legacy in both comedy and drama where they succeed equally and give indelible performances in both tones," he said.

"So I'm a fan. I was a fan before I was Robin's director. And I will be a fan long after I'm Robin's director."