Text Size
   
Custom Map Resize (Photoshop) PDF Print E-mail
Written by Alicia   
Wednesday, 17 March 2010 10:22

OpenRPG Tutorial - Maps

First of all you're going to need a program to convert the size of the files. Personally I use Adobe Photoshop (CS3 to be exact) so that will be the program I shall demonstrate here. Adobe has a trial for it on their site for their latest Creative Suite version. It will most likely be the same as they don't usually drastically change how their program is laid out. Here is the link for the Photoshop trial - Photoshop Extended CS4. You will need to register with Adobe to download it.

During the explaining process I may put commands in (); for example zoom tool (Z). That means you can press Z on your keyboard to automatically activate the zoom tool.

The Grid

You'll want to create the grid size you'll want to use. I am also providing the files I created if you want a quick source for 40px and 60px grid templates (grid-patterns.zip).
With Photoshop open, go to "File" > "New" (CTRL+N). A window to create a new file will open. I use the settings below for this demo:
Window for making a new canvas
The height and width of the file will determine the grid size you are creating. For this example I'm making the 60px default that OpenRPG uses for it's maps.
Change color mode to RGB and 32 bit. Most of the maps you will be converting will by color and the 32 bit will allow the max color pixelation.
It's important the background color is set to Transparent. This will allow you to create a separate layer for the grid over the map image to gauge what proportion the map needs to be. (Explained later)
When done, click "OK" to create the file.

Click the menu item "View" > "Fit on Screen". (CTRL+0)

On the left bar, click the pencil tool (CTRL+B). Set the pencil brush size to 1px. Going along the edges of your canvas use the SHIFT key to draw straight 1px edges.


Select the whole canvas by holding CTRL+A, then go to menu item "Edit" > "Define Pattern". If the Define Pattern option is grayed out, make sure the canvas is selected (there will be a dotted line around the edges).
Name your pattern and click "OK".

Double check the pattern was created by selecting the paint bucket tool (G). At the top select "pattern" from the drop down and clicking the expanding arrow, select the grid pattern you made at the end of the list.


If you want to make other sizes, you can use this canvas you just made. All you need to do is change the image size. This is done by clicking the menu option "Image" > "Image Size" (CTRL+ALT+i). Then just change the height and width to the pixel size you want. Follow the steps above for making the pattern. Notice that when you resize the canvas the lines get a little blurry. If you want you can go over them again with the pencil brush to make them a clear 1px line. Usually I don't have a problem with the line the resize creates as you're scaling the map down to about that size. Just remember when you put this grid over the map you're using, the grid lines will be double the px size of the lines (1px lines, 2 px pattern grid lines).

When you're done, you can save this for prosperities sake, in the event you lose your patterns in a reinstall, or you can just close it and not worry about saving. I think it's easy enough to recreate that it doesn't need to be saved.

Sizing the Map

Open the map you wish to resize in Photoshop. For this example I'm going to use this map which I got from the Holocron:
Armoredgear7's Map
If you want to follow along with this map, just right click the image and "save image as". It will save the full sized image to your location of choice.

Create a layer, which the grid you created will go on. Click the menu option "Layer" > "New" > "Layer..." (SHIFT+CTRL+N). Name the layer "Grid" if you want. Click "OK" when done. 

Remember how I had you check to see if the pattern you created was there? Once again, click the paint bucket tool (G), have "Pattern" selected, and choose the grid px you wish to use from the pattern array. (See image above from the grid section if you need a visual.)

Since this is a rather large map (5175 x 3375 px), I'm going to use 40px grid size. Note: It's important that you keep in mind the size of the map file. The larger the map file in KB, the longer it may take your players with a slow connection to load it.
Zoom in by clicking menu option "View" > "Actual Pixels" (ALT+CTRL+0). You should notice that this map already has a grid. The goal is to get the two grids (the map grid and your layer grid) to align as perfectly as possible. With your grid pattern selected, and your grid layer the active layer, fill the layer with the pattern. Immediately you should notice that the 40px grid you have just place down does not match the grid on this map.
Undo the pattern fill with the "Step Backward" command of ALT+CTRL+Z. You're placed grid should now be gone, but not your grid layer.

