Converting a graphic to Blizzard's BLP format, creating a TGA file (which is optionally partially or fully transparent) along the way.
These directions were made from scratch, and so far haven't been tested. (It took me long enough to make these directions, and at the time of this writing, I don't feel like repeating the whole process again to check the directions for any possible errors.) The process worked perfectly as I went through the entire process and documented what I was doing.
Making my own partially-transparent .blp graphic:
-
Found something to do
-
World Of WarCraft Tools Page
-
Downloaded the User Interface Customization Tool (CustomInterfaceKit.zip)
-
Ran "Custom Interface Kit.exe"
Renamed up the Interface directory in my WoW directory (renamed "Interface" to "i")
-
Clicked on Install Interface Data, and crashed the User Interface Customization Tool.
-
Re-ran User Interface Customization Tool, and selected Install Interface Art.
-
Renamed the Interface Directory to BlizExt.
-
Selected "Install Interface Data"
-
This made a Interface\Docs.html, which had different garbage bytes after the </html> than the garbage bytes in BlizExt\Docs.html. This also made a Interface\FrameXML directory, and there was no BlizExt\FrameXML directory.
-
Moved Interface\FrameXML to BlizExt\FrameXML.
-
Renamed my original Interface directory back from "i" to "Interface".
-
Decided I wanted to replace the extracted art located in BlizExt\Glues\LoadingScreens\ (specifically the LoadScreenEasternKingdom.blp file).
-
Found dimentions of LoadScreenEasternKingdom.blp
-
Ran MyWarCraftStudio.exe
-
Opened Interface.MPQ (since I knew where the .blp file was from earlier)
-
Found that the image is 512x512. Saved the image. Cherished the fact that the image is upside down when MyWarCraftStudio exports it.
-
Resized the 512x512 image to being 512x1536 (3 times as tall), then 512x384 (3 times as tall). Then the image looked like it was scaled correctly. This confirmed for me, whatever 512x512 image is stored in the .BLP gets resized from a 1:1 ratio to a 4:3 ratio before WoW displays it.
Installation
-
Run PSP 9.01 Eng Trial (113MB), wait 10 seconds after running the program for the installation program to show up at all, then install the Paint Shop Pro 9. Reboot as instructed. Note that the installation file for Paint Shop Pro 8.01 Evaluation (57MB) is less than 501/2% of the filesize as the comparable file for PSP9. However, these directions were made for PSP9 (with some notes about PSP7).
Open software
-
Continue Free Trial
-
At this point is when this version asks about file assosications. Rather well behaved, it does insist on associating itself to its own native file format, but nicely it will default to associating itself to all extentions that have no other associations, and only those extentions.
-
"Skip" taking a moment to register the software.
Copy an image
-
File, Open. Select a file, and before clicking Open, see what the resolution is, in case this information is useful somehow. Then click open.
-
Ctrl-A (select all), Ctrl-C (Copy), Ctrl-F4 (close current child window, the graphic), No to save changes.
-
Edit, Paste as New Image. Now any accidental changes to this changed image won't affect the original. This image automatically gets a title of Image1, which you can see in the title bar of the child window.
Resize an image to the desired size of the target image: 512x512.
-
We first want to make sure the source image looks good at a 4:3 aspect ratio, meaning the graphic is 4/3 as wide as it is tall. Because my source image was already at a 4:3 aspect ratio with its 640x480 resolution, and the image looked great in its natural resolution, no change was needed.
-
Image, Resize. Uncheck "Lock Aspect Ratio". Ignore the "Print Size" area, change the percentages in the "Pixel Dimensions" area, noticing the Pixel Dimensions shown above the percentage areas. Decided then I didn't want to change by "percent", so I clicked the drop-down box next to the Width and Height boxes and changed the option in the drop-down box from "percent" to "pixels". Selected 512x512 and went through with the resize. The image looked stretched tall, but that is okay, because WoW will apply a 3:4 stretch to the image and modify the aspect ratio. For this to look good in WoW, we want it to look stretched tall in our graphics editor.
Make an alpha channel. (This is what deals with transparency!)
-
First step in making an alpha channel is to make a mask.
-
First step in converting in image into a mask is to have an image to use. Directions to make the source image:
-
File, New. Image resolution is the same as what the final saved result is going to be: 512x512. Color Depth: 24-bit color. Paint Shop Pro makes a blank image.
-
Everything that is black in the image will be transparent (based on an "luminance" option chosen later). I made the entire new image black (even though I really wanted it to be white), just to demonstrate in this tutorial how to fix it.
-
In Paint Shop Pro 7, I needed to click one of the two boxes above the rainbowish color box in the upper part of the right toolbar, because the default "color" was a texture rather than a solid color. In PSP 9, it defaulted to a Black Color so I didn't need to do this.
-
On the left toolbar, select the paint can that is being poured. The tooltip for this says "Flood Fill Tool (F)". As expected, I then switched tools and pressed the F key and it re-selected the flood tool.
-
Flooded the entire image with black pixels.
Now, however, I decided to fix the trouble I caused. Whatever is dark in this new image will cause transparency in the final result. Whatever is bright will cause pixels to be opaque. If I wanted semi-transparencies, I would be working with one of 256 different shades of grey. Right now the image became black, but I really should make the image white, so I fixed the "trouble" I just caused by flood-filling the image with the color I really desire: White.
-
I made everything white. In Paint Shop Pro 9, I saw a "Materials" box on the right toolbar. I clicked on the larger black image, and changed the RGB values to 255, 255, 255. Although I did this manually, I later found that the lower-right square in that rectangle of colored squares was white: When highlighting that little square I saw the RGB values there were what I wanted, all values of 255.
-
Then I pressed OK to accept this white color and flood filled the entire image so it was now white.
-
I made a mental note of the name of this brand new white image I created. The title bar of this child window said "Image3", because I had made a couple of other images in this Paint Shop Pro session (one was from pasting to a new image, the other was from some other image I toyed with but closed).
-
Now that we have a source image that we can use as a mask, we need to actually use that as a mask.
-
I ensured that the child window that was active was the 512x512 image I wanted to save (and not the solid white image I just made). With this as the active window, I created a mask.
-
The next step depended on what version of Paint Shop Pro I was using:
-
In Paint Shop Pro 9:
-
In Paint Shop Pro 9, I found the option under the Layers menu. I believe in PSP 7, it might have been under a Masks menu.
-
In the Layers menu, I selected "New Mask Layer" (instead of Load/Save Mask, where I could have then loaded a mask from disk). I then selected "From Image", which means that we'll use one of the images open in Paint Shop Pro (specifically the solid white image in another child window).
-
A dialog box popped up, asking me which image. In the drop-down box I selected the entry that matched the name from the title bar of the child window that had the white image I created. That is, the white image's title bar said "Image3" on it (if you followed these directions strictly, it probably would be called "Image2", so I picked "Image3" since that matched for me.) This did NOT default to the correct value for me, so I had to make sure I was choosing the name of the solid-white image I created elsewhere.
-
Before pressing OK, I noticed that the default option selected was "Source luminance". This ends up meaning that whatever darkness existed in that white image I made ends up becoming transparent. Since I had no darkness in a completely white image, nothing ended up being transparent. (In contrast, when I was making transparent pixels, I still kept "Source luminance" selected but was dealing with an image that was entirely black instead of entirely white.)
-
In PSP 7, the menu options were:
-
Earlier I had selected the entire image, with Control-A. I needed to have the entire image unselected, so I went to Selections Menu, Invert.
-
Then I went to: Masks, New, From Image
-
(This Window, Source Luminance, press OK)
We could then close the solid white image if desired, so that we don't accidentally refer to that window. This process has made a mask out of Image3 (the solid white image) that I selected in that drop down box, and applied the mask to Image2 (the image I'm trying to convert to a nice .blp file) which is what I had highlighted before I selected the "New Mask Layer" option.
-
This completed the steps of creating a mask.
-
Now that the mask was created, the next thing to do was to create an "Alpha Channel". (This is what really provides the transparency.) In Paint Shop Pro, Alpha Channels are created not from images, but from masks, and so that's why we had to create a mask earlier.
-
PSP 9 directions: The menu options are: "Layers" menu, Load/Save Mask, Save Mask to Alpha Channel. Under the "Add to document" section, make sure this points to the name of the graphic you want to save. (This is different than before, where we referred to the name of the child window with the solid white image. That doens't need to be specified now, because we're using the Mask as the source.)
-
In PSP7, the menu options for this were: Masks, Save to Alpha Channel. The "Available Documents" section will list the title of your graphic (seen in the Title Bar that follows the child window your graphic is in). Select "New Channel" and press OK.
-
PSP will ask for a name for the Alpha Channel. Call it whatever you wish and press SAVE (or maybe "OK" in older versions?).
-
Just to point out, I don't know how to change an Alpha Channel once it is made. In any experience I've ever had of dealing with transparencies in Paint Shop Pro (no matter what Paint Shop Pro version, and no matter what project I was dealing with transparencies with), I would always simply throw away any old alpha channel (by converting an image to an Alphaless *.BMP bitmap image), and then make a new image and make a brand new alpha channel, perhaps salvaging the old mask somehow.
Save the image to the correct format.
-
File, Save As.
-
Save as type: Should say "Truevision Targa (*.tga)".
-
Once the type is saying the right thing, choose the Options button.
-
The Save Options dialog box will default to the last option, initially 24-bits Compressed. This is not good. Make it say 24-bits Uncompressed.
-
I do believe that what gets saved here is actually 24-bits plus an 8-bit alpha channel, so in that case it means you're really saving a 32-bit image.
-
Give the image a name and save.
-
A dialog box says, "Because of the limitations of the specified file format (and possibly the save options you've selected), the saved file will be limited to a merged image. Also as a result of these limitations, only one alpha channel will be saved. Would you like to continue?". Select "Yes".
-
In Paint Shop Pro 9, you can to go Help, Help Topics, Search, and search for "Alpha Channel", click "List Topics", and select "Saving Masks to Alpha Channels". It says "When you save the image to a file format other than .PspImage format, the alpha channels are not saved." This is false. What would be true is if it said, "When you save the image to a file format that doesn't support alpha channels, the alpha channels are not saved. Most older file formats other than the .PspImage format do not support alpha channels." Some file formats, such as TGA and PNG, do support one (in the case of TGA) or more (I think PNG does) Alpha Channels, which I find refers to about each pixel in a graphic other than its color, such as transparency information.
Convert the TGA file to BLP.
-
Technetium's TGA to BLP2 convertor.
-
Note that I've heard lots of problems with this converter, and I've experienced some. It seems this converter works fine with the TGA files that I made using the process outlined above, but there are many other TGA files that, although they are valid TGA files, the current version (dated January 21, 2005) of this simplistic converter doesn't handle well.
Place the resulting BLP file where it should go.
-
In the case of this non-transparent 512x512 graphic, we're looking at placing it in the location Data\Interface\Glues\LoadingScreens\LoadScreenEasternKingdom.blp underneath where WoW is installed.
-
Make sure there is no conflicting file. For example, if the file Interface\Glues\LoadingScreens\LoadScreenEasternKingdom.blp exists (not in the DATA directory), then the file placed in Data\Interface\Glues\LoadingScreens\LoadScreenEasternKingdom.blp doesn't get used. I found this out when Blizzard's "User Interface Customization Tool" (CustomInterfaceKit.zip) saved a copy of the original file under the Interface\, not the Data\Interface\, directory.
Run World of WarCraft and load up a character who is on the Eastern Kingdoms continent (like where a Human or Undead character starts out at when first created, not like where a Night Elf or Orc starts out when first created), and check out the new loading screen. Notice that the loading screen worked perfectly, and is displayed in a 4:3 aspect ratio, so it is being displayed wider than the 512x512 square image that was saved. Fortuantely the 512x512 image I saved compensated for this expected stretch.