Procedural Clothing Generation (Part 2 of ?)

This week I’ve finished off procedural clothing generation for the richest individuals in feudal nations. The game can now create upper-body garments, lower-body garments, and boots, for each civilization. These different garments across a given civilization maintain a consistency of colours, a general consistency of size/aesthetic, and a consistency of whether the patterns etched into the clothing are circles, octagons, squares etc, based on the visual preference of the nation in question. Thus far these are only the “upper-class” clothing variations, but I think one can reasonably extrapolate how the others will look (which will come in a few weeks, I expect). Here’s a summary of the three layers of clothing currently implemented – I’m also going to add gloves and cloaks this release, but haven’t got around to them yet (since they’re hardly a priority compared to implementing crowd mechanics before the UK IRDC in a fortnight’s time!), but they’ll probably reflect the coats of arms of important houses if upper-class cloaks, and then just have some appropriate patterns on for middle-class, and nothing special for lower-class. Anyway, onto the clothing of our procedurally-generated aristocrats:

Upper-Body Garments

There are currently seven “archetypes” for upper-body clothing, an example from each being shown below. I’m working on an eighth archetype but it is proving extremely challenging to make it look anything other than awful, so that one might not see the light of day. Regardless, each of these has three sub-archetypes, making for twenty-one high-level “clothing styles” at present, each of which then undergoes extensive randomness within that clothing style, meaning that even if the maximum number of feudal nations are present, there will still be several “unused” high-level clothing styles left over – so that’ll do for now.


Lower-Body Garments

It is very challenging to make “trousers” which look even vaguely as interesting as upper-body garments (or boots or gloves, for that matter!), but I’ve done my best. The “Japanese” and what I have taken to calling “Hebrewlonian” archetypes in the above picture (middle top, and third bottom) will count as both upper- and lower-body garments, whilst the lower-body garments shown here will be distributed to the rest of  the clothing styles. Although in many nations there will be little sexual dimorphism (so to speak) between clothing styles for men and women, this will not be the case in some cultures, and a “dress” clothing archetype has yet to be worked on (I’ll get to it in the next few weeks). So some nations have the J/H archetypes above for both sexes; some nations will have the other above clothing for both sexes; some will have different clothing for the two sexes (and this will all, obviously, be chosen procedurally). So, some trousers/skirts etc (skirts are especially hard to make interesting, but I’ve done my best):



Now onto the “paired” items of clothing – boots (and gloves). I decided for the time being to forego “shoes” and go with something of a Game of Thrones/TV-adaptation-of-Wolf-Hall logic, i.e. that even those at the very top of society have to give something towards practicality and pragmatism, and basically wear extremely nice boots, rather than wearing beautiful footwear which never comes anywhere near a bit of mud. Boots, like gloves, have a distinct item for each in a pair, so that we can handle things like losing limbs, damaged limbs, etc, later in the game. Gloves and boots use the same colour system – they take the established colours from the clothing above, and then blend it 70% into a generic “leather” colour, to give the impression of dyed leather. Boots are therefore deliberately a tad less “striking” in colour than other items, but still maintain a strong semblance of the same colour schemes. Remember, as always, that you’ll never see these next to each other in game!



Gloves are coming soon… but possibly not before the end of June, since now that I have the three most essential items of clothing in place, I’m working solely on NPC mechanics in preparation for showing off an interim “0.8”-ish building at the UK IRDC at the end of the month.

Complete Generated Clothing Sets:

Here are some complete (aside from gloves) “sets” of clothing – note, of course, that the zoom level does vary across each item of clothing so that the player can see maximum detail, and you’ll obviously never see them all in-game “lined up” like this, but I think it’s quite nice to look at some of the aesthetic consistencies across different items of clothing belonging to the aristocratic echelons of a given civilization:

Clothes 1

Clothes 2

Clothes 3

Clothes 4

(Note that Set 4 contains no lower-body garment since the robe covers both the upper- and lower-body slots, and also in some of these examples, the underlying pattern – square, diamond, etc – varies, which it won’t in the actual game.)

I will be working on middle-class and lower-class/slum clothing soon, but that’s taking a back-seat now to work on some mechanics for the version I want to be able to show off at the UK IRDC. There will also, of course, be distinct clothing styles for nomadic civilizations and tribal civilizations, but those are going to come along later, although I do have some ideas for what types of generators I’m going to build for both of those.

Future Mechanics

Clothing generation is increasingly pointing towards an obvious but potentially very interesting and unusual mechanic: the ability to “fake” being a member of a given culture. Perhaps you can don clothes of other cultures (and perhaps lighten/darken your skin, as many real-world explorers and “adventurers” in the distant past did for exactly this reason?) and attempt to “pass yourself off” as a native in a distant land… which then yields potential gameplay around attempting to maintain the deception, say appropriate things in conversation, and give nothing away, whilst perhaps other NPCs are capable of noticing slightly unusual things about your character which suggest to them that all is not as it seems? I think this could be some really interesting territory to explore in the future…

What next?

Well, we now have heads, upper-body and lower-body clothing, and boots, so I’d say we’re about to ready to actually create URR’s NPCs. This week I’m going to be working on optimizing the field-of-view algorithm which needs some serious improvement for the next release, creating the new “character lookup” window which has room to include a face and to scroll through their clothing (and in 0.9 their armour and weaponry, if any), and continuing to work on crowd mechanics, spawning/de-spawning NPCs, etc. See you next time for an update on hopefully all of these things!

Be Sociable, Share!

16 thoughts on “Procedural Clothing Generation (Part 2 of ?)

  1. Great entry !

    You said this :” One side note on this: although I am of course sociologically aware that had history played out a different way, Renaissance women would have worn the exact clothing styles we associate with men (and vice versa), and of course a major goal of URR is specifically to explore these alternative histories, I don’t want to risk some players thinking it’s humorous or “absurd” if one nation generates men wearing dresses and women wearing what we think of as “men’s clothing”. As such, I am putting a few small limitations on this variation to guarantee “plausibility” (in this one regard) according to the real world, which is to say “full dresses” will never be generated as a male clothing style (but everything else can be female, male, or both). Hopefully this isn’t a cop-out given my commitment to allowing the game to rewrite history in almost every way (gender and otherwise), but I think it is worth it (only in terms of clothing!) to prevent combinations that players might just think comic or absurd, rather than interesting and varied. This is not, of course, to say that some nations might not be strongly matriarchal, or have women-only succession laws, etc, but in this one case I think deferring to strongly-ingrained real-world assumptions will actually be desirable for not breaking a suspension of disbelief. I don’t want people to laugh at something not intended to be comic in any way.”

    Having a (little) background in anthropology, this is not the kind of thing that make me laugh and I don’t think people here either. But I understand your reasons ! I’d love to see really strange looking civilizations, even super rich ones. I don’t mind some gender swapping/weirdness (in the sense of what is actually conform to do for each gender in the real world) at all.

    • Actually, you (and several other comments elsewhere) have persuaded me; I’ve just updated the entry, and I’m going to make clothing the same as absolutely everything else in the game world, i.e. entirely sex-neutral. Maybe it was a bit of a cop-out, honestly, especially compared to the strong efforts I’m making in the rest of the game to play with sex/race/culture/etc; it was a definite mistake on my part. If someone chuckles, they’re probably not the kind of player I want playing the game in the first place! Dresses for everybody! (Within the limits of procedural generation, of course)

  2. So all outfits will be essentially one color? I think, especially with the leather boots, this is bad. Take the green outfit for instance. The boots look like the wrong shade of green to go with the rest of the outfit, and in fact, a black set of boots might look nicer. Also everything else matches. Red Shirt, Red Pants. Blue Tunic, Blue Skirt etc. Why not use a little color theory to pick complimentary colors, color triads etc? That would add more variety to the overall outfits in the end. And I do hope whites, greys, and blacks show up occasionally too!

    Oh and the diagonal shading is a little odd. I imagine it’s to imply fabric wrinkles? but nothing else in the graphics shows that so it’s looks a bit off to me, especially on the boots. Everything looks like it’s lit in a room with blinds =)

    Despite my criticisms, this stuff is amazing and the variety is impressive! Some of those boots I already want! I am bummed about the lack of dresses just because I’d love to see what dresses get generated. 😉

    • Essentially, yes, though this is to make it somewhat simpler for the player to identify different cultures from their clothing, but also because there are only so many colours – if each colour has multiple colours for their most expensive clothing styles, then I think each would blur into each other too much. As for boots, as I say in the entry, they are deliberately a slightly different shade to reflect being made from leather rather than dyed fabric (though actually I experimented around with this a bit yesterday, and might end up changing it), White/grey/black does show up, though! It just didn’t in the examples I showed here.

      I’m amused by your blinds metaphor, and I appreciate the honest feedback, though I don’t agree! They look far too plain without, I’ve found, and I think (for ANSI graphics, at least) that it makes quite an effective texturing technique. But thanks for the final comment! I really appreciate it – and as for dresses, as I said in one of the earlier comments, dresses *are* coming! Just not this month.

  3. That also imitates limited color dies being available to a given region/culture. Nice! Can’t wait to see it all together when the time comes!

  4. Great work. Although are you planning to have the ‘equine-reliance’ of a society affect the lower body garments, because you find that horse riding societies like the Mongols or feudal Europeans with their knights (horsemen in positions of power) wear trousers while many others like pre-imperial Chinese and ancient Greeks preferred things similar to robes or skirts

    • Thanks! That’s a really interesting idea, though right now the answer’s probably no, if only because a) nomadic people are already going to have their own clothing generation (coming later!) and b) I’m not sure I want to limit the generation in that regard for feudal peoples. However, you do make an interesting point – perhaps there are other things that could change if civs are more/less equine-reliant? (I like the phrase). Thanks a ton for the suggestion, and I’ll give it some thought!

  5. Pingback: 2015 in Review | Ultima Ratio Regum: The Roguelike

    • No specific algorithm, or rather, it’s very handmade; lots of branching paths for various clothing components, lots of presets that can be overlaid over each other, lots of unique elements that can be placed on to or intermeshed with the presets, and a few algorithms to ensure that one clothing style is suitably distinct from another.

Leave a Reply

Your email address will not be published. Required fields are marked *