2015-09-28 Better

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.

First, print a copy of my empty.pdf. If you need a thinner face, take my elf.pdf. If you need a rounder face, take my dwarf.pdf.

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:

  1. The standard reduces the image to a few shades of blue: convert -blur 0x1 +dither -remap tintenblau.png scan1.jpg source1.png
  2. This is good if you draw using a pencil and want to keep that pencil look: convert -blur 0x1 +dither -level 30%,80% scan1.jpg source1.png
  3. This is good if you draw using a pencil and want to have it look like it was inked without going through the trouble of inking it yourself: 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.

  1. Choose an element to debug
  2. List all the components for this element (in this case, eyes)
  3. Edit one component (in this case, eyes_all_59.png)
  4. When you click any of the zones, you should get an error… :)


Show Google +1


Airi Ayame has been adding manga style face elements. Thank you!! :)

Not yet complete, but already recognizable: → Women's gallery by Airi!

– Alex Schroeder 2015-09-28 12:30 UTC

So, if I want to get digital, a single pic with 450*600 pixels, maybe even with a blue palette would be great. I just found a book on my harddrive with some art from early 19th century - So no scanning but copying and pasting… I was worried that it is a little different stylewise, but, hey Manga… :-)

rorschachhamster 2015-09-28 15:56 UTC

I’ve drawn face elements for elves and dwarves and noticed that having a different head shape was essential for me. That’s why the repository now contains elf.pdf and dwarf.pdf.

Another thing I noticed was that having opaque elements is tricky. This is most relevant if you plan on having white or blond hair cover parts of the face. As you’ll be using a lot of white filling, and since white is considered to be transparent, the face will will shine through your hair.

In order to handle this, I have seen two solutions. Perhaps there are more?

  1. Don’t do it – anything that hangs “in front” of the face needs to be inked. This is what I do.
  2. Use some other color to fill areas that should be opaque and white. Use #FFFFFF for the transparent background and use #FEFEFF for the white-looking opaque foreground. This usually involves flood-filling those areas in Gimp or Photoashop and therefore requires well defined, enclosed areas. This is not always easy to achieve and takes a lot of time.
  3. Use colors. I haven’t seen this in actual use but it should work. If you need something light and opaque, use a light color as you draw. A very light blue, or beige, or grey. Just make sure it’s different from the white background and make sure it’s not interspersed whith white pixels. Using a light pencil might leave too many white pixels, for example.

– AlexSchroeder 2015-10-07 21:15 UTC

Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.