How to implement "flat" facial features?


First off, sorry if I posted this in the wrong category. I’ve never posted here before. :stuck_out_tongue:
As far as I can tell, there’s no “official” word for what I’m trying to do. I’ll try to explain as best as I can:

What I’ve been trying to do is to quickly switch between textures on a character’s face to show different facial expressions. For example, the eyes and mouth might have “open” and “closed” textures to simulate blinking and talking.

For example, this model: (which is pretty close to what I want to do, but it only works in blender.)

… uses these texture atlas to show different emotions:

This can make a variety of facial features:

Some (bad?) solutions I’ve came up with are:

  • Use a separate eye and mouth meshes that seamlessly transition with the head mesh, and switch the textures on that. However, I’ve read that splitting up a mesh unnecessarily is bad practice in JME.
  • Replace the entire head/body texture with slightly different ones that each have the various combinations of eye and mouth states. But then I would be sending redundant texture data to the GPU repeatedly. (I think?)

Right now I’m using the first method, but I’d like to know if there’s a better way.

Any guidance on what I should do?


Personally, I think your first approach sounds feasible.
I’d experiment with keeping the head mesh intact and superimpose the eye and mouth features by having separate (shaped) meshes just in front of where the features would be. I’d probably create a copy of the head mesh and scale it up just enough to avoid z-fighting. Then cut out the feature meshes from that.
Then I’d try using alpha on the feature meshes instead of the yellow skin color for them to blend better.

1 Like