Navigation

How to create a texture with alpha [pics]

Hey all, this tutorial teaches you how to make a texture in photoshop that has alpha ingame.
Example:

The menu image has no background so it looks clean and tidy.


First you're going to need the basics:
- An I.Q above 30
- Knowledge of photoshop
- Knowledge of basic modding
- Knowledge of texturing
- Photoshop
- .DDS plugin for Photoshop
- CoD4 Mod Tools


Step 1.
Grab your image and load it into photoshop.
In this example, I'm getting a killfeed icon for my L96A1



Step 2.
Now you are going to select the Magic Wand tool, you have to right click the Quick Selection Tool and then select "Magic Wand Tool".



Step 3.
 You now want to select the background.
Should look like this:


Step 4.
 Now you're going to want to inverse the selection, so press Shift+Ctrl+I.
Should look like this:



Now click this button at the bottom left of the screen.

It will make a channel called Alpha.


If you followed this tutorial correctly you should be able to see this when you turn on the visibility for all channels.


Now use theses settings when exporting the .dds image:




Now open Asset Manager, and follow this:



Now press F10 and you should see something similar to this:



Now navigate to your modtools, then go to the raw folder, then inside materials, copy your image name.
So for me it would be hud_icon_l96a1. I copy this file to my mods materials folder.
I then navigate to the material_properties and do the same, copy your image over to the corresponding folder, so material_properties.
Repeat this with the images folder.
So...raw\materials\hud_icon_l96a1 > my_mod\materials\hud_icon_l96a1
raw\material_properties\hud_icon_l96a1 > my_mod\material_properties\hud_icon_l96a1
raw\images\hud_icon_l96a1.iwi > my_mod\images\hud_icon_l96a1.iwi
Then add this to your mod.csv:material,your_image_name
In my case its this:material,hud_icon_l96a1
Now you're done!precache your texture if you're using it in a script!precacheShader("hud_icon_l96a1");
End Result:

Comments

0 0

Great tutorial, I'm sure it will help a lot of people


Posted on 23.05.2014 / 16:30

0 0

Big THANK YOU


Posted on 23.05.2014 / 19:18

0 0

Oh, if you're texture has holes or gaps and they aren't being selected, untick the box that says "Contiguous" in the menu, also if you have a similar colour as your image in the background, you should set Tolerance to a lower number until you get it right.


Posted on 24.05.2014 / 10:05

0 0


Posted on 14.11.2014 / 11:41

0 0

Nice one ! Keep up the good work !


Posted on 18.06.2016 / 22:40

emm help it didnt work for me -.-


Posted on 12.07.2016 / 14:23

0 0

ty


Posted on 12.07.2016 / 9:12

0 0

thank you


Posted on 12.08.2016 / 0:04

Post comment

ONLY USERS CAN POST COMMENTS.