Picture the scene. Fifth Avenue in New York, normally buzzing with traffic, people and noise, is silent and empty. Only one man is alive and walking the streets of this once-vibrant city, now in ruin and disrepair. And that man is Will Smith.

Well, actually it's Will Smith's character Robert Neville in his new movie I Am Legend, where he plays the last man on Earth.

A man-made virus has wiped out most of the population, and turned the rest into rabid humans, known as The Infected - monsters with a hunger for blood, who lurk in the city's shadows.

As a result, Will is left playing a character who, for more than half of the film, is left to act by himself with only a dog for company.

"It was such a wonderful exploration of myself because you are in this situation where you don't have people to create the stimulus for you to respond to," says Will. "You start creating the stimulus and response so there is a connection with yourself. In those types of situations, you learn things about yourself that you never would have even imagined."

Will prepared for his lonely role by talking to men who had undergone solitary confinement, including former prisoners of war.

"They told me the first thing is a schedule," Will explains. "You will not survive in solitary if you don't schedule everything. You plan things like cleaning your nails. They'll take two hours cleaning them, because it's on the schedule.

"One man said he spent about six weeks training roaches to bring him food. And I'm thinking 'Oh, my God'. It's the idea of where your mind goes to defend itself. Either he really did train the roaches - which is huge - or his mind needed that to survive. Either way, you put that on camera and it's genius.

"What mattered is what he saw and what he believed," he continues. "And it was such a great explanation of what happens to the human mind. For me, I'm a better actor for having to create both sides of the scene with no dialogue."

Hence that lonely walk through one of New York's busiest districts, when the film crew had to shut down six of the city's major streets on a Monday morning.

"Shooting in New York is difficult. I would say percentage-wise, it's the most amount of middle fingers I've ever received," laughs Will. "I'm used to people liking me! I was starting to think F-you was my name! We shut down six blocks on Fifth Avenue on a Monday. That was probably poor logistics - poor planning.

"You realise you've probably never seen an empty shot of New York," he adds. "When we were doing it, it was chilling to walk down the middle of Fifth Avenue. There's never an opportunity to walk down the middle of Fifth Avenue. Two o'clock in the morning on a Sunday, you can't walk down it. It just created such a creepy energy."

Many actors would have baulked at the idea of having to occupy the majority of a blockbuster movie's screen time with just a dog for company. But the movie, which is based on Richard Matheson's iconic 1954 novel, has been on Will's mind for several years.

"I really connect to the idea of the collective unconscious - that there are things that we all dream, things that are beyond language," says Will. "To me, the movie is one of those concepts, which is why it has stayed with me this long.

"You've been on the freeway many times and wished everybody was dead. There have been times when you just wish you were by yourself. And that, coupled with the separation from people, being ripped away from people and connected with the dark and the unknown of the dark, and how we would fare against that realm of the unknown, is a really primal idea.

"I couldn't always articulate it like that, but I love this concept because it connects to ideas that a four-year-old could understand."

For the second time in his movie career, one of Will's children - this time seven-year-old Willow - joins him on screen, playing his daughter in flashback scenes at the beginning of the movie.

"You don't work with Willow, you work for Willow," laughs Will, who is also dad to Jayden, 11, with his second wife actress Jada Pinkett Smith.

"It's interesting because Jada and I discuss the age old debate - nature versus nurture. Now is it because two actors went to Mexico, drank some tequila and made a baby - does that make your baby an actor? Or, did she grow up in a house where that's what the experience is that she knows? When I look at Willow, I have to believe it's neither one of those. There has to be something else. She just loves it."

However, proud dad Will reckons his kids have already developed two very different attitudes to showbusiness.

"Jayden is Johnny Depp," he smiles. "He just wants to do good work. He doesn't care what money he gets, he doesn't care what people see or don't see. He loves acting and wants to make good movies. Willow is Paris Hilton; she wants to be on TV. So we are managing both of those in our household."

With his kids already on their way to becoming fully-fledged movie stars by the time they're teenagers, how do Will and Jada keep them grounded in Hollywood?

"We live in La La land out here," he says. "Los Angeles and New York are cut off from the rest of the country and the rest of the world. So, for us, travelling is hugely important for our kids to really see other things and experience how other people live.

"Being grounded is more a concept of how you relate to the service of mankind. That's sort of what we try to impart to our children. You are part of a whole and you have a responsibility to uplift and be a positive influence on the whole."