Decals

From MW4:Wiki

Jump to: navigation, search
(Things that will affect file size)
 
Line 1: Line 1:
-
I'll be using Photoshop 6 for this tutorial, but most image editing software newer than MS Paint should be able to do most everything in this guide. A free image editor called "GIMP" can be found at [http://www.gimp.org/ www.gimp.org].
+
I'll be using Photoshop 6 and GIMP 2 for this tutorial, but most image editing software newer than MS Paint should be able to do most everything in this guide. A free image editor called "GIMP" can be found at [http://www.gimp.org/ www.gimp.org].
-
 
+
If you would like to share your decals with others, you can upload them to this page here: [[Decal Download Page]]
-
[[image:warning.png]] Note for Photoshop CS3, CS4 and CS5 users: These versions of Photoshop handle .tga files in a way that is incompatible with MW4:Mercs needs to make transparencies work. To get these versions to work, you will need the Targa.8BI plugin from Photoshop 7.
+
-
*UPDATE: You can download the necessary plug in [http://www.jadefalconclan.com/downloads/TGA_fix_for_Photoshop.rar [here]]. Put it into your Photoshop's file format folder inside the plugins folder. This has been tested with Photoshop 8, CS3 and CS4. Thanks to AnTi90d.
+
*UPDATE: I've included some separate instructions for people using Gimp 2. The version I am using is the version that can be found at the link at the top of this page.
*UPDATE: I've included some separate instructions for people using Gimp 2. The version I am using is the version that can be found at the link at the top of this page.
 +
 +
== Making Custom Decals ==
== Making Custom Decals ==
Line 18: Line 18:
This is fairly clean with sharp edges and only two colors and it's already a square.
This is fairly clean with sharp edges and only two colors and it's already a square.
*If it hadn't been a square, I could have fixed it like this:
*If it hadn't been a square, I could have fixed it like this:
 +
 +
'''Photoshop'''
[[Image:Canvas.jpg|left|thumb|100px|Canvas Size Box]]
[[Image:Canvas.jpg|left|thumb|100px|Canvas Size Box]]
-
In Photoshop 6, I can go to image> canvas size>
+
In Photoshop 6, go to Image> Canvas Size>
*Choose pixels from the drop down list
*Choose pixels from the drop down list
*Changed the largest number to the smallest
*Changed the largest number to the smallest
*Choose the center box to keep the image centered in the crop. You can also choose to have it center on one of the sides.
*Choose the center box to keep the image centered in the crop. You can also choose to have it center on one of the sides.
-
*Now I need to resize it to 64x64 pixesls.  
+
 
-
**In Photoshop 6, I go to image> image size> and change the width and height values to '64' pixels.
+
 
-
**In Paint Shop Pro X, I go to image> resize> and change the width and height values to '64' pixels (Choose Pixels in the pixel dimensions area).
+
 
 +
 
 +
 
 +
 
 +
 
 +
'''Gimp'''
 +
[[Image:Canvas2.jpg|left|thumb|100px|Canvas Size Box]]
 +
In Gimp 2, go to Image> Canvas Size>
 +
*Unlink the chain symbol
 +
*Choose 'pixels'
 +
*Resize the largest number to the smallest one
 +
*In the large box area, center the image where you want it
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
Now I need to resize it to 64x64 pixesls.  
 +
 
 +
'''Photoshop'''
 +
*In Photoshop 6, I go to Image> Image Size> and change the width and height values to '64' pixels. Press 'OK'.
 +
 
 +
'''Gimp'''
 +
*In Gimp 2, I go to Image> Scale Image> and change the width and height values to '64' pixels. Press 'Scale'.
The image below is what I get. As is, it's already suitable to be used as a decal.
The image below is what I get. As is, it's already suitable to be used as a decal.
Line 35: Line 65:
</tr>
</tr>
</table>
</table>
-
 
-
 
-
 
-
 
Next I'll need to convert it to a format the game will recognize.
Next I'll need to convert it to a format the game will recognize.
Line 53: Line 79:
First I'll prep my image to be as small as possible. Here's a couple of things you can do in Photoshop 6:
First I'll prep my image to be as small as possible. Here's a couple of things you can do in Photoshop 6:
*Convert the image to index mode. This will limit the number of colors used to 256
*Convert the image to index mode. This will limit the number of colors used to 256
-
**In Photoshop 6, go to Image>Mode>Index
+
**In Photoshop 6, go to Image>Mode> and choose 'Index Color'
-
**In Paint Shop Pro X, go to Image>Decrease Color Depth>256 Color Depth. Press OK.
+
 
-
***Even though Greyscale would lower the color count even more, the game won't recognize a greyscale decal.
+
'''This step is unnecessary in Gimp 2.'''
Next, save the image as a .tga image.
Next, save the image as a .tga image.
Line 62: Line 88:
Next I need to save it as a targa.  
Next I need to save it as a targa.  
*In Photoshop, go to File>Save As>
*In Photoshop, go to File>Save As>
-
**Enter a file name. I chose 'crossbones'.
+
**Enter a file name. I chose 'crossbones'
**Chose the 'Targa' (.tga) file type
**Chose the 'Targa' (.tga) file type
-
**Press 'Save'.
+
**Press 'Save'
-
*In Paint Shop Pro, go to File>Save As>
+
-
**Enter a file name. I chose 'crossbones'.
+
-
**In the options box, choose '16 bits Compressed'
+
-
**Press 'Save".
+
 +
[[Image:Save.jpg|thumb|100px|left|save as .tga]]
 +
In Gimp 2, go to File>Save As>
 +
*Enter a file name. I chose 'crossbones'
 +
*Under 'Select File Type' choose 'TarGA'
 +
*Press 'Save"
 +
*Check the box for RLE compression and leave the origin as bottom left
-
Now I can check to make sure my file size is within tolerance. I'll navigate to where I saved my image, right click it, and choose 'Properties' at the bottom. Photoshop gives me a file size of 4.79kb and Paint Shop Pro gives me a file size of 4.11kb. So they are both good. The next step is to import the decal into MechWarrior4.
 
-
=== Importing the Image to MechWarrior 4 ===
+
 
 +
 
 +
 
 +
Now I can check to make sure my file size is within tolerance. I'll navigate to where I saved my image, right click it, and choose 'Properties' at the bottom.
 +
*Photoshop gives me a file size of 4.79kb
 +
*Gimp 2 gives me a file size of 3.94kb
 +
 
 +
So they are both good. The next step is to import the decal into MechWarrior4.
 +
 
 +
== Importing the Image to MechWarrior 4 ==
Navigate to the root directory of your MW4 installation. For example, mine is located at "C:\Program Files\mektek.net\Mechwarrior Mercenaries - Mektek Mekpak". From there go to "\Content\Textures\customdecals". This is where you should move your .tga file. After you put your image there, you should check to make sure it works in the game.
Navigate to the root directory of your MW4 installation. For example, mine is located at "C:\Program Files\mektek.net\Mechwarrior Mercenaries - Mektek Mekpak". From there go to "\Content\Textures\customdecals". This is where you should move your .tga file. After you put your image there, you should check to make sure it works in the game.
Line 95: Line 131:
That's it for making basic decals.
That's it for making basic decals.
-
=== Transparent Decals ===
+
== Transparent Decals ==
-
Maybe you're not happy with the black box with the crossbones inside or you would rather not have a square decal but want a circle one instead. That's possible if you can edit the alpha channel of an image. The downside to transparent is that though they are still constrained to 5KB, they have more information. So something has to be sacrificed to make these decals work in game. In this case, the decals can only be a quarter of the size of normal decals, 32x32 pixels (or with some more restriction of the decals palette, can be kept at 64x64). That means the picture will be even less detailed.  
+
Maybe you're not happy with the black box with the crossbones inside or you would rather not have a square decal but want a circle one instead. That's possible if you can edit the alpha channel of an image. The downside to transparent is that though they are still constrained to 5KB, they have more information. So something has to be sacrificed to make these decals work in game. Either the image must be shrunk down farther or the number colors used by be decreased. Either way the picture will be even less detailed.  
-
==== Requirements for Transparent Decals to Work ====
+
=== Requirements for Transparent Decals to Work ===
*File size must be 5KB or smaller
*File size must be 5KB or smaller
*File type must be .tga (Targa)
*File type must be .tga (Targa)
Line 110: Line 146:
***This is useful to know if you want the decal to blend more seamlessly onto your mech. Usually I will use an 80% shade of grey for my decals.
***This is useful to know if you want the decal to blend more seamlessly onto your mech. Usually I will use an 80% shade of grey for my decals.
-
==== Prepping the Image ====
+
=== Prepping the Image ===
I'll start with my 300x300 crossbones image.  
I'll start with my 300x300 crossbones image.  
<table>
<table>
<tr>
<tr>
-
<td width="600" valign=top>The first thing I will do is delete the black area of the image I don't want to be visible.
+
<td width="600" valign=top>
 +
The first thing I will do is delete the black area of the image I don't want to be visible.
 +
'''Photoshop'''
In photoshop, the magic want set to a tolerance of 5 works well.
In photoshop, the magic want set to a tolerance of 5 works well.
 +
[[Image:Magic wand.jpg]]
 +
#Use the wand to select the black areas and press delete twice. That will leave us something similar to the image to the right.
 +
:*Make sure the layer you are working isn't locked. If it is, duplicate it to a new layer and delete the locked layer.
 +
 +
'''Gimp'''
 +
#Go to Layer > Transparency > and select 'Add Alpha Channel'
 +
[[Image:Fuzzy select tool.jpg|thumb|x100px|left|Fuzzy Select Tool Settings]]
 +
#Select the 'Fuzzy Select Tool'
 +
#Set the threshold to '10'
 +
#Select the black area and press delete twice
</td>
</td>
-
<td>
+
<td valign=top>
[[Image:decal1.jpg|left|thumb|Deleting the extra stuff]]
[[Image:decal1.jpg|left|thumb|Deleting the extra stuff]]
</td>
</td>
Line 124: Line 172:
<table>
<table>
<tr>
<tr>
-
<td width="600" valign=top>Next, I will select everything and give it a heavy border. I want to do that so the border is easily visible when I shrink it down to 32x32 pixels.
+
<td width="600" valign=top>Next, I will select everything and give it a heavy border. I want to do that so the border is easily visible when I shrink it down to either 64x64 or 32x32 pixels.
-
*In photoshop, go to Layer>Layer Style>Stroke. Change the stroke color to black and the size to '10'.
+
 
 +
'''Photoshop'''
 +
#In photoshop, go to Layer>Layer Style>Stroke. Change the stroke color to black and the size to '10'.
 +
 
 +
'''Gimp'''
 +
#Select your main layer and create a duplicate layer by going to Layer> and choosing 'Duplicate Layer'
 +
#Using your Fuzzy Tool, click in the transparent background area.
 +
#Select the skull by inverting your selection. Go to Select> and choosing 'Inverse'
 +
[[Image:Stroke.jpg|thumb|left|x100px|Stroke Settings]]
 +
#Create the Stroke by going to Edit> and choosing 'Stoke Selection'
 +
#Copy the settings from the image to the left
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
[[Image:30 stroke.jpg|thumb|left|x100px|Stroke Effects]]
 +
You will end up with something that looks like this.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
[[Image:15 stroke.jpg|thumb|left|x100px|Stroke Corrected]]
 +
#You should still have the outline of the skull selected.
 +
#If you do, simple press delete and you should get an image similar to the one to the left
 +
:*If you accidentally deselected the skull, just use the fuzzy tool to select the skull in the other layer, invert the selection, and press delete.
</td>
</td>
-
<td>
+
<td valign=top>
[[Image:decal2.jpg|left|thumb|Adding a border]]
[[Image:decal2.jpg|left|thumb|Adding a border]]
</td>
</td>
Line 134: Line 220:
<table>
<table>
<tr>
<tr>
-
<td width="600" valign=top>Now I want to be able to select my image and the new border using the magic wand.
+
<td width="600" valign=top>Now I want to flatten my image to one layer so it's easier to work with.
-
*In photoshop, the easiest way for me to do this is to create a new transparent layer below my current one, then merge it down. Go to Layer>Merge Down.
+
 
-
*Now I can use my magic want to easily select my image by clicking the empty area, then inverting my selection by going to Select>Inverse.
+
'''Photoshop'''
 +
#In photoshop, the easiest way for me to do this is to create a new transparent layer below my current one, then merge it down. Go to Layer>Merge Down. *Using Layer>Flatten Image will fill in my background with white which is something I don't want.
 +
#Now I can use my magic want to easily select my image by clicking the empty area, then inverting my selection by going to Select>Inverse.
 +
 
 +
'''Gimp'''
 +
#In Gimp, simply go to Layer> and choose 'Merge Down' until you only have one layer left
</td>
</td>
<td>
<td>
Line 145: Line 236:
<table>
<table>
<tr>
<tr>
-
<td width="600" valign=top>Now that I have my selection, I can easily create my Alpha Channel.
+
<td width="600" valign=top>
-
*In photoshop, I go to the channels window by going to Window>Show Channels. I now see four channels: RGB, Red, Green, and Blue.
+
Now I can easily create my Alpha Channel.
-
*Create a new channel by clicking 'Create New Channel' at the bottom of that window. That gives me a black square with an outline of my crossbones.
+
 
-
*I want to fill that area with white so it will be visible in my decal. Go to Edit>Fill and use White.
+
'''Photoshop'''
-
*If you want to blend it to let some of the dirt and paneling of the mech show through, make a color that is 80% grey and fill the crossbones with the paintbucket too.
+
[[Image:Alpha.jpg|thumb|100px|left|Layers Window]]
-
*After you fill it, you can deselect the image.
+
In photoshop, I go to the channels window by going to Window>Show Channels. I now see four channels: RGB, Red, Green, and Blue.
 +
#Create a new channel by clicking 'Create New Channel' at the bottom of that window. That gives me a black square with an outline of my crossbones.
 +
#I want to fill that area with white so it will be visible in my decal. Go to Edit>Fill and use White.
 +
#If you want to blend it to let some of the dirt and paneling of the mech show through, make a color that is 80% grey and fill the skull and crossbones with the paintbucket.
 +
#After you fill it, you can deselect the image.
 +
 
 +
'''Gimp'''
 +
[[Image:Alpha2.jpg|thumb|100px|left|Layers Window]]
 +
#In Gimp, right click on your layer and choose 'Add Layer Mask'. Choose 'Transfer Layer's Alpha Channel' and press 'Add'.
 +
#If you want to blend it, select your skull (Fuzzy wand/Invert) and use the paintbucket with a color of 80% grey and fill the skull and crossbones with the color. You should see the grid behind it slightly show through.
 +
#Once you are done, right click on the layer and choose 'Apply Layer Mask'.
</td>
</td>
-
<td>
+
<td valign=top valign=top>
[[Image:decal4.jpg|left|thumb|Adding the Alpha Channel]]
[[Image:decal4.jpg|left|thumb|Adding the Alpha Channel]]
</td>
</td>
Line 159: Line 260:
<table>
<table>
<tr>
<tr>
-
<td width="600" valign=top>The only step left now is to re-size the image.<br>
+
<td width="600" valign=top>The only step left now is to re-size the image. You are left with two options; You can choose to make it a 32x32 image and be done with it, or you can go an extra step and make it a 64x64 decal with transparency.
-
*In photoshop, go to Window>Show Layers and select your layer.
+
 
-
**Resize your image by going to Image>Image Size. Change the width and height fields to 32 and press OK.
+
====Resizing Your Transparent Decal====
-
**After resizing, I would suggest creating a completely black layer under your image layer to ensure there isn't any white spots on the edge of your transparencies. That is completely optional though and usually not necessary.
+
 
-
*Save as a .tga and select 32 bits/pixel. Anything less won't retain the alpha channel.
+
'''32x32 Decal'''
-
*To create a 64x64 decal with transparency, you will need to take an extra step using Gimp [See top of this page for a link].  
+
#In photoshop, go to Window>Show Layers and select your layer.
-
**First re-size your image to 64x64 instead of 32x32 and save it.  
+
##Resize your image by going to Image>Image Size. Change the width and height fields to 32 and press OK.
-
**Then open your .tga in Gimp. You should see the transparent area as being a tinted checkered pattern.  
+
##After resizing, I would suggest creating a completely black layer under your image layer to ensure there isn't any white spots on the edge of your transparencies. That is completely optional though and usually not necessary.
-
**Go to Color>Posterize. A slider with a number going from 1 to 255 should appear. The program will probably automatically select the optimum number of colors you need for your image. For my crossbones image, I only needed three. To keep your file size under 5KB, you will have to use 16 colors or less, and possibly even fewer than that.
+
#Save as a .tga and select 32 bits/pixel. Anything less won't retain the alpha channel.
-
**After you press ok, to to 'Save As' and overwrite your file. A window allowing you to use RLE compression should appear, press Yes and save. Check your file size.  
+
 
 +
'''64x64 Decal'''
 +
#To create a 64x64 decal with transparency, you will need to take an extra step using Gimp [See top of this page for a link].  
 +
##First re-size your image to 64x64 and save it as a .tga file.  
 +
##Then open your .tga in Gimp. You should see the transparent area as being a tinted checkered pattern.
 +
##Go to Image>Mode and choose 'Index'. In the window that pops up, change the number colors to the minimum you think will be acceptable for your decal. The fewer colors you use, the smaller your end file will be. *'''Change the Image back to RGB Mode!!!''' Image>Mode> Choose 'RGB'. The Decal won't work if it's left in index mode.
 +
##Go to Color>Posterize. A slider with a number going from 1 to 255 should appear. This will fine tune the number of colors you use from the previous step. Keep decreasing the number of colors until your file is smaller than 5kb. For my crossbones image, I only needed three. To keep your file size under 5KB, you will have to use 16 colors or less, and possibly even fewer than that.
 +
##After you press ok, to to 'Save As' and overwrite your file. A window allowing you to use RLE compression should appear, press Yes and save. Check your file size.  
If it's under 5KB, transfer it to your 'customdecals' folder and try it out.
If it's under 5KB, transfer it to your 'customdecals' folder and try it out.
 +
 +
==Things that will affect file size==
 +
*Alpha Channel containing more than one color - No gradients from black to white!
 +
*Colors - Try to use as few colors as you can in your decal.
 +
**Decrease the number of colors in your decal by going to Image>Mode> Choosing 'Index' and changing the number of colors there. Start with 16 colors and whittle the colors down as much as you can while keeping the image clear. Then change it back to RGB mode (Image>Mode>RGB).
 +
**You can further decrease the number of colors after that step by going to Color> and choosing Posterize. Keep doing that until the file size is below 5kb.
 +
</td>
</td>
<td>
<td>

Latest revision as of 05:21, 16 January 2011