Face Anim Test
Hey Folks! Decided to do a bit more facial animation/expression work today, adding some more poses and features. Plus, I grabbed one of the sample faces I made before and converted it to work with the face rig. Here's a preview:
There are a few things going on here.
First, the same expressions you saw yesterday are here, plus a new one for fear. I wired them up to keys on the keyboard so I could test them at will.
Second, there's an additive blink applied at random intervals. The blink animation was made in Unity's animation editor and added as an additive layer, but the code decides when it happens. Basically a straight random chance, but it has to finish playing (~1s) before a new blink can begin.
Finally, I added some random pupil movements. As with blinking, this was an additive layer, except I dipped my toes into Unity's blend tree feature to control the up/down/left/right via code. Basically, each of the eye positions is a separate animation, and the code just tells the animation controller which to apply when (and how much in each direction). Again, pretty straight RNG for this, though I had to add a bit of extra code to make sure it didn't fire less than 0.5 seconds since the last movement (to avoid seizure-like movements). Also, the eyes can roll back into the head, unconscious style, so I have an upper limit for the random movements.
Overall, not bad! Certainly not bad for a couple days spent learning completely new systems. Any animator could probably do a better job than this, but it's enough to get the point across for now.
I might see about adding more variety to the faces (both phenotype and expressions), and assuming I can without a ton of work, it's back to the prototype! I can see how hard it is to rig this up to game code to reflect each of the crew's current states. And/or maybe use this in pop-up dialogues when viewing an interaction.
Assuming this works, I think it'll be a cool addition to the UI. Should make it more lively!