©
Since Half-Life 2 debuted almost 20 years ago, it has aged noticeably. The classic shooter was still fun to play, its story laid the foundation for subsequent generations, but most importantly, the game’s heroes had unrivaled eyes.
Game developer Joe Wintergreen wrote on his Dev Scoops blog that Half-Life 2’s eyeballs are the best in the business.
“At some point I was trying to make my characters’ eyes beautiful, and the gold standard for this was (and probably still is) Half-Life 2,” Wintergreen writes. He explains that the characters’ eyes are not “rotating meshes with lots of fine detail, but more or less flat planes with shaders that make them look like balls.”
To properly explain how Valve was able to achieve such an effect with the eyes all these years, Wintergreen turned to the developer who worked on these very eyes, Ken Birdwell. There appear to be three main textures used for the eyes. One of them was used to “simulate self-shading from the eyelids.” The other was used for the iris. And the third was used to simulate the convexity of the cornea.
Once Birdwell and his team had the three basic textures in place, all that was left was to position the iris and cornea correctly to “create the effect of eye contact.” According to Birdwell, “all the necessary data for this can be found in any textbook on ocular anatomy.” Beginning eye makers shouldn’t “worry about eye rotation” since our eyes “rotate slightly when you look around because of the way the muscles are attached to them, but this is not perceptible to humans.”
“I believe an example of this code still exists in the SDK, maybe in hlmv?” Birdwell said. “I know this was eventually replaced with a fancy shader that does it all in one pass, but that didn’t happen in the HL2 version and the code may still be there.”
Digging into the code is already the lot of Half-Life fans. Let us remember that Half-Life 2 was released in November 2004 on PC, and then the game appeared on PS3 and Xbox 360 in the form of an Orange Box set.