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

Members Online

»
0 Active | 96 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
SOF2 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Textures: Transparent - improved
Versions: You must be logged in to view history.
Using Adobe Photoshop to create transparant textures

Tutorial by StonedAvenger
This tutorial is written for Adobe Photoshop
First you need to draw or otherwise acquire an image.

The format should be as follows:
Valid texture dimensions (pixels) 64x64, 256x256, 512x1024, 512x512, etc.
RGB
8bits/Channel
Transparent background or solid

Right Click and Save As



Right Click and Save As

Basics:


I drew mine using rectangle shape tool. To make it easier to draw I enable the grid view, snap to grid, and also set the gridsize to 32 pixels. To merge each separate shape, I first "Rasterized" them (rightclick on the layer), then I clicked the "Layer" menu and '"MergedVisible". To make the effects for the horizontal bars different then the vertical, I merged them into two separate layers. I right clicked on "Blending options and used "Bevel and Emboss" to add some dimension to each layer.

Once I was ready to proceed I merged it all into one final layer as you see it in this image.

Right Click and Save As

Select the areas that you intend to be transparent in the final texture using the "magic wand" or "select by color". To add individual areas with the magic wand, hold shift while you click all the parts ofthe image that should be "see thru".

Right Click and Save As

Click "Layer", "Add Layer Mask", "Hide Selection"

Right Click and Save As

You will see a "mask" linked to your layer.

Right Click and Save As

Click "Channels" and "Duplicate Channel".

Right Click and Save As

Name the new Channel "Alpha 1"

Right Click and Save As

This is your "Alpha Channel". It is used by the Quake 3 engine to determine what areas of the texture are to be drawn. In the final product, white areas will be rendered and black areas will becompletely transparent.

Important note:
NOTE: In the following images, the original layer mask isn'tpresent. I originally thought it could be removed, but have found that light will not penetrate the texture through the masked areas unless you keep the original masked layer. It might "look" right ingame with just the "alpha 1" channel, but it appears that the original layer mask should also be kept. Furthermore, this "might" mean that duplicating and renaming the layer mask to "Alpha 1" is unnecessary. However, I didn't have problems keeping both.

Right Click and Save As

This is your texture with the "Alpha Channel" visible. The pink shaded areas are "masked off" and will be transparent.

Right Click and Save As

Make sure all Channels and layers are visible, then "Save As..." a.PNG file (Portable Network Graphic). Your done with the image at this point, and ready to create a shader for it to make it functional.

Here's a a shader for a transparent texture. This grate is nonsolid so you can shoot through it. It also casts nice shadows. This shader was recently written by Ydnar, author of q3map2, in reply to my request for such a shader

textures/darkness/grate_3bars
{
qer_editorimage textures/darkness/grate_3bars
// newer versions of GtkRadiant (> 1.3.8) support masked textures
qer_alphaFunc gequal 0.5
q3map_material HollowMetal
surfaceparm alphashadow
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm trans
cull disable
{
map textures/darkness/grate_3bars
alphaFunc GE128
depthWrite
}
{
map $lightmap
depthFunc equal
}
{
map textures/darkness/grate_3bars
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}

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

»