User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
0%
...it's awesome.
60%
...it's okay, I expected better.
20%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
20%
Total votes: 5

Who's online

There are currently 0 users and 34 guests online.

Welcome to RUST | Gamedesign.net

Basic Shaders - Part 2

Submitted by skinmaster on Sat, 2004-08-28 06:21.

Basic Shaders - Part 2
Created by Alvar Jansson

Preface:

This time we're going to make a Space map. Before we begin I want to say that we will not use the already used space texture. This time we will make our own texture, shader ... and space! If you don't want make a space texture, just move down to step 3 in this tutorial.


Step 1:

We first begin with making a new texture that we will use as a "space sky". I will use my Photoshop to make this texture, and i make it 256x256 pixels big. Now you can make it black only, or maby add some white spots that should looks like stars. My one looks like this:


As you can see i try to make it very dark. I do this because of the Quake3Arena engine will make all textures much more brighter. I will place this texture under the "baseq3/textures/tutorial" directory. Now, we have a texture. Should we load up the Q3radiant now? Nope, q3radiant checks for shaders that it uses for "compiling" the map. Therefor we need to make a shader for this new "sky".


Step 2:

Why do we need shaders for this texture? Well, first of all we don't want the guns to do impacts on it. To do this, we need to use shaders. I will try to explain each line below.

textures/tutorial/sky
{
//*********************
//***Space map shader***
//*********************
surfaceparm nomarks
surfaceparm noimpact
{
map textures/tutorial/sky.tga 
}
}

Like that, now. Note that the lines with // infront of it is comments, and will not have any effect of the shader. Copy the code above, and place in a new file called "my.shader" under baseq3/scripts.

Also add a new line "my" in the shaderlist.txt too.

What does all this do?

The first line "textures/tutorial/sky" is a quick note what texture you're using. The "surfaceparm" lines tells Quake3Arena what surface parameters that will be used. The first one changes so there's nomarks, and the other one makes the guns make noimpact. Now we just have to move on to the fun part, making the map itself =).


Step 3:

Now we have a new texture, we have the shader for this new texture. What we need is a map. Let's load up Q3radiant.

This part is very easy. Simply make your map, and then place a new very big room around the map, with the new "space sky" texture on it.

Note: You have to place lights to get the level bright. But, if you have made a space map looking like Q3DM17, then the hole level should have the same light. Easy to do!

Select one of the boxes on the map (not entities, the other map objects). Push "N" to bring up the Entity list. It should now say that you have selected the "worldspawn" entity. Enter a new Key called: "ambient", and give it the value of how much light the map should have. Then Enter a new key, and name it "_color", enter a value for it "<R> <G> <B>" Where <R>=Red, <G>=Green and <B>=Blue.

This is the value of what color the light should have. You should add a value between 0 and 1. To get a white color, simply enter "1 1 1".

That's about it! Hope you get your new space-maps working as you want it!

RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.