Face Generator

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.

Click for a gallery
Click for more!

2017-03-24 New Faces

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:

Add Comment

2016-01-03 Squid Faces

The Face Generator now generates squid faces, a.k.a. mindflayers… For those of you needing a squid face or two. And as always, the faces generated are dedicated to the public domain.

The things I’m not happy with:

  1. I ran out of ink half way through drawing the elements and since I try to always wash the fountain pen as I change cartridges, the tentacles turned out very light. I tried to correct it in The Gimp but it isn’t perfect.
  2. I discovered that my layout of facial features was sloppy. There’s a big white area where a human nose would be, but I can’t put a nose there. I can’t move the tentacles up because the jaw lines and the lower eye ridges will interfere. Gah! More planning, less enthusiasm, next time.

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.

Squid Faces

Tags: RSS RSS

Add Comment

2015-12-20 More Faces for the Generator

The Face Generator gets a new artist!

Random Face by Arbust0

Tags: RSS RSS

Comments on 2015-12-20 More Faces for the Generator

This is just awesome!

– AlexDaniel 2015-12-25 07:45 UTC


And it reminded me that I can just keep adding to my own folder and so I added 25 more hair elements for women to my folder. The face generator keeps growing on me. :)

– Alex Schroeder 2015-12-26 16:14 UTC

Add Comment

2015-10-08 Dwarves

I’m super happy with my dwarven faces!

Here, have a random dwarf:
Gallery

Tags: RSS RSS

Add Comment

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:

https://alexschroeder.ch/pics/21790351671_13a47f2a39_c.jpg
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:

https://alexschroeder.ch/pics/21593038178_06595f84b8_c.jpg

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:

https://alexschroeder.ch/pics/21521333488_74f104033a_c.jpg

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… :)

Tags:

Comments on 2015-09-28 Better

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

Add Comment

2015-09-21 Looking for an Artist to help with my RPG Face Generator

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:

https://alexschroeder.ch/pics/20972514994_696ce782d2_c.jpg

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:

Random Face

The elements I already have are also online, of course. Source code is also available. All I’m missing is the artwork.

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.

Here’s what it would look like if we integrated it into the Character Sheet Generator.

Tags: RSS RSS

Comments on 2015-09-21 Looking for an Artist to help with my RPG Face Generator

The discussion that prompted it all is on Google+. My own efforts have to be seen in the context of Character Generator with Random Pictures, the MOAM Avatar Generator, going back to my efforts using Flashface in 2012. The app is available online if you have Flash enabled or as an app for both Android and iOS.

– Alex Schroeder 2015-09-21 15:21 UTC


Ok, hm, perl. As I understood the code, the parts are put on top of another after specifying white as transparent, as you said. I think you could get a lot more out of it if you would randomize the height of the parts just a bit. As I don’t know perl… maybe it would be possible to put the parts into a special container (Huh, Javaism…) or just a specified part of the image and just move this up and down (and sideways for half-orcs? ;) ) or even scale them up and down. This would make a lot more use out of fewer graphics. Just my 2 Cents.

Rorschachhamster 2015-09-21 19:15 UTC


Good points.

For the moment I added a new empty.pdf which people can print and draw upon using blue ink. Be sure not to scale the file when printing! Examples by myself and Claudia:

https://alexschroeder.ch/pics/21419974480_f9727a12b9_n.jpg https://alexschroeder.ch/pics/21419975330_47d424d034_n.jpg

How to get the image: scan it, crop it, resize it to 2250×3000. Use ImageMagick to reduce the number of colors and get rid of the guide lines:

convert -blur 0x1 +dither -remap tintenblau.png ~/Desktop/Scan0001.JPG source1.png

tintenblau.png is a tiny image with a pixel for each color allowed. All of them are shades of blue. This makes it really easy to get rid of shadows and smudges.

Then, use cutter.pl to cut it into smaller images. We draw in rows, so cutter takes labels per row:

~/src/face $ ./cutter.pl ~/Desktop/source1.png eyes nose mouth hair beard
~/src/face $ ./cutter.pl ~/Desktop/source2.png eyes nose mouth hair ears

The new files are created in the “elements” subdirectory and numbered automatically.

The code is still missing some sort of clean-up, but it’s a start.

Valuable lessons from looking at our code:

  1. we need to attach gender information (obvious male and female attributes don’t mix well) – I’m a bit sad that this will reinforce gender polarity, though
  2. some elements such as beards must be optional or rare

– Alex Schroeder 2015-09-21 21:31 UTC


New release allows filtering such that you can have various types for each element – the obvious elements for me is beards vs chins for men and women, same thing for fancy hair vs bald heads. Also, pointy ears for elves.

– AlexSchroeder 2015-09-22 21:16 UTC


Added hairdos for women, added eyes, added beards for men… Now I’m noticing that there is very little leeway for mouth positioning. I should have added more reference lines to my empty.svg file.

https://alexschroeder.ch/pics/21026752613_7f4d8ae139_n.jpg https://alexschroeder.ch/pics/21485434568_65614c2387_n.jpg https://alexschroeder.ch/pics/21052263263_11324cf8dd_n.jpg

The result is available from the elements folder.

– Alex Schroeder 2015-09-24 08:44 UTC

Add Comment

Comments


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.

Referrers: yandex.ru/clck/jsredir?from=yandex.ru;search/;web;;&text...4887362 www.yandex.ru/clck/jsredir?from=www.yandex.ru;yandsearch;web...1689029