Making transparent textures(for any Call Of Duty really)

Tutorials for Call of Duty 2 mapping

Moderator: Core Staff

Post Reply
User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Making transparent textures(for any Call Of Duty really)

Post by Rezil » June 1st, 2010, 7:19 pm

Making transparent textures(for any Call Of Duty really):

Things you'll need:

- Photoshop
- .DDS Plugin for Photoshop (Download, scroll down to 'Download latest version')
- CoD Asset Manager

Alright, for the purpose of this tutorial I'm going to use this slime texture from Quake 3, it's a normal .jpeg which will later be converted to a proper format:

Image
128x128, must be a power of 2 otherwise you can't convert it

1. Photoshop editing:

Open up photoshop(I'm using version 10.0 CS3 but any version is good as long as it can use the .dds plugin and make alpha channels) and open the texture you want to use. Click on the channels tab and add a channel by clicking on the circled button:

Image

Now there's a new channel called Alpha 1. It's the alpha channel - a bit of explanation how it works: The alpha channel contains information about the transparency of pixels by maknig a grayscale image where white is 0% transparent and black is 100% transparent. We want our slimy texture to be about 30% transparent so what you do is this: click on the alpha channel so it's the only channel visible(the little eye next to the thumbnail image), select the 'Paint Bucket' tool, choose a light grey color and fill the image with it:

Image

Image

Alright that's it for the editing, now you save it as a .dds format with the Alpha Channels option ticked. If for some reason you can't save it - an error pops up saying: Too many channels(5) you can fix it by flattening the image.

Image

After you save it another window should pop up looking something like this:

Image

Use the same settings as shown here(DXT5 gives the best results but takes up the most ammount of space, I usually use this option when making transparent textures and DXT1 when making non-transparent ones) and click 'Save'.

Well done, you now have a .dds image with alpha information. Next up:

2. Importing into Call Of Duty 2:

Browse to your Call Of Duty 2 folder and the bin subfolder, then open asset_manager.exe. On the top left you'll see some buttons and a list below that. Scroll down the list until you find the 'material' entry, select it and then press the New Entry button:

Image

You can name it anything(it will be the name of the material file which ands up in your .iwd), I'll call it 'tutorial_slime'. Alright, now you have a lot of options, I'll explain some of them right now so you can use them if you need to do other textures aswell:

materialType: What the material will be used for: world phong is a texture used for the game world, 2d is various HUD elements or loadscreens etc.
sort: What sort of material it is: skybox, decals etc.
surfaceType: How footsteps sound when walking on this material and how bulletmarks show.
usage: Self explanatory really, what you set here is where the texture will be located when you filter by 'usage' in CoD2Radiant.

Color Map: The 2d image you have created in Photoshop. It's the most important part of maknig a texture, there are other options such as Detail Map and Normal Map which deal with how light bounces of the texture but this one is the most important.

That's the basic stuff that you need to know, now choose what's appropriate or copy my settings:

Image
(Note: You won't have the 'Rezil' locale, I made that for convenience so I can locate my own textures quickly)
(Note2: The .dds texture needs to be located somewhere inside the Call Of Duty 2 folder, it can be in a submap)
(I'm also not sure if sort should be 'opaque water', I've used default so far and it didn't pose any problems while behaving like a normal water texture)

BlendFunc needs to be set to Blend, otherwise it won't use the alpha channel. Now hit Ctrl+S to save your .gdt file, then press F10 to convert your asset to a proper format.

Congrats, you've made a transparent texture, usable in-game! :)

3. Finishing up:

You'll have two new folders in your 'main' folder, named 'images' and 'materials', put those two folders into your map .iwd and you're done!

Image
Image in Radiant.

Tutorial by rezil.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests