AUSTIN, Texas — For a generation of school kids, Bill Nye is zany and fun-loving, “America’s favorite scientist.’’

A mostly flattering new documentary about the science educator, author, and mechanical engineer, which premiered here Sunday at the South by Southwest festival, chronicles how Nye drew inspiration from Carl Sagan as well as how he sparred with creationists and climate change deniers.