What would be a practicable way of generating huge numbers of realistically looking human faces? Randomizing 3D-models and rendering them would require a lot of computing power, especially as I'm needing them on an ad-hoc basis. Layering individual 2D-drawn parts requires some artistic talent, which I'm definitely lacking. Also, I'd like to parameterize as many aspects of the generational process as possible. Do you have any suggestions how to go about this?

  • \$\begingroup\$ Given how much trouble human artists have creating realistic-looking human faces, either in 2d or 3d, being able to do this automatically in a way that would be able to create hundreds or thousands of excellent examples without duds seems like a pipe dream for the foreseeable future. \$\endgroup\$ May 18 '12 at 1:32
  • \$\begingroup\$ You're right. I should have been more specific, what I need isn't absolutely lifelike photorealism, but it should be more convincing than a cartoonish caricature. \$\endgroup\$
    – Waterhouse
    May 18 '12 at 2:13
  • \$\begingroup\$ Unfortunately, I suspect that 'even as convincing as a cartoonish caricature' without human artistic intervention is a pretty good ways out of reach. There are a lot of subtleties to get right, and in any automated attempt the uncanny valley is bound to loom depressingly deep. \$\endgroup\$ May 18 '12 at 2:16
  • \$\begingroup\$ Probably can find some useful information from this post -> gamedev.stackexchange.com/questions/28363/… What you need to do is take the controls a game engine gives you for generating a face, and write code that generates different combinations. The key is creating "realistic" combinations. \$\endgroup\$
    – Tim Holt
    May 18 '12 at 2:17

This can certainly be done - Skyrim is a good example of a game that uses procedurally generated 3D faces. Basically they take a set of standard face models and describe different geometry morphs / colour changes that can be applied in different quantities to make all kinds of different combinations.

If you are just after simple 2D faces though, I think the layering approach would work best - hire an artist to draw lots of different face features, then combine them in different combinations to create lots of different random faces. Small random offsets to each of the components will also help create some extra variety.

Links that might also be fun:

  • 1
    \$\begingroup\$ +1; I think this is in general a good approach - but note that all of these start with human-generated facial elements, which OP has suggested that he doesn't want to use. \$\endgroup\$ May 18 '12 at 3:16
  • \$\begingroup\$ You might want to take a look at makehuman (makehuman.org) too. \$\endgroup\$
    – Exilyth
    May 21 '12 at 2:34

Steven's answer is a good one. Human brains are very well-versed in making fine judgements of faces, their construction as well as their facial gestures.

However, I want to pose a corollary question towards your idea. What is the state of facial recognition software? Can it reliably tell a human face from a CG one?

I'm curious as to the usefulness of hooking the output from a facial generator with a facial recognizer, with the goal of grading the humanness of the faces. Once you have a system that can produce faces and recognize the good, the bad and the ugly, is it not conceivable that the generated faces could improve over time?

I expect the implementation of this all would be challenging and complex. But I would love to see the results.

  • \$\begingroup\$ Obviously not in a game - but with computer learning algorythms (and a marking system - supplied by either a human saying Yes/No or by some comparison to the Dr. Marquardt Golden Ratio) an algorythm could be found that generated face shapes (features on a head mesh) pretty well. Texturing is easily applied to whatever meshes the process kicks out. There is probably a commercial system available that has already been through this process though (not looked). \$\endgroup\$
    – Wolf5370
    Sep 15 '12 at 14:27
  • \$\begingroup\$ Just under seven years later, we've finally implemented this. Here are the results. \$\endgroup\$
    – wizzwizz4
    Jul 11 '19 at 17:31

Mix existing photos of human faces into new ones.

There are millions of existing photos of faces available to you online. The approach I would take is to use well known feature-detection algorithms and blend together the features from different faces algorithmically.

This would give you the randomness and the realism.

In more details, I would create a processing pipeline for human faces, which would:

  1. Detect different features (eyes, mouth, ears, forehead, chin, jaw, cheekbone, etc...)
  2. Using the detected feature's locations, split the images into components.
  3. Randomise the parameters of a positional and size template.
  4. Place randomly selected components onto the generated template.
  5. Blend the features into one another. (edge smoothing, tone, color, etc...)

Some quickly found resources:

You'll also need to get a database of faces, which might come with some licensing issues, or gather them yourself from the web, which will be time consuming.

Be warned that this kind of problem is effectively active research. I don't even want to know how long it took the Skyrim folks to get their face generation system working. (And they had decades of experience since the days on Morrowind...)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .