Pacific Rimscreenwriter Travis Beacham said “Jurassic Park,” Godzilla and gazing at the Pacific Ocean were the elements that inspired the monsters-versus-robots pic.

“I got the idea when I was walking on Santa Monica beach on a foggy morning and looked at the pier and Ferris wheel,” Beacham recalled Tuesday at the afterparty for the pic’s Dolby Theater premiere. “It took me three years before I could really show the script it to anyone.”

Beacham said that he was obsessed with monsters like Godzilla while growing up in Tennessee. “For me, the turning point was seeing the dinosaurs in ‘Jurassic Park,’” he mused.

Producer Mary Parent confessed that she’s a total fan, given the fact that she’s now working on the latest in the “Godzilla” canon.

“I really am a monster lover,” she said. “I’ve got to fly back to Hawaii to finish on ‘Godzilla’ and remember to bring my rubber boots because we’re starting on night shoots in the jungle.”

Idris Elba recalled that during the shoot he was negotiating to portray Nelson Mandela in the film “Mandela: Long Walk to Freedom.”

“That was strange to be in those two worlds at once,” he said. “You just have to focus on what you’re doing right now for it to work on the screen.”

Elba, who’s been working nonstop for 20 months in serious roles, admitted he’s ready for a change of pace.

“I’d love to do a comedy with Melissa McCarthy,” he said.

The premiere at the Dolby Theater began just a few minutes after Variety reported that “Pacific Rim” financier-producer Legendary Entertainment had closed a producing deal with Universal, ending its eight-year relationship with Warner Bros.