Half-Life 2: Insight into the Creation of Characters’ Eyes by Valve Programmer

Half-Life 2: Insight into the Creation of Characters’ Eyes by Valve Programmer


Since the debut of Half-Life 2 almost 20 years ago, it has noticeably aged. It⁢ is still interesting to play the classic shooter, its ‌plot laid the foundation for subsequent generations, but most importantly ‌- the game’s characters had unparalleled eyes.

The game developer, Joe Wintergreen, in his Dev Scoops blog, talked about how the eye textures in Half-Life 2 are the best in ‌the business.

“At some​ point, I tried to make my characters’ eyes beautiful,⁢ and⁤ the ⁣gold standard for that ⁣was (and possibly ‍still is) Half-Life 2,” Wintergreen writes. He explains that the characters’ eyes are not “rotating meshes with many​ small details, but rather more or less ‍flat planes with shaders that make them look like spheres.”

To properly explain⁣ how Valve managed to‌ achieve this eye effect over​ the years, ⁣Wintergreen turned ‍to the developer ⁣who worked specifically⁣ on these eyes, Ken Birdwell. Apparently, three main ⁣textures were used for the eyes. One of them was‍ used‍ for “simulating self-shadowing from the eyelids.” Another one was used for the iris. ‌And the ⁣third one was used to simulate the‌ convexity of⁢ the cornea.

After Birdwell and his team obtained‍ the three main textures, they only needed to properly position the⁣ iris and cornea to “create the effect of visual contact.” According ​to Birdwell, “all the necessary data for this can be found in any eye anatomy textbook.” ⁣Aspiring eye makers should⁤ not “worry about eye rotation,” because our eyes “slightly rotate as you look‍ around, because of how ⁢the muscles‍ are attached to them, but ⁢it is imperceptible to humans.”

“I think an example ⁢of⁤ this code still exists in ⁢the SDK, maybe in hlmv?” Birdwell said. “I know that in the end,‍ it was ⁢all replaced with a fancy shader that ⁤does all this in one pass, but that didn’t happen in the HL2 version, and the code might still be there.”

<Digging into the​ code ⁣is already the realm of Half-Life fans. Remember that Half-Life 2 was⁣ released in November 2004 on PC, and then as part of the Orange Box package, the game appeared ​on PS3 and Xbox 360.

Link from www.playground.ru

Exit mobile version