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

Members Online

»
0 Active | 98 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
Versions: You must be logged in to view history.
Creating transparent textures.
Transparent Textures, by X-foil

Thanks to X-foil for the work put into this tutorial.

The texture:

1) start with a good paint program, I use adobe photoshop 7

2) click o­n file/new, then when the dialogue box pops up make sure that your size is o­ne divisible by 16 pixels, I used 128 by 128 pixels, but 512 by 512 or 128 by 512 or whatever, should be fine.

3) Make sure that contents is set to TRANSPARENT

4) draw your picture or copy and paste it, when copying and pasting you may need to resize the image, better to draw your own if your not that adept with your paint program.

5) If you made your own image it should now look like this :

notice the chequered grid, this denotes transparency. However, if you copied and pasted your image you will need to select all of the bits you don't want to be seen (the bits you want to be transparent) using the magic wand tool wherever possible, otherwise use the lasso tool(or your paint programs equivalent) and go to edit/cut, this should reveal the chequered grid o­nce again.

6) now save your image using SAVE AS… and save it as a .png, remembering to give it a name(Untitled-1.png is a bit naff, use something descriptive, I called mine wheel). Close your image file and reload it into photoshop, if the transparency grid is still there it's all looking good, if not then either you or I have gone drastically amiss with this tutorial.

Now for the crucial part, pay attention:

The shader:

1) open your base folder for sof2, it should be : C:\Program Files\Soldier of Fortune II - Double Helix\base, then look for a folder called textures, if you don't see o­ne then create o­ne (but there should be o­ne there due to installing radiant) open the textures folder and create a new folder called something like mytextures, I called mine : mytexties. Open up the folder you just made (mytexties) and drag'n'drop your texture into it.

2) Right, now go back to your base folder by clicking up or back in your toolbar and look for a folder called shaders, open it and look for the text file shaderlist.txt, double click it, inside you will see a list of shaders, this is used by sof2 and gtk for searching for the shader files in maps, so therefore yours needs to be there or it wont be looked for by sof2 or radiant, so add yours by scrolling down to appropriate letter of the alphabet, hit enter to create a space and type in the name of your texture folder, I typed in mytexties. close the shaderlist, when asked if you want to save the changes click YES.

3) Now we need to make our own shader, easy really trust me. Open the common shaders file, you be asked what to open it with, use notepad.

4) Scroll down to chainlink fence, select all of this text (crucial part), open a new notepad document and paste it in, u should now have this:

textures/common/chainlinkfence
{
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm playerclip
surfaceparm monsterclip
q3map_alphashadow
cull disable
{
map textures/common/chainlinkfence
alphaFunc GE128
blendFunc GL_SRC_ALPHA GL_ZERO
depthWrite
}
{
map $lightmap
blendFunc GL_ONE GL_ZERO
depthFunc equal
}
{
map textures/common/chainlinkfence
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}


now all u have to do is change all of the text I have made bold to: mytextures (mytexties in my case) and the text I have italicised and emboldened to: yourimage (wheel in my case) and save it to your shader folder with the name of your texture folder, making sure to change the file option to 'all types' and replacing the .txt with .SHADER, (so I saved mine as mytexties.SHADER)

that's it ! you should now have a transparent texture J simply select textures/mytextures in radiant and voila :D

you should o­nly need to make your shader file o­nce as it can then contain shaders for the rest of the map, look at the original raven shaders to see what I mean.
When the time comes to pk3 your map don't forget to add the shader files and texures, otherwise its all been a waste of time.

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

»