Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Steven Stadnicki May 18 '12 at 1:32
    
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. –  Waterhouse May 18 '12 at 2:13
    
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. –  Steven Stadnicki May 18 '12 at 2:16
    
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. –  Tim Holt May 18 '12 at 2:17

3 Answers 3

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:

share|improve this answer
1  
+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. –  Steven Stadnicki May 18 '12 at 3:16
    
You might want to take a look at makehuman (makehuman.org) too. –  sarahm May 21 '12 at 2:34

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...)

share|improve this answer

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.

share|improve this answer
    
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). –  Wolf5370 Sep 15 '12 at 14:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.