Heather Graham was done playing by her family's rules by the time "Boogie Nights" rolled around in 1997.

"I grew up in a religious family, and they were like, ‘Don’t do anything with any sexual content,'" Graham recently shared on the "Inside of You" podcast with actor Michael Rosenbaum. "But try to be a woman in Hollywood in your early 20s, mid-20s, and then to try to get no roles with any sexual content, it’s like impossible."

At the time, Graham says her agent encouraged her to take the job, one that would have her playing a porn star.

MARK WAHLBERG HOPES GOD FORGIVES HIM FOR 'BOOGIE NIGHTS'

Heather Graham on the carpet in a silver sparkly strapless dress smiles at the camera

Heather Graham says her family didn't want her taking movie roles with "sexual content." (Michael Tullberg/FilmMagic/Getty Images)

"I had turned down a few things where there was sexual content, and then I saw other people having really good careers," Graham continued. "I just said, ‘Screw it. I wanna do this. The script [for ‘Boogie Nights’] is amazing.'"

Graham, who goes nude in the film, says she booked the job because "somebody really famous" initially passed on the role. 

"That was a just huge, great turning point in my career," she said of the movie. "I feel grateful to have been in it."

"I grew up in a religious family, and they were like, ‘Don’t do anything with any sexual content.'"

— Heather Graham
Heather Graham in a scene from Boogie Nights wearing roller skates at a welcome to the 80s party

Heather Graham as Brandy, the Roller Girl in "Boogie Nights." (Moviestore Collection Ltd/Alamy Stock Photo)

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

Graham starred alongside Mark Wahlberg, Don Cheadle, John C. Reilly and Philip Seymour Hoffman, all of whom are household names now, but were not as famous at the time as acclaimed co-stars Burt Reynolds and Julianne Moore. 

Heather Graham in a low-cut dress adorned with beads and a large sparkly choker soft smiles on the carpet

Heather Graham attends the 72nd Annual Academy Awards on March 26, 2000, in Los Angeles. (Ron Galella, Ltd./Ron Galella Collection via Getty Images)

Despite having co-stars who were also relatively green, Graham says she was "terrified" of filming nude. 

"You know, as a woman, I have to say, even if you go, ‘OK, well maybe I know sometimes men find me attractive,' you're like, you look at all the flaws. You go, ‘Oh my God, they're going to see these flaws.'"

"I remember just sitting in my trailer being like, ‘Oh my God, I’m so scared.' But then there's an aspect too when you're an actress where you want to get into the character, so you just try to like get out of your own head and just be like, ‘What is the character thinking?’ I'm just gonna be this character."

"I don't wanna be like, ‘Heather Graham feels nervous about this moment.’ I wanted to be like, ‘I’m [my character] Brandy in this scene and this is what I do.'"

"When it was over, you're just like, ‘Hm. I did it.’"

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Heather Graham stands with her hands on her hips and soft smiles at the camera wearing a grey/purple strapless dress

Heather Graham appeared at the "Boogie Nights" Los Angeles premiere in Hollywood. (Ron Galella, Ltd./Ron Galella Collection via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Graham, who went on to star in several other hits, including, "Austin Powers: The Spy Who Shagged Me" and "Bowfinger," recently revealed that she is no longer in contact with her parents.

Speaking to The Wall Street Journal in August, Graham, now 54, said her parents, particularly her father, were not keen on her pursuing a career in the entertainment industry.

"[My father] regularly told me that the entertainment industry was evil and that Hollywood would claim my soul," Graham said. "My mother supported my creative streak and acting ambition. It was a mixed message, though, since my father was strongly against them and my mother didn’t do much to protect me from him."

"I stopped talking to my parents when I was 25, and I’m estranged from them now," Graham told the outlet. "My friends are proud of me, and I’m proud of myself. I have really good friends."