Wednesday, August 17, 2011

GIMP Tutorial and Game Preview

So I used GIMP to put together a really quick and dirty portrait of my new character in the new game campaign, and thought I would throw up a quick tutorial on how I did it. I'm not going to give all the menu paths and such; generally, selection tools are under the Select Menu, Gaussian Blur is under Filters>Blur, and the layer modes are on the Layers dialog under Windows>Dockable Dialogs.

I took as my model this photo of actor Corbin Bleu, best known for his role in the Disney Channel's High School Musical movies. He has matured into a handsome young man, and between the hair and the well-defined planes of his face, he looks a lot like the character I see in my head.


STEP 1: I used the Path tool to copy him out of the background and paste him on a new layer. There are some complicated methods using high-pass filtering to preserve the detail of the hair and such, but in general, I find it faster and easier to simply define a path around the figure, Select From Path, Invert, and Cut, then use the eraser to do fine clean-up. I will usually then Select by Color the transparent portion of the layer, grow the selection by 3-10 pixels (depending on how big the photo is) and run a Gaussian Blur of 2-3 pixels to eliminate the sharp edges to the image that are a telltale giveaway that the person has been cut and pasted.


This was a quick-and-dirty conceptual piece, so I didn't do as much clean-up as I could have on his hair and neck/shoulder areas, or the gap between his chest and his right hand. I also cloned out the necklace, although not completely.

STEP 2: I added a desert background, then flipped it to make the angle of the light more closely match that of the Bleu photo. Then because my character is of a non-human race with golden cat-like eyes, I needed to change Bleu's dark brown eyes to match. First I selected the area of Bleu's eyes, cut and pasted to a new layer, then erased everything except the irises. I desaturated the image so it was black and white, then upped both the brightness and contrast until the brown area of Bleu's eyes (hardly noticeable unless you're looking at extreme magnification) was quite bright. Then I used a small brush to paint in black, darkening the pupils and extending them into catlike slits.


STEP 3: I added another layer just under the one with the copy of the irises and painted in yellow over Bleu's irises. Most irises darken at the edges, so I left a little gap between my yellow and the edge of the iris to provide an outline (I've hidden the other layer so you can see the color more clearly).


STEP 4: I set the layer mode of the iris copy to Hard Light. This allowed the natural patterns of light and dark in Bleu's eyes to overlay the yellow color I'd painted in, making a realistic looking eyeball with shadows that match the lighting in the base photo.


The eyes look a little bright and artificial at this point, so I reduced the opacity of the color layer to about 60% and the overlay to about 80%, which made the effect more subtle and natural-looking.



STEP 5: I had the eyes looking pretty good at this point. The problem now was the color. The original photo had been taken indoors, while the background was saturated in the warm colors of sunset. So I added another layer, did a Select by Color on the transparent portion of the figure layer, followed by Invert Selection. Then I filled the selection with a tone which I thought would give a good match and set the mode to Overlay. It wasn't quite right, so I fiddled with the Hue and Saturation sliders under the Color menu and played with the Opacity until I had something I liked.



STEP 6: It still didn't look right, though. Notice that on the background image, it appears to be taken at sunset, and the shadows are very deep and black. So I needed to deepen the shadows on the figure, while making the highlights pop. I couldn't simply change the contrast on the figure, because that would also change the hues, making them garish. So I copied the figure and pasted it to a separate layer above my color correction layer. I Desaturated the image, then ran a Gaussian Blur. The figure was large, so I may have gone as high as 10 pixels on this. Experiment with what works best. I erased out the irises to allow the eyes I'd worked so hard on to show through.



I set the mode to Overlay  and kept the Opacity at 100%. Notice how it makes the shadows deeper and the highlights brighter without changing the overall hues. The blur also has the added benefit of smoothing out the skin tones and giving everything a slightly alien sheen. I probably could have done this better and more easily with an Alpha Channel or something, but I still don't understand channels, so I stick with what I know.



STEP 7: At this point, I was pretty happy with the result, although I figured I would add some processing to the overall image to add a subtle iris effect to focus attention on the focal point of the picture. I usually do this on a separate image, though, so I saved what I had to a separate JPG, then added the iris effect for the final result.


I intend at some point, once the game has begun and the character has taken better shape, to do a better portrait. But as a quick-and-dirty picture that was completed in an hour or two, this is not bad, and the basic techniques are applicable to a wide variety of situations.

If this kind of article interests you, let me know and I'll do some more. I'm no expert, but I've learned a few tricks here and there, and I'm glad to share if it does someone some good.

6 comments:

Naamah said...

Ooooooh, I didn't know about the desaturate/Gaussian blur trick! I will definitely file that away, since that's exactly the solution I wish I'd come up with for several problematic projects.

Very nice!

I should've taken progress caps of my character portrait. Although, to be honest, since I was going for a really smart-looking cutout effect, 9/10 of that was just going in and cleaning up ragged edges and lines and readjusting color and other tedious, fiddly crap like that. And I am still not 100% happy with it. But I will take 85% happy.

TheyStoleFrazier'sBrain said...

I love the look you got in your portrait, but GIMP does not have the Cutout filter (or else it may be in an add-on I'm too lazy to look for). I've seen tutorials for converting photos to vector illustrations in Inkscape, but they're very labor intensive, and I don't have the time.

As for the tutorial, it was a simple reconstruction, given that I had all the steps at hand on separate layers. It was easy to hide certain layers and do a Save As for each step. I could conceivably go back and do such things with some of my other pics, except that some steps would have to be described since there's no single layer that depicts them anymore.

efamar said...

Crap--now I'm going to have to find a character portrait just to keep up with all of you!

TheyStoleFrazier'sBrain said...

Well, it's not a contest. It's just, I had been planning to do it pretty soon, in the back of my mind, and then I saw naamah's the other night and decided I might as well do it now. Unlike Smeaton, I didn't have to build a face practically from scratch, which made it quick and easy.

efamar said...

No, I'm just jealous of people who have the ability to make neat character portraits using computers. I have no skill in this.

And, in my jealousy, I forgot to say it looks awesome!

TheyStoleFrazier'sBrain said...

Thank you. Really looking forward to getting the dice rolling.