Resize the map image by going to menu option "Image" > "Image Size" (ALT + CTRL + i). Size down the pixel dimensions to what you think would be an appropriate start. Remember the scale of the map grid compared to the layer grid I want to reduce the size by at least 75%. Luckily you can change the pixel dimensions by percentage as well as manually by pixels.
Take note of the width and height in inches.
At the bottom of this window is the option to set a resample option. By using the appropriate Bicubic setting, this helps in ensuring that when you reduce or enlarge the image it will have the highest graphic quality possible.
You particularly want to use the "Bicubic Smoother" option when enlarging a map that has an originally smaller grid than the one you're creating.
ResamplingResampling
With the pixel size of the map smaller you're now going to have to manually zoom in. Click the magnifying glass zoom tool (Z) on the left and click at the upper left hand corner. This corner is important as this is where the grid layout starts and this is where you'll first want to align the two grids.

Use the bucket tool (G) to fill in the grid pattern onto the grid layer. Notice now how they're starting to match up, but still not close enough?

This map has a slight black border which is messing up the alignment of the grid. To fix this, click the move tool (V) and with the background layer active move the map image till a bottom corner of the grids align. I usually use the bottom left corner of a square I can clearly see as my focus. (If you get a message saying the layer is locked, right click the background layer and select the first option "Layer from Background". Name it if you want and click "OK".) 
You'll want to make sure you have the two grids aligned correctly, so you'll want to hide/unhide the layer grid by clicking the eye on the layer panel next to the layer info. Make small move adjustments to the map using your keyboard.
The white circle indicates where I matched up the grid.

Notice that the map lines (highlighted) are inside the layer grid lines. That means the pixel size of the map is too small. If they had been outside the grid layer lines then the map would be too big. Sometimes it may be hard to tell till you get the lines close together. If that's the case then just repeat the sizing steps till you get it.

With the idea of whether you need to increase the size of the map or decrease it. Use "Step Backward" undo (ALT+CTRL+Z) till you remove the grid layer lines, but not the layer itself (use "Step Forward" undo (SHIFT+CTRL+Z) if you go too far). Note: It's important to remove the lines each time. Otherwise, you will just be resizing the grid layers lines and won't have a reference point to use in the resizing process.

Now if you need to make the map image larger, I recommend going back one more step so the image size is it's original; otherwise, you may degrade the image quality. Before you go back a step, however, open up the Image Size window (ALT+CTRL+i) and take note (write it down!) of what the current pixel size is. This will give you a starting point once you reset to the original image size and will save you a little bit of time.
With that said, you essentially go through the same steps. Entering a higher pixel number if the map is smaller, or smaller pixel number if it's too large. With practice you'll be able to determine the range in which to change it and it's usually hit and miss at first till you narrow it down.

When it looks very close, hide/unhide the grid layer to make sure you're lining up correctly before you go on to check the rest of the map. Just because the section you're looking at is lining up, doesn't mean it will be at the bottom right corner. Even a minuet 1px change could make all the difference in that corner.

The following steps may be repeated till the correct size is found:
  1. Make sure the grid layer is empty (no visible lines).
  2. Use Image Size window (ALT+CTRL+i) to adjust the size of the map image
  3. With the grid layer active, use the bucket tool (G) to fill in the grid lines
  4. With the map layer active, use the move tool (V) to line up a corner of the two grids (map and grid layer)
  5. Check to see if the map image is smaller or larger than grid layer.
  6. "Step Backward" undo (ALT+CTRL+Z) till you remove the layer grid lines (it will move the map to it's original placement). If you go back too far, use "Step Forward" undo (SHIFT+CTRL+Z).
  7. Rinse and repeat till the lines match up to your satisfaction through out the map.
Last Updated on Wednesday, 07 March 2012 20:26
 
Favorite Server
 
Your Current Version of OpenRPG
 

Help supppot SWrpgRC.com