2010
08.30

TCOD’s procedural portraits


Some of you following this blog since the beginning might remember TCOD’s procedural portraits.
Well the source code is now available on the demos page, along with the complete cheesy 100% developer made artwork. Here are the features :

  • portrait customization

There are 5 templates (male kid, female kid, adult male, adult female, elder male). Each template contains various layers (face, eyes, nose, mouth, …). Each layer can contain versions (to have different haircuts or eye types for a template). There are jewels layers (necklaces, bangles, earrings, …), marks (scars, beauty spots,…).

You can also customize the eyes, nose and mouth position, the complexion and the hair color (everything only works in monochrome though).

  • emotion

Once you defined the portrait (how the character looks like…), you can alter the emotion. Eyes, eyebrows and mouth have several versions. You can change the eyebrows, eyes and pupils position or add tears and “shame blushing”.

Note that not all templates support every feature though. Only the kids have emotion support. The adult female has the most clothes and ornaments layers but no emotion support. The adult male is even simpler and generally looks like a dumb folk singer in pyjama… The elder male has the fewer layers… and no clothes…

The original code uses dynamic font updates to render the portraits but it’s quite buggy. I replaced it with the SDL callback.

4 comments so far

Add Your Comment
  1. That looks pretty nice.

    Are you going for different (human) races here? I notice different skin colours but the facial structures all seem very similar. I reckon if you had some more nose parameters (width, size of nostrils, etc) maybe one for the height of the cheekbones, and another for forehead height and how pronounced the brow ridge is, you could get some really amazing variation.

    Mind you I shouldn’t be encouraging you with your fluff endeavours;)

  2. Yeah the idea was to increase the variation by having a lot of versions for each layer. I’m still thinking about using that for the cave at some point… but I’ll need a real artist 😉

  3. Hey, this is about the easiest way to bug you, Jice. I’m getting an error whenever I attempt to log in to the forum. It’s refusing a connection.

  4. Yeah, sorry for that. Eptalys’ https support has been down for a few hours. It’s back now…