Page 1 of 1
Importing Textures
Posted: Mon May 26, 2003 12:06 am
by Sharpy
I am trying to import textures to my map and I have no clue what-so-ever where to find an importer button of some sort, please help me, I will be very appriecated regarding your repsonse
Posted: Tue May 27, 2003 2:59 pm
by panTera
Ok, take some time to read this and don't worry it's less complicated than it looks.
To use your own textures, first create a folder in MAIN and name it textures. In that folder make your own folder. Put your textures in here. You'll get: main\textures\Sharpy\..
You can use both Jpeg and Tga-format. When you start MoHRadiant you'll see your new folder in the texture menu. But that's not all. Now your textures need a shader to set their properties. This file would go into MAIN\scripts\...
This shader controls the way your textures should "act" and react to players, bullets etc. So let's say you want to use your own metal texture, then you'd have to write the line: "surfaceparm metal" in the shader.
It's simply too much to write it all down, so I'd advice you to open the pak0.pak and look into the shaders. Try to find a texture that acts the way you'd like your own texture to act and see how the shader for it is made up.
For instance look for the "Algiers.shader" under the path: "scripts\..." In this file (one large textfile) you'll find the shaders for all Algiers-textures.
Take a look at the one for the "brick1trim"-texture (take note at the curly brackets { and }, this is where most people go wrong):
textures/algiers/brick1trim
{
qer_keyword trim
qer_keyword brick
surfaceparm stone
{
map textures/algiers/brick1trim.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
There's much you can do with a shader, but all you really need to know is to set the name, path and the right surfaceparm(s). (To see a list of all available surface types, see the docs-folder of your MohTools-directory. Note: a surfaceparm does not only mean a texture's surface type, but can also mean its contents, like "water", "nonsolid" "cull" etc). Again, try to find a texture that acts the way you'd like your own texture to act. Remember its name and path and look for it in the shader-file from pak0.pak and see how the shader for it is made up.
(-> For things like text and small signs that need to stay sharp and readable, use a TGA and add "nopicmip" to the shader below the surfaceparm-part.)
You can simple add more textures and save them all in the same shader-file. Now save this textfile as 'yourname.shader' and place it in MAIN\scripts\.. It doesn't really matter much how you name it, as the game reads all files in the script-directory, but it's a good thing to keep things clear and organised and use the same name as your map's BSP-file.
PanTera.