Erasmatron Faces

This is a document I wrote in 1997 about procedurally drawn faces with emotional expressions. I removed it from the website long ago, but realize that perhaps the algorithms could be of some use as a library for people using a technology such as Steam.

We now have the pixel-mapped aspects of the face display under control; little additional work needs to be done. I want to have four base faces and four wigs for each gender/size combination; once this is finished, I shall regard our work with pixel-mapped faces to be complete. It is time to turn our attentions to the facial features. The issues to decide are as follows:

The current feature set is illustrated below:


The issues are: 1) should we add any additional features to this basic set? and

2) should we improve the quality with which each feature is presented?

Additional features that might be added are a forehead furrow line, an outer jowl line, and a chin dimple line. Any other suggestions?

Improving feature quality
There are a number of means of doing this. The simplest is to add resolution by adding more control points. Be warned, however, that adding more feature points means more work in defining each expression, and when the points get closer together, they're harder to work with.

General comments on lines
Right now these are drawn with some merging into the background. We could make line weights variable, in which case the darkness of the line would be greater or lesser. Now, this gets complicated, because there are two controlling factors. We could assign line weight to the character (young fresh faces have light lines while old, furrowed faces have dark lines). We could also assign line weights to the expression (the wider the grin, the deeper the jowl lines), in which case we'd have to assign line weights to each feature separately. This could be a lot of tedious work. There's also an issue with the tapering of the line darkness. Lines should taper off, but each line segment needs to have a fixed line darkness. Does this mean we need additional control points at the end of such lines?

Jowl lines
Perhaps these two lines should be merged into a single line.

Orb line
Perhaps this line should be fat. Currently all lines are three pixels thick: the central pixel is darkest, and the two pixels on either side of it are blends between it and the background skin color. Perhaps the orb line should be five pixels thick?

Upper and lower eye lines
No ideas here.

I would like to constrain this structure so that the points cannot be moved horizontally, only vertically. This still permits the shape of the eye to be altered somewhat, but you can't get total control and there are still plenty of absurd shapes allowed. Should the shape of the eye be controlled only by the single factor of how wide open the eyelid is?

Another issue is customizing the eye shape to the character. Right now this is impossible, as the eye is drawn algorithmically. However, if we can define a single variable, such as "almondness" for the eye, I could deform the shape of the eye by this value to produce different shape eyes.

At this time there is no provision for variable eye sizes; all eyes on all faces are exactly the same size. Is this acceptable? I must warn you, variable size eyes would probably cost us a lot of cycles to draw.

brow lines
I don't see much I can do with these lines.

Here we get into some interesting complexities. The current eyebrow is drawn as a thickened version of the eyebrow centerline. We simply draw some points a few pixels above and below each defined eyebrow point, and then connect them all. Here is an illustration of the algorithm:


Another constraint on the artist was that the control points are constrained to vertical adjustment.

Now, how to improve this algorithm? One obvious possibility is to increase the number of control points, but I don't think that this will do a lot to improve matters. Another possibility is to remove the constraint on horizontal adjustment of the control points, but again, I don't see a lot of purchase in this idea.

It seems to me that the main area of concern is the interior end of the eyebrow; this is the most mobile and emotionally communicative area of the eyebrow. Its termination is clumsy. What we need is a blunter, more rounded termination. Perhaps I could terminate the inside of the eyebrow with a double-point, as with the other control points, but with only half of the eyebrow thickness value.

I recall that Caitlin had a suggestion for improving the shape-definition technique, but I've forgotten it (which is why I am now resorting to written discussion).

Once the eyebrow shape has been defined, it must be filled with some hairy pattern. The current algorithm just fills it with a rather simple pattern; we need something better. There is a catch on this: if I choose to implement animated transitions between expressions (unlikely given the current schedule), then we must worry about how the eyebrow will ripple as we step through this animation.

Here's a radical possibility: we dispense with the filled-region approach and instead draw a large number of eyebrow-hairs in the assigned hair color. To do so, we select each control point and randomly offset from it by a number of pixels equal to the eyebrow thickness. Then we draw a line in the appropriate color whose slope and length are equal to those of the line segment joining our chosen control point with the next control point in the eyebrow. If we do this the correct number of times, it might just look right.


lips and mouth
This is certainly the most complex structure and the one that needs the most improvement. In the current design, each of the two lips is a fat structure (like an eyebrow) that contains a color. The issues, again, involve the shape of this fat structure and the fill. In the original design, the lip shape was predefined, but Caitlin has suggested a lip shape editor that allows us to provide different characters with different shaped lips. The second question concerns the fill of the lips, which is really a problem of communicating the curvature of the lips. I have experimented with techniques that variably blend the lip color into the background skin color as a means of suggesting curvature, but so far my efforts haven't looked good. Some discussion is needed here. I believe that the trick can be accomplished by variably blending the basic lip color with a much darker edge color, probably black. Thus, the center of the lip will be a bright red, and the outer edges of the lips will shade towards black. Does this seem as if it would work?

Then there is the mouth, what's inside the lips. Right now there's a really dumb algorithm that simply slaps some standard teeth into the mouth. Caitlin has suggested a "teeth editor" that allows us to assign custom teeth to each character. The problem is, I don't want to write a paint program. I propose that we permit the user to select a set of dentures from a standard list of denture options, just as we now do with wigs. But how then to handle variable mouth widths under such a system? Currently I simply stretch the teeth horizontally to match the mouth width, but this strikes me as unacceptable due to the resultant variation in tooth width. We could have a set of dentures associated with each face size, or perhaps one set of dentures that span all facial sizes, and you must simply get the right fit yourself. You can have a huge set of dentures inside a tiny mouth, if you wish.

Currently eyelashes are implemented with a "sunrise" algorithm that varies only by the length of the eyelashes. The result is unimpressive. I desire to retain several aspects of the current system: the user specifies only the eyelash length, and the eyelashes are drawn algorithmically. We need a better algorithm; I'll need your suggestions here.

The original version had some nice elements, but I'm worried that the crude methods used in the original version won't work in the higher resolutions of the new system. Perhaps I could resort to a system rather like that new system I am proposing for the eyebrows, in which a draw a series of individual hairs.

This exists in the menu but is not implemented at all, and I'm not sure what I mean by it. Would this mean eye shadow?

Here is a sample of the results:

Erasmatazz faces
Erasmatazz faces2