KNOW ANYONE who carps that video gaming is a waste of time? Then they surely don’t know Daniel Chang, who is so gifted with helping make digital pictures happen, he has rendered that old line a lie.

And it all began with a class that became a course — in that it changed the course of Chang’s life.

The 27-year-old Maryland native (Wootton High School, Robert Frost Middle School) had graduated from Princeton with a degree in electrical engineering — but, he says, “I wasn’t ready for the real world.” So he stayed on what he calls the “safe, steady path,” heading off to Stanford in 2008 to get a graduate degree in E.E.

Soon after he landed in California, though, came the discovery. Stanford offered an Introduction to Computer Graphics course. At the end of the semester, the catalog promised, would be a programming competition, meaning: You got to write your own video game.

Chang — who was born in New York and lived in Taiwan prior to suburban Maryland — had grown up with an appreciation of visual art forms, from anime to comics. “I used to draw knockoff comic strips, which was kind of a hobby,” Chang says, “and liked video games and digital media.” So the Stanford class challenge “sounded really cool. I wanted to know what it was like to write a game.”

Chang didn’t know much about computer science, he acknowledges, so he struggled to play catch-up as he wrote his game. Passionately, he put in the hours.

And at the end of the semester?

Remarkably, he was the runner-up.

While on that safe, steady path of electrical engineering, he says: “I had never thought about it, but I had a talent for media. I really liked writing code to create visually beautiful comics.

“That course turned my life around.”

Mike Wazowski, voiced by Billy Crystal in a scene from Pixar’s first prequel, "Monsters University." (DISNEY/PIXAR/via AP)

Today, Chang melds those talents at the legendary Pixar studio. As a technical director in two departments (global technology and simulation), he made the leap from Stanford University to “Monsters University,” which has opened this weekend to strong box office — becoming the latest Pixar film to open at No.-1 — and generally positive reviews.

The core of Chang’s job is to work on the code that supports the artists’ tools. A good example:

“If you compare ‘Monsters Inc.’ to [its prequel] ‘Monsters University,’ there is a very large improvement in terms of lighting and how realistic the hair and materials look,” Chang tells Comic Riffs. “Actually, the light is scattered through the [translucent] hair — it seeps through.

“Part of what global technology does,” he continues, “is to make it so we can create these effects as precise as possible.”

Chang’s work also helps time-saving artistic tools — which has allowed “Monsters University” to raise the bar technologically on a number of fronts.

“One global tech development,” Chang says, “allows the shaders to paint the characters so it iterates much faster” — as the coordination between artistic tools improves.

THE ODD COUPLE: Mike and Sulley scare up different academic tactics in “Monsters University.” (Pixar)

So after three years on a Pixar film, what’s it like to view the finished result about monsters — including Mike (Billy Crystal) and Sulley (John Goodman) — as they go off to scarers’ school?

“It’s a very interesting experience -- and a little unreal,” Chang says. “There have been so many iterations of the story during that time -- it’s sometimes hard to separate. You’re always looking for stuff poking through, but ‘Monsters’ is a pretty tight ship.”

Chang gives much credit to director Dan Scanlon, a veteran of story at Pixar. “While working on simulation, we would have reviews with him. He has a very good knack for how to make a scene impactful. Even how hairs or claws are moving ... conveys emotion in the scene.”

Having completed his first Pixar film, what most struck Chang about the experience?

“Just seeing the amount of dedication by all departments that go into making this work,” he says. “They rely on each other, with so much collaboration.

“It’s very eye-opening,” continues Chang, who’s at work on his next Pixar project, the sequel “Finding Dory.” “I wouldn’t have imagined there was so much coherent effort to make a movie. It’s kind of mind-blowing.”

Then again, so is his creative road taken.

‘MONSTERS UNIVERSITY’: How a mockumentary gave Dan Scanlon a boost up to the director’s chair