RPTools.net

Discussion and Support

Skip to content

It is currently Mon Oct 23, 2017 8:17 am 






Reply to topic  [ 6 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Tutorial: Using GIMP to create Top-Down tokens
PostPosted: Mon Feb 22, 2010 8:18 pm 
I've begun a project involving making top-down tokens from photographed WotC miniatures for use in D&D, SW, and Pathfinder games (and I imagine many other systems could find them useful). I'll be making these as generally available as (legally) possible, but in the mean time I figured I'd put together a quick tutorial on using GIMP to extract a top-down token from an existing image file (whether it be a photograph you've taken, or an image you've pulled from somewhere else).

First, advice on strategies. If you're photographing minis, especially if you plan on keeping shadows, it'll help a lot of you have a solid background behind/under the thing you're photographing. This will make it easier to make the background transparent, and if it's white, it'll make it easier to get the shadow blended into transparency, rather than turning from black into a color that might stand out when you drop the image into MT. It is also going to be tempting to use images that are not straight down. This allows more detail, and is sometimes necessary. It's fine to a degree, but I find that if you use images that are too far off the y-axis they will not look right if you start rotating them on the map in MT, especially if you have all sorts of different images rotated at different angles. It can get visually very jarring. The only solution is to bite the bullet and stick as close to the vertical as possible. (Or never rotate your images.)

If you're interested in keeping shadows (and the tutorial below assumes this), I find that it's good to use fairly diffuse and weak ambient light, get in close with your camera, and use your flash. This will throw a pretty good shadow for ya, as the flash is not located precisely where the lens is, and at such distances the difference creates a significant angle.

Here's a typical .jpg image I might start with. (Figure is the Harbinger mini, Human Wanderer.)
Attachment:
Image 1.JPG
Image 1.JPG [ 73.6 KiB | Viewed 8775 times ]


We begin by opening the file in GIMP. Go ahead and do a save-as to create a new file without overwriting the old one. If you plan on getting fancy and tweaking the image to get versions with different weapons and such, it's a good idea to save in GIMP's dedicated format, .XCF, which preserves all your various layers and such (see the - forthcoming - tutorial on manipulation of images like this for creation of a range of variations on a miniature's theme); when you've got the token as you want it, the .xcf, and then do a save-as to save the file to a MT-compatible file that preserves transparency. I use .png. (In GIMP, all you have to do is change the extension in the name of the save file and it will detect this and save to the proper format.)

So now the image is open. You should have a "Toolbox" window open, which holds the bulk of your brushes, color palettes, and selection/manipulation tools. Depending on your GIMP version (and what plugins you have installed) your toolbox and the contents of some of your menus will differ. This tutorial is based on GIMP version 2.6.7, but other version should not be too different if they're recent enough.

The first thing we want to do is start selecting the background, so we can get rid of it. Use this tool to select by color.
Attachment:
Image 2.jpg
Image 2.jpg [ 26.08 KiB | Viewed 8775 times ]
Note that when you click to activate the tool, the lower half of your toolbox changes - this provides you with options for modifying how the tool currently selected works. Next to Mode you have options that allow you to select a new region, add to the currently selected region, subtract from it, or get an intersection. The 2nd and 3rd of these are going to be our focus. Click the second to add. (Though note if for some reason your whole image starts out selected, you will need to blank the selection first with cntl-shift-A (cntl-A selects all). GIMP will probably start with a "Threshold setting of 15, which is probably just fine. What this tool does is take whatever pixel you click on, find its color, and select all pixels in a continguous region of the image (or, more precisely, of the LAYER of the image you're on - but there's only 1 right now; see below). The color of the pixel doesn't have to be exact, though, and the threshold setting tells GIMP just how close they need to be. A smaller number will result in a smaller and probably rather chaotic selection. A larger number will have GIMP selecting way too much. We're just roughing in the image, so 15 should be fine if the background is relatively homogenous. If you are using and image with a more detailed background, the simplest thing to do is select the area around the image (make sure you include all shadows), and then press cntl-I, which "inverts" your selection, making what's currently selected unselected, and vice versa. Note: GIMP has a setting for "Feather edges". We're going to want hard edges here, so make sure that is NOT checked. Note also that if the tool is set to add to selection, if our first click doesn't get close enough, we can click further into our unselected area to inch closer. We should be left with something like this.
Attachment:
Image 4.jpg
Image 4.jpg [ 61.09 KiB | Viewed 8775 times ]


What we're ultimately going to do to the selected area is turn it bone white simply hitting "delete" or using the bucket "Fill" tool set to fill with white.
Attachment:
Image 3.jpg
Image 3.jpg [ 28.36 KiB | Viewed 8775 times ]
However, GIMP will often bleed white into the unselected area if you do this repeatedly, so while it may be helpful to you to clear the area right away, it's not a good idea to delete anything until the whole area is selected, allowing you to delete only once. In our example, we have something like this.

Now that the image is roughed in, we need to get in closer. The way I do this seems tedious, but once you get the hang of it it's really very quick. We're going to use the "Free Select" tool. This has its own Mode setting, so make sure it's set to add to the selection. (If you ever mess up here, or at any point, GIMP stores selection changes, so you can hit cntl-Z to undo your mistake.) In general you're going to want to zoom in pretty close to make sure you select just right. Go in and add in little bits all around the image until you have selected every bit of the image except the token and its shadow. It's best to err on the side of selected the edge of the token rather than leaving the background, as you'll notice a pixel or two of white around it more readily than a pixel of lost edge. Go ahead an leave a fair bit of the grayish fading shadow area, if you have it. You should wind up with something like this.
Attachment:
Image 5.jpg
Image 5.jpg [ 92.42 KiB | Viewed 8775 times ]
Note: your selected area does not have to be contiguous, so you can go ahead and add in holes in the mini, say in the crook of an arm or a space created by a weapon, etc. When done, it should something like this. (Notice I've taken the chance to narrow the blades a bit, as these plastic minis often do not have an appropriately narrow blade.) Some of the details may not look right at this level zoom, but how often are you going to be zoomed this close in MT, right?
Attachment:
Image 6.jpg
Image 6.jpg [ 70.46 KiB | Viewed 8775 times ]


Hit Delete to turn the selected area, including any irregularities in the background and any elements of the base of the miniature pure white.
Attachment:
Image 7.jpg
Image 7.jpg [ 48.69 KiB | Viewed 8775 times ]

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Tutorial: Using GIMP to create Top-Down tokens
PostPosted: Mon Feb 22, 2010 8:22 pm 
A Common problem you'll face with minis is the base can be removed, but if you're trying to keep a shadow, it will often become darker as you move from the base onto your white background. In most cases this isn't noticeable enough to worry about, but you can use GIMP's fancy "Burn" tool to darken the area (remember that to work in the area of the shadow you will have to have the area selected, but you don't want to lose your current line - so use cntl-I to invert your selection, then after darkening, invert back.) If you're feeling really fancy, you can play with the edges of the shadow to straighten it, if the base's thickness causes it to appear bent. Simply darken any white area you add, and clear any dark area you remove. (Go ahead and experiment until you get the feel of it - just about everything can be undone with cntl-Z.) We can wind up with much more consistent shadows in this way.
Attachment:
Image 8.jpg
Image 8.jpg [ 50.18 KiB | Viewed 8774 times ]

The next thing we're going to do is turn all that white into transparency. Keep your selection, as this function is going to turn all white in the SELECTED region transparent - you don't want to change any white on your mini. But we also want to clean up the shadows, which should be on a rougly white background.

So the next step is to continue using the Free Select tool to select the area of the shadow. You should wind up with something like this.
Attachment:
Image 9.jpg
Image 9.jpg [ 50.93 KiB | Viewed 8774 times ]

Now that whole selected area is stuff that we'll want to turn into transparency, if it isn't dark shadow. There's a handy function that will do just this. Open the "Layer" menu of the image window and go down to the "Transparency" submenu. Select "Color to Alpha". This should turn all the pure white clear, leave the darker shadows fairly opaque and blend the grayer shadows into progressively more clear, bleeding into the transparent background. GIMP displays transparency by using a light and dark gray checker pattern. You will see this bleeding through the lighter parts of your shadows, showing you that they will be partly transparent.
Attachment:
Image 10.jpg
Image 10.jpg [ 184.46 KiB | Viewed 8774 times ]
Neat, huh? :)

At this point, with a basic token, you're just about done. I typically now clear the selection (cntl-shift-A) and use the Rectangle Select tool (check "Fixed Aspect Ratio" at 1:1, which will make your selected area a square) and block out the token. I try to put the center of the image roughly at the center of the square, but this isn't strictly necessary (nor is the square shape, per se). But you want to hack out all that unused transparency so the image fits properly into the MT grid.
Attachment:
Image 11.jpg
Image 11.jpg [ 92 KiB | Viewed 8774 times ]
Save the .xcf file. Now what I usually do is save the token image twice, once at a high resolution to preserve as much detail as possible, and once more at a lower resolution that will reduce file size and thus the strain on MT withou sacrificing too much in the way of visual quality. To do this, first use File->Save As and change the extension of the file from .xcf to .png. Now resize the image by going into the "Image" menu at the top of the image window and scrolling down to "Scale Image". You'll probably not want to distort the image, so make sure the little chain image linking the dimensions is connected, not broken. If you used fixed ratio in blocking out the image above, the two values here will be the same. Change one and hit return and the other will change to match. Neato. I usually use 200x200 for a token image that I expect won't be used at a size more than large inside MT, and if it'll be bigger I have the other image already saved. 200x200 is a good size for a token image. You could go lower but you start to lose detail, and these might be player's babies, after all. :)

Save As again (remember to change the file name - I usually just as a "s" to the end of the original name) for the new smaller image. You're done.

Here are the finished tokens in use in maptool. The one on the left is the high-res version, and on the left is the 200x200 one. Can't hardly tell no difference, eh?
Attachment:
Image 12.jpg
Image 12.jpg [ 114.37 KiB | Viewed 8774 times ]
I hope you found this helpful. Happy token-ing.

Forthcoming (if there's interest): a tutorial on using layers to manipulate images, change weapons, etc.

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Fri Sep 21, 2007 5:10 pm
Posts: 439
 Post subject: Re: Tutorial: Using GIMP to create Top-Down tokens
PostPosted: Wed Jun 15, 2011 2:54 am 
A great tutorial. It inspired me to take screenshots of Oblivion characters and make tokens from them. Trying to select around the perimeter of the desired token image is very tedious, but even a few visual "glitches" don't seem to bad to me. Thanks for the tutorial.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jun 28, 2010 11:12 am
Posts: 563
Location: I'm the worm...
 Post subject: Re: Tutorial: Using GIMP to create Top-Down tokens
PostPosted: Wed Jun 15, 2011 7:17 am 
nolgroth wrote:
A great tutorial. It inspired me to take screenshots of Oblivion characters and make tokens from them. Trying to select around the perimeter of the desired token image is very tedious, but even a few visual "glitches" don't seem to bad to me. Thanks for the tutorial.


Step 1: Go to: http://www.wowmodelviewer.org and download the Viewer.
Step 2: Go to: http://us.battle.net/wow/en/ and sign up for a free trial and download the game. Skip this step if you already have WoW.
Step 3: Use the model viewer to take screenshots via Windows snipping tool or just plain old prinstcreen and paste into GIMP or PS.
Step 4: See Plothos posts!

The awesome thing about the model viewer is that you can set the background to any color you want and the edges are very crisp on the models, making the magic wand tool work so very easily. I used this to great effect in my D&D campaign by creating top down tokens for the board and then rotating the model in the viewer for a 3/4 perspective screenshot for the portrait part of the token when you mouseover it.

I made these images in less than five minutes and that includes taking the time to download the model viewer software.


wild-boar-portrait.png
wild-boar-portrait.png [ 121.71 KiB | Viewed 6568 times ]
wild-boar-token.png
wild-boar-token.png [ 81.58 KiB | Viewed 6568 times ]
Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Fri Sep 21, 2007 5:10 pm
Posts: 439
 Post subject: Re: Tutorial: Using GIMP to create Top-Down tokens
PostPosted: Wed Jun 15, 2011 11:10 am 
Nice. They probably have something similar for Oblivion, especially as it uses DDS files, but I have not delved that far into it. Here are just a couple of samples from what I have done so far. Perhaps not professional quality, but they do the trick.
Attachment:
Berunna.png
Berunna.png [ 136.5 KiB | Viewed 6557 times ]
Attachment:
RedWizard.png
RedWizard.png [ 342.68 KiB | Viewed 6557 times ]


Need to look into the WoW process you just posted Jonathan.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jun 28, 2010 11:12 am
Posts: 563
Location: I'm the worm...
 Post subject: Re: Tutorial: Using GIMP to create Top-Down tokens
PostPosted: Wed Jun 15, 2011 11:19 am 
I like using WoW because all the monsters and even the PC's if you want to go that far will have a similar visual style. The tokens will all match and won't look odd next to each other. There's also a huge ton of variety because that boar I posted has quite a few other skins for different coloring and spikes and stuff.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 6 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman