He tried his hand at stand-up comedy — his first time onstage was during a Steve Martin look-alike competition, which he won. He would achieve escape velocity from Boeing with an idea for a television program that would teach science to children in a wacky way. The best-known version of “Bill Nye the Science Guy” ran from 1992 to 1996, and won 18 Emmys in five years.

Mr. Nye’s past teaching and present crusading have made him a rock star for scientifically inclined students across the country. That celebrity has allowed him, as executive director of the Planetary Society, to push for the kind of interplanetary exploration that, he said in an interview, “leads to the reverence that we have for our place in the cosmos.”

“Space,” he added, “brings out the best in us.”

On the day of Mr. Nye’s visit to the Iowa State campus, students began lining up by midafternoon to make sure they got into the evening lecture. Stephens Auditorium holds about 3,000 people, and as many as a thousand would ultimately be turned away.

They came, many said, because “Bill Nye the Science Guy” helped shape their lives. “He was probably the one who inspired me to keep going in the science career track,” said Betsy Salmon, the first person in line at one entrance to the auditorium. She majored in animal ecology.

Kaci McCleary, an “aspiring neurobiologist, or neuro-something,” said that Mr. Nye was “a very inspiring person in the field of science — he tells people to make science part of their lives, even if it’s not their career.” Ms. McCleary, who knitted as she waited to be let in, said a friend had joked to her, “I hope to be able to touch the hem of his lab coat, so he could cure me of my stupid.”

Mr. Nye did not disappoint. In a lecture that gave evidence of his stand-up roots, he started out with rambling asides on his his family and its generations-long fascination with sundials. He talked about the bluish tinge of shadows on Earth compared with the orangy shadows on Mars, and described the sundial that he convinced NASA to send up with the Curiosity rover. He got a little risqué with a joke about the gnomon — the part of the sundial that sticks up, you know — and bounced into a discussion of the hellish heat of Venus and that planet’s high concentration of greenhouse gases.

He told the students that if they figured out ways to solve problems like greenhouse gases and global warming, “You could — dare I say it? — change the world!” And what’s more, he added, throwing his head back for a hearty mad-scientist laugh, “you could get rich!”