Tuesday, February 28, 2017

What's Cooking at Tasty Stewdios? (Feb 2017)



Whats up! We've been working on character portraits the past month and a half and today we're gonna look at how these portraits are generated.

On the art side of things the portraits are really important because we want the random units to feel like individual people, so they need to have distinct appearances and personalities. Humans bond by looking at each others faces. Its why you can ascribe so much personality to certain chairs:

look at this happy little fella
This is also our only real opportunity to see the units in detail, because for readability reasons the units are abstracted to basically only their gameplay components on the map screen. Personality and individuality is limited to the portrait.

hello i am HUMAN  PUNK  BOY
Lastly this is our best opportunity to stand out visually. I'd rather make something unique than something good but unoriginal. (of course, its always preferable to make something unique AND good). I love personal, idiosyncratic styles of art.
however, i am also unafraid of wearing my influences on my sleeve
Our first step in our portrait voyage was to settle on a visual style. WHAT WE SHOULD HAVE DONE was hash this out in the original concept art, but that's one lesson learned. Oftentimes, you have to learn how to make the thing your making as you go.

behold my artistic range
The top half has some interesting tricks, but the proportions are boring as hell yo. I love love love the dynamic pose on the first two of row four, but if each class had such an extreme pose it would limit the re-usability of our art assets. We'd have to make separate faces and hairs for every class which would totally suck.

We don't talk about the third item on row four.

Row five is all different stylistic renderings of the same underlying sketch, but we really had it right with the first two. These were selected as the style guide.

the sketch that launched a million portraits
The key to any good randomized system is to rely on copiously large amounts of authored content. That is, to make a whole bunch of stuff, and then have the computer arrange it together. We've all had those dark nights were we thought we could program a computer to generate a whole game from scratch if our algorithm is robust enough. I once spent three years in a procedural-generation-fueled fugue state and made a game called Magicmaker. It would have been a disaster if other people hadn't pointed out that the spells people made were way more interesting than the spells the game was making.

You can't teach a computer to draw. You can't teach a computer to MAKE ART! DOES THE COMPUTER HAVE  A SOUL, A VISION? NO! THE COMPUTER IS A MACHINE. IT DOES NOT KNOW THE HEART OF MAN.

as always, my heart is "i like anime"
But you're not here for my quarterly screed against the coming AI menace (ask me about self-driving cars some time). You're here to find out how character portraits in a video game are generated.

The earlier drawing was broken up into component layers. We ended up with 2 body, layers, 3 hair layers, a head, a mouth, a nose, and eyes. There's so many body and hair layers because they have to occlude each other is a bunch of different ways.

you try layering this in a way that makes sense
There's bunch of different nose and mouths and bodies and stuff. To begin with the computer starts by randomly grabbing a set of layers based on the characters race and class.

now the portrait's looking like something colored in mspaint
At this point we use a shader to programmatically color the image. The character has a color scheme and we can use the shader to color the red parts dark, the cyan parts their skin color, and so on. The white and purple regions are off-white highlights that are automatically determined from the character's hair color and the color belonging to their blue region.

almost done!
Lastly, to introduce a little visual noise we overlay the image with a paper filter.

we did it yay
And that's it so far! There's a bunch of stuff I want to try in the future, like the portrait having elements that reflect character traits, or changing as stuff happens to them. I don't know how easy that will be to pull off, but I'm really invested in getting them in. We want people to see each of their characters and remember exactly how they came to be who they are.

No comments:

Post a Comment