The meta shader is a lot like c, so anything with two slashes in front like so // is commented out and quake3 will totally ignore it.

//****************************************

//

// Ye Olde metashader gout2

//

//****************************************

This is the start of the shader for our first texture notice its followed by an underscore and a 0 (_0) This simply tells the compiler this shader goes with the first color on the pallette of your alphamap. The value you will change is the value that starts the shader for example textures/terrain/gout2_0 would be changed to textures/terrain/yourshadername2_0

textures/terrain/gout2_0

{

surfaceparm nolightmap

q3map_novertexshadows

q3map_forcesunlight

{

Then you will change the map textures/organics/grass3.tga to map textures/texturedirectory/texturefile.tga

map textures/organics/grass3.tga

tcmod scale 0.125 0.125

rgbGen vertex

}

}

Now you have to do this again for each normal texture you have in the map, so now we have gout2_1 and if I had another 200 texures the final one would be gout2_199, however you're insane if you have that many textures.

textures/terrain/gout2_1

{

surfaceparm nolightmap

q3map_novertexshadows

q3map_forcesunlight

{

once again change the shader path.

map textures/stone/rockwall.tga

tcmod scale 0.125 0.125

rgbGen vertex

}

}

This is the part that makes all the nice blendy parts that you have been drooling over. this takes gout2_0 and gout2_1 and blends them together with gout2_0to1. You will need to do this for all your textures. for example lets say you have 5 texturs you will need a _0to1, _0to2, _0to3, _0to4, then you will need the blending of texture 1 to the rest, you don't need to make a _1to0. For example you will then make _1to2, _1to3, _1to4. then _2to3, _2to4, then _3to4. Basically you are going to be doing a lot of copying and pasting.

textures/terrain/gout2_0to1

{

surfaceparm nolightmap

q3map_novertexshadows

q3map_forcesunlight

{

Once again you need to enter the paths for the 2 textures being blended. Texture 1

map textures/organics/grass3.tga

rgbGen vertex

alphaGen vertex

tcmod scale 0.125 0.125

}

{

Texture 2

map textures/stone/rockwall.tga

tcmod scale 0.125 0.125

rgbGen vertex

alphaGen vertex

blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA

}

}

I included my metashader in the example as well as the shader for my q3r map in tutorial.zip to give you examples as I used more textures in my q3r map.

Now we are going to make the alphamap. Open your paint program and make an image the same size as the number of divisions you have. Now if your case if you chose 5 for the number of layers as I suggested before we should make the pallette for our alphamap have 5 colors, I just write with the 5 colors on my picture, I then reduce the image to 16 colors to make the pallette smaller(pick 5 colors that are somewhat different). Now depending on whether you use paintshop pro or photoshop you will need to sort your colors differently, as its important where the colors are on your pallette. In photoshop the first pallete spot is on the bottom right and counts up going left and up to the next row. Paintshop pro the first palette spot is in the top left and goes to the right and down as if you were reading a book. Once you figure out the first spot, edit the pallete, in paintshop pro you go to colors, then edit pallette and fill the empty pallette spots in with black. If you use adobe and don't know how to change the palette, all I can say is read the gensurf manual or the adobe manual. Sadly I can't afford this software. Now I would change the color depth to 256 colors. It may bring up an option window I just hit ok. Now with your heightmap as a refrence you can start painting colors where you want textures to go. The first color on your pallette coincides with your first shader in your metashader. You can continute this until you have your whole alphamap painted. Then save it as a .pcx file and place it in the directory that your alphamap value the terrain entity points to.

You should now be able to compile, assuming everything went right it should work. Please remember when you distribute your map you will have to include the .shader file and the alphamap.

Errors:

There are 4 errors that I know about, one is to be ignored as I believe its an error you get whenever you use a shader. It will say Warning can't find image for shader terrain/gout2_0, and will say that error for every shader, just ignore it.

The next error is that you have an invalid .pcx file. I am not sure what causes this but sometimes it will not load the .pcx. I believe it may be caused by having a 16 bit image instead of 8? If you could clarify this error I would be glad to fix it.

You also may just have bsp just lock up on and give a fatal error. The problem is that you have too many divisions for the size terrain you have. When I was making this tutorial earlier I made it have 64 divisions, its too many for the size of the terrain. So either make the terrain larger or the gridsizes smaller.. most people shouldn't have a problem with this.

Another error is while lighting

******ERROR*****

MAX_MAP_LIGHTGRID

this can be simply fixed by opening your map, hitting 'n' then scroll down through the entities until you get to worldspawn. you then want to add the key gridsize and give it a value of 256 256 256, if you still get an error try making the numbers larger then that.

If you have any questions about this you can email me at gout rocketmail.com or you can Icq me at 8644043

Home

Hosted by www.Geocities.ws

1