Roll Your Eyes
Recently I have been working on a casual game, and one of the issues I had to tackle was how to give a simplistic character more human-like features. One solution I thought of was to give it some facial movements. After some experiments, I found a solution that renders me some promising results and I would like to share it here.
The eye-rolling feature relies on a shader solution, instead of using blend shapes, a more traditional approach. The reason for it is that the main character is a simple cube so its mesh topology doesn’t allow complex blend shape transformation.
The idea behind this solution is rather simple. The two eyes are separate meshes and the eye textures offset their UVs to “move around”. The offset amount is determined by a look-at target position. This solution is still a work-in-progress, so I would like to explain this solution in-detail in my next post when the codes are more complited.