At some point, perhaps while staring out the window of his train chugging through the landscapes of India, Dev Patel realized it was not just the character he plays in “Lion” who is on a journey, but he as well.

The skinny teenager who charmed audiences in the Oscar-winning “Slumdog Millionaire” in 2008 is an all-grown-up-now 26, and his emotional, hard-won performance as an Indian orphan adopted into an Australian family who, as an adult, seeks his birth mother signals a turning point in Patel’s career.

“It was a real transformative process,” Patel said at a SoMa coffee shop during a recent visit to San Francisco, a visit that also included a trip to the Napa Valley Film Festival and to Google in Mountain View.

“I look on it with gratitude, the journey that I went on for it. From the eight months of prepping to the kind of exploration I did when I went to India before I started filming — traveling on the trains, writing diaries, going to orphanages.”

“Lion” is based on the true story of Saroo Brierley, who at 5 was separated from his family in Khandwa, India, after falling asleep on a train. He would find out later that he was a thousand miles from his home; he lived on the streets and eventually was taken in by an orphanage and adopted by an Australian family.

As an adult, Brierley is tortured by his memories and obsessed with finding his birth mother, even though he doesn’t remember where he came from. His obsession strains his relationship with his adoptive mother (played by Nicole Kidman in the film) and girlfriend (Rooney Mara).

Brierley’s 2014 memoir of his experiences, “A Long Way Home,” serves as the basis for Australian director Garth Davis’ film adaptation. Davis cast the British-born Patel as Saroo — but Patel recalls that Davis didn’t want the kid in “Slumdog Millionaire.”

“Garth really did want me to change,” Patel said. “He said, ‘Look, I really want you to transform for this role. I want to see a whole new Dev.’ The whole idea was to see a new human being. The way I look, the way I sound. A more mature character than I have ever played. And he’s Australian — bigger, more alpha type of guy.”

To aid in the maturation process, Davis and Patel decided that Patel should gain weight, grow out his hair and add facial hair. Davis also had Patel travel to India to experience as much of Saroo’s early environment as possible.

“It was a real isolating experience, just sitting on that train, watching the vistas change, understanding how vast India is,” Patel said. “I did feel like an alien on that train. … The idea was to create my own memory map so that I had some real experiences to draw on rather than manufacturing a fake feeling.”

And, of course, Patel met with the real Brierley. It’s a tricky thing when an actor plays a real-life person who is still alive (Brierley is in his 30s now). In one sense, an actor wants to accurately portray his subject, but in another sense wants space to create his or her own emotional truth in the role.

“I wanted to be respectful to Saroo and give him the opportunity to tell me what he wanted to say,” Patel said. “I thought that it was important that he get anything off his chest he wanted to.

“The thing that struck me is how fiercely driven he was. He is the epitome of a survivor. We spoke about the idea of his guilt ... the idea of living this privileged life and being haunted by the thought that his mother and his brother can still be scouring those train tracks looking for him every day — that really struck home when I was sitting with him.”

Born in London to Indian parents, Patel wanted to grow up to be the next Bruce Lee (Patel is an accomplished martial artist). His movie heroes were Lee, Arnold Schwarzenegger, Eddie Murphy and Jim Carrey. But since his breakthrough in “Slumdog,” his acting aspirations became more along the lines of Javier Bardem, Leonardo DiCaprio, Chiwetel Ejiofor and Daniel Day-Lewis.

Trouble is, he says, he hasn’t found the right material. He had an underwhelming experience in M. Night Shyamalan’s CGI fest “The Last Airbender,” and has had various supporting roles in films such as the “The Best Exotic Marigold Hotel” films and Aaron Sorkin’s HBO series “The Newsroom.”

“When you’re spat out of a film that just won eight Oscars, you hope there’s going to be another experience you can grip onto and start to grow, and for me there wasn’t,” Patel said.

However, he added that the “Newsroom” experience helped him become a better actor. Working with actors such as Jeff Daniels, Emily Mortimer and Sam Waterston over the course of 22 episodes in three seasons would tend to do that.

During the read-throughs before the series started filming, Patel recalls feeling intimidated.

“I watched these incredible performers reading the scripts,” he smiled. “I was by far the weakest. I just looked around and said, ‘These guys are incredible. I’m terrified by this, but I want to do it because I’ll learn a lot from these thespians.’ It was a real cool experience.”

By the time he got the script for “Lion,” which he says reduced him to tears, he was ready for the challenge.

“When you come off from a long filming day and you feel like you’ve given your absolute soul to something and it feels so honest and true, and it takes you like two hours to brush it off — that’s kind of a beautiful feeling for me,” Patel said.

“I really grew up in that process, really came to understand a lot about myself, and about acting. Those scripts and opportunities like that are hard to come by for somebody like me.”