Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 15 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Tutorials

»
SOF1 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Textures : Transparent
Versions: You must be logged in to view history.
Making transparent textures.
Transparent Textures

I absolutely love creating my own textures. It not o­nly gives my maps a personal touch, but helps me to immerse a player into my world. There is o­nly so much you can do with the textures that come with a game before you run out ideas o­n how else to use them.

I have found that the hardest part of creating your own textures is creating the transparent o­nes. It's difficult to come by a good looking tree texture or railing that fits the scene of your map. OK... it's just plain hard to find good o­nes, regardless of whether or not they fit your style. So, if you could create your own, perhaps your imagination could run further. Therefore, I am going to show you how to do just that.

First, let's gather all the necessary tools you be using in the creation of your custom, transparent texture. (Of course, if you just skip the transparent part of this tutorial, it could help you to create any texture). The tools I will be using here are as follows:

Image creation tool
I will be demonstrating using Adobe Photoshop6. I will also demonstrate two methods of accomplishing our goal since I know that not everyone has this program. I just hope that it makes sense to those who don't.
M32Build ...get it here
This tool was developed to convert tga's to m32's and is the o­nly o­ne that can truly convert transparent textures.
Image ...get it (not available anymore)
M32 Tool ...get it here
I added this file here because it's the easiest way to edit the m32 texture properties after it has been created.

1. We need to find an image to convert. In most cases, I draw my own images. The advantage to this is that I do not have to select all the nonsense in the image that I do not want to include in my texture. You can imagine how tedious this may become if you were trying to select a tree and all of it's leaves from a forest. So for the sake of making your first attempt simpler, I have chosen to create a custom fence from an image that I found o­n the internet.

2. Open the fence image in your graphics program and select all the garbage that you do not want in your final image. As I mentioned before, this can be quite difficult, but if you find or create an image without alot of background, it can be less tedious.

3. Fill the selected area that we will be making transparent with black. Then, while the area is still selected, we need to create an alpha channel. An alpha channel is an addtional layer of information to the RGB format. It tells the image that this area, the black part of the alpha channel, is to be transparent.

Method 1:
- Select the 'channels' window and add a channel to the already existing R,G,and B channels. This will create an alpha channel that is usually all black.
- Select the inverse of what you now have (the outside of the fence) so that you have the fence selected
- Fill the fence area with white. This creates your alpha channel for the fence.
Method 2:
- With the fence selected, look for the menu option to 'add layer mask'. This will create a black and white (only 2 colors) layer of your fence in your channels folder. It may also turn the unselected area slightly red. This is good.
- There are two option form here. Either rename the channel (not the layer) as alpha or save the selection as a channel. This woul ddepend o­n your program.
- Then you can delete the old mask channel (if it still exists. do not delete the alpha channel).

What I have done now is create an alpha channel that will be interpreted as a transparent layer for the image.

4. This step is an optional part of the tutorial, a little bit more difficult then the rest, but highly recommended. What we want to do is make the image able to be repeated without it looking like there is a seam where the image gets repeated. I do this by making a copy of the best half of the image, flipping that copy around, and matching it up to the copied half. You will have to go back and do the same for the alpha channel, but it is easier to do now that o­ne exists (it can be used as a selection tool... like with a selection wand or something).

5. Now we need to do a little touch-up. What we want to do is crop the image to remove the outer edges that we do not need. Select the images down the center of the outer posts and accross the highest and lowest edges. Then we will just 'crop' the unselected parts away from our image leaving us with a repeatable, clean image.

6. Next we need to resize the image to match what the game can accept. SOF will o­nly accept images that are sized in multiples of 16 pixels (16x16, 32x32, 128x128, 128x64, etc.). Use your best judgement as to the size of what you believe the texture should be. For our fence, we will want to choose 128x128. This might cause the image to stretch o­ne way or the other, but we can compensate for that in the map editor if we must.

7. Save the image using 'save as'. Choose to save it under the formatfor TGA or TARGA. This is the format that out m32 image converter can understand. If there is an option to save alpha channels, be sure to mark it. If the option to save the file as a 24 or 32 bit file, select the 32 bit version as this will contain our alpha channel while the 24 bit will not.

8. Now that our texture has been created, we will need to convert it to the m32 format using M32Build. Open M32Build (after having installed it using the instructions that accompanied the program) and point it to the image that we just created. Choose a destination for your new image (saving it in the destination of '/fence' will cause it to be saved in the fence texture folder such as C:\Program Files\Raven\SOF\base\textures\fence) and press the convert button. A dos window should pop up and o­ne of the comments should mention that it was converted with the alpha channel. This means that everything went according to plan.

You will now have a fence texture in the textures/fence folder to use in your map. The best part is that the black area will now also be transparent. Now go and make those textures you wished always existed.

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»