THIS TUTORIAL IS UNDER CONSTRUCTION
As you have already learned in the previous part of our tutorial, World of Warcraft uses 4 layers to store the texturing data. Every layer of textures, except for the first one, is basically a usual grayscale image. So, there is a way to do texturing work a lot faster by editing those layers as a whole images. This process is known as alphamapping. You could see the result of alphamapping in the previous parts of our tutorial when you worked with our tutorial map.
For using and learning alphamapping you would need a good 2D graphics editor. We recommend to use Adobe Photoshop CS6, but you can also use Gimp. The process will be explained using Photoshop, so some parts and functions may be different in your editor.
Before you start creating your first alphamap, you should think about organizing the layers properly. As we are limited to 4 textures per chunk, you should decide what you are going to place on every layer of your alphamap. As you can see in the PSD demo above, Blizzard developers are not very organized with their layers, and it will only make things more complicated for you in the future.
Now I’ll quickly explain my own system. First layer (the one you cannot edit) is always dirt for me, the second one is rock, then goes grass and the last one is darker/lighter grass. As you see, all 4 slots are already used, but sometimes you need to make a road or whatever you want. Most people just avoid using the dark/lighter grass layer which obviously makes your final zones look way worse. The solution is actually really simple: you just need to place your road on the same layer on the rock layer where there are no actual rocks around, so you’d be able to swap it to whatever you want.
So, now when you’ve got the basic understanding of how texturing works, you can try creating your first alphamap.
Step 1. Preparing your working space.
Every ADT files basically contains 3 grayscale 1024*1024 pixels .png images which we will need to edit for creating alphamapped texturing. It is not convenient to edit all your .ADTs one by one, so we are going to create a single image for the entire map.
Start your Photoshop. Go to “File” and select “New…”. Enter any name you like. Fill in width and height depending on the amount of .ADTs you have on your map. Just count how much .ADTs your map has in width and height and multiply each value by 1024. As an example I took a 5 x 5 map. So, 5 x 1024 = 5120. Press “Okay”.
- As a result you will see a white space. Pick up the “Paint Bucket Tool” and fill the area with black color.
Now you need to divide your image into slices which represent every .adt file in your map. In order to do that, first go to “View”, choose “Show” and enable “Slice”. Also make sure “Extras” is also activated. Then find a “Crop tool” icon on the toolbar, right click on it and select “Slice tool” in the dropdown. Select the whole area with it, right click somewhere and select “Divide Slice…”. You will see the following window.
Now right click on every slice and select “Edit slice options” and change the name of every slice to its coordinates on the ADT grid. It is boring, but it will save you a lot more time in the future.
Step 2. Creating the alphamap
Open the following folder: “WoWDevKit/Tools/Futa/Templates/”. Import some mountain templates from that folder in Photoshop and make a desired landscape layout out of them. You can copy, rotate and paste the same piece of template as much as you want. But don’t be repetitive in order to create a better map. Also try to avoid resizing mountains, especially making them bigger. It will make the texturing look blur in the game. So, here is an example landscape:
I also recommend to create a separate layer and fill every ADT there with “chunks.png” that is provided in the “Templates” folder. It will help you to organise chunks properly when you need to create a road or something else that requires additional texture.
Now create two additional layers out of dark grass and light grass templates. Switch back to your mountains layer, right click on it and press “Select pixels”. Switch back to one of the grass ones. Press “Delete”. Hide the revealed mountain layer. This is how it should look like:
- Do the exact same thing for the second grass layer (exclude mountains pixel from it).
- Export each layer + black background using the “Save for Web” function which can be found in the “File” menu.
Step 3. Injecting alphamaps.
- Make a backup of your map files and open them in “FuTa.exe”. Keep in mind that you can only edited fully textured files with FuTa. It means that all 256 chunks should be filled with 4 textures.
- Open “Settings”, “Alphamap”, “Format” and set it to grayscale.
Open every .ADT one by one and import your layers corresponding to the adt coordinate numbers. It is a long and boring process but you have to deal with it. At least, it is hundreds of times faster than manual texturing.
- Select every .adt one by one, go to “File” and click “Save”. You should save every opened file one by one. For speeding up the process you can use arrow buttons on your keyboard for navigating faster.
Add the files to the patch or your working directory.
Additional part. How to rip alphamap templates from Blizzard's maps.
We have provided you with a bunch of alphamapping templates within our WoWDevKit, though it may not be enough, especially if you are working on a big project with multiple zones. So, the first idea of the solution to this problem is to extract the alphamaps from original .ADTs. However, there is a small problem. Unlike to Noggit, WoWEdit (Blizzard's map editor) does not care about the order of textures it paints on the ADT chunks, so sometimes multiple layers are messed up on one ADT. Though, it can be solved using a graphic editor. So, let's do it.
Step 1. Choosing the proper .ADT to export from.
I recommend you searching for the .ADTs that contain as much more mountains (or any other pattern you want to rip) as possible. Rip only those alphamaps that you can later raise with Noggit. From my own experience, some mountains styles like cliffs or spikes have the hardest alphamaps to raise. So, don't waste time if you want the immediate result, those alphamaps would require quite some terraforming skill to get raised.
You should also try searching for some good repetitive patterns that can help you to create long mountain ranges by just copying them around. Here is an example of Blizzard using them in Hyjal (3.3.5a version).
This particular mountain pattern is already ripped an released with our WoWDevKit.
Step 2. Exporting and fixing the alphamaps.
- Open your .ADT file with FuTa, select the alphamap tab and press Export. All your 3 layers will be exported into the folder with the map files.
Let's imagine that we want to rip that mountain range template. As you can see, some chunks are missing. You can find them as 1.69 x 1.69 cm squares on the other two layers.
So, go to those layers. Scroll closer to the chunk by holding "Alt" and scrolling the mouse wheel until a pixel grid shows up. Select the chunk by using the "Rectangular Marquee tool", copy it and paste it to its place on the first layer. Do it for every missing chunk.