The face generator is a web app that assembles faces from various elements, generating a wide variety of faces. It supports multiple artists!
Learn how to contribute.
A few days ago I started wondering whether there was an efficient way to draw new face elements for my face generator on a tablet. I used the iPad, the Apple Pencil, and Procreate, started a new image based on the empty grid I always use, used a separate layer for every kind of element (one layer each for eyes, nose, ears, mouth, chin, hair, and extra), exported the image as a PSD file, used ImageMagick to get at the separate PNG layers, split the PNG layers into the various tiles, made sure the naming conventions were good to go, and here we are.
A few things to note: no effort at categorisation was made. For now, the generator mixes all the elements even if later the long ears will be used for elves only, for example. It’s just a first stab at things. I also feel that there ought to be no gender differences as far as eyes or mouth are concerned because I’m assuming no makeup (or equal use of makeup, I guess). I’d like to see how far I can get with sticking to just the chin and baldness as far as sexual dimorphism goes. I think it might work even though we’re pretty used to makeup and hairdo these days.
Anyway, this is the first time I’m seeing some random faces assembled from my PSD file. The proportions still seem to be off. What’s wrong with these heads. Too small, too round? Need more hair? Men need stronger jaws? Something is still wrong.
Feel free to use my template and give it a try!
If you do it, I’d love to get your PSD file to add to the web app. And I’m hoping you’re as willing as I am to dedicate it to the public domain. That makes it easier for everybody else to just use the generated faces for their character sheets, booklets, or whatever they’re doing.
Tags: Face Generator
The things I’m not happy with:
I’m not sure whether I’m going to spend more time fixing squid faces. I don’t expect to use them all that often. If you find that you really, really need then, contact me and we’ll talk about it. Hope springs eternal, after all.
I’m super happy with my dwarven faces!
Everything is better! My Face Generator is progressing nicely. I think the galleries for men and women are already pretty good. The entire app is running on Hypnotoad behind Apache/mod_proxy. It’s fast! And I’m going to support multiple artists. Please help me if you can! I’m not great with faces. I have barely drawn any until this project started. I had to read How to Draw a Face on WikiHow, that’s how bad I was!
Here’s how I’m doing it right now. The basic instructions are on GitHub.
If you printed the default file, this is what it would look like:
Download the PDF!
Make sure you don’t scale the image to fit the page. Try to use 100% of the image.
Then you draw 25 images of a particular element: hair, eyes, nose, ears, mouth, chin. 10% of all faces also get an extra element. Good for scars. My experience is that you need around 50 components for every element to provide enough variety – two sheets for each element is what I suggest.
Then you scan it. You should get something like the following:
There are more examples on Flickr.
If you have something like the above your work is done. Send the images to me and I will do the rest!
What does the rest involve? You crop it and resize it to 2250×3000 pixels. My scanner is notoriously bad about these proportions.
I have scripts to extract whatever you draw from the helping lines of your scan. I have three variants ready to go:
convert -blur 0x1 +dither -remap tintenblau.png scan1.jpg source1.png
convert -blur 0x1 +dither -level 30%,80% scan1.jpg source1.png
convert -blur 0x1 +dither -level 50%,80% -grayscale rec709luma scan1.jpg source1.png
I think you need to think about speed. Two sheet per element with six elements means 12 sheets. Save yourself the time of inking! Fiddle with the
-level argument instead. The first percentage means that every pixels darker than this much is going to end up black. The second percentage means that every pixel lighter than this much is going to end up white. Raise the first number until you’re happy with the darkness of your image. Lower the second number until the helping lines disappear.
You should end up with something like the following:
Now’s the time to use my
cutter script. It splits the image into 25 images of 450 x 600 pixels each. You must tell it the artist (alex), the element (hair, eyes, nose, ears, mouth, chin, extra) and the type (man, woman, elf, dwarf) you want to save it under:
perl helpers/cutter.pl source1.png alex eyes_all.
Eventually, you’ll end up with a large number of files.
And that’s it! I commit it to my repository on GitHub and deploy it on my server.
If you’re running the web application, there’s even the possibility to debug faces.
I’m going to link to the debug interface so that you can take a look – but in the end, you won’t be able to save any changes unless you’re the artist of one the collections.
I’d like to generate random faces, quickly. I’d draw them myself if I had any talent and a wider range of faces I knew how to draw. Sadly, I’m not that good. So here’s the idea: draw a bunch of eyes, noses, mouths, hairs (or hats?), ears, whatever it takes. Assemble at random. If we want to get fancy, we can tag those elements (male, female, elf, dwarf, halfling) to get better faces but perhaps we can do without.
In order for this to look good, I fear that we’d want a single artist to do all of these elements. That’s how we’d get a cohesive style, I think. I’d propose to work using a regular grid, like this:
But then again, if you’re going to volunteer, then you set the rules. I’ll do the cleaning up, extracting, coding, hosting, whatever it takes to makes this real. I’d want to use an open license so that other people can build on it in case we drop off the Internet one day.
I have a prototype up and running:
Once we have the artwork, I’ll add more features to the web app. Most importantly, we’d want to redirect random faces to an URL that encodes the elements used such that each face gets its unique URL. Then we can use them elsewhere on the Internet. We can also generate a gallery of many faces. It’ll be easy.
If we really want to, we could also move the entire library of elements to SVG and have SVG output. This would allow us to print the faces without pixelating it all. We’ll work it out.
We’ll work it all out. Dimensions, number of colors, number of elements, and so on. All you need to do is get in touch.