My own Texture/SHader


(eXZire) #1

Oookey… i read one tutorial on how to get one of my own textures in a map, but it didn’t work!
Has anyone got any links to GOOD, SIMPLE, FUNCTIONING tutorials for this? I just can’t figure out how to get my textures worting ingame! :banghead:


(HairyPlums) #2

Pretend you’re working on a map called mp_testmap

[ol][li]Go to your etmain folder, and create a folder called textures (this may already be there, if so - that’s OK)
[/li][li]Create a folder inside textures called mp_testmap
[/li][li]Put your JPG or TGA files inside this folder (in other words, inside etmain/textures/mp_testmap)
[/li][li]Start up GtkRadiant
[/li][li]On the Textures menu, you should see mp_testmap and when you click on it, your images should appear in the texture window and you can use them on your brushes.
[/li][/ol]

This is just for plain images, get used to this before you move onto shaders. Check the “sticky” posts in this forum for info on shaders.


(eXZire) #3

THAT i had figured out :wink:
It is the shader part that is difficult :wink:


(HairyPlums) #4

Heh! OK, try going through this then, assuming you have a TGA called mytex.tga in the etmain/textures/mp_testmap folder as I described above:

[ol][li]In your etmain/scripts folder, create a text document with the name testmap.shader
[/li]
[li]Edit this file and add the following lines:
[/li]


textures/mp_testmap/testshader
{
  qer_editorImage textures/mp_testmap/mytex.tga
  surfaceParm woodSteps
  {
    map textures/mp_testmap/mytex.tga
  }
}

[li]Now, open the special shaderlist.txt file that lives in the etmain/scripts folder, and add the shader filename you just created to the list i.e. add testmap
[/li]
[li]Make sure everything is saved OK, and fire up Gtkradiant. Select the mp_testmap item from the Textures menu and you should see a shader called testshader in the texture window. You can tell it is a shader as it has a white border around it.
[/li][/ol]

This is a very trivial shader that justs makes the player echo the “wooden steps” noise when they run on a brush with this shader applied to it. You will need to look at the shader manual that comes with radiant, or simply start looking at other shader script files to see what’s possible.


(Loffy) #5

Well written!
// Loffy


(ThompZen) #6

thanks m8, I needed to know that one as well :smiley:


(eXZire) #7

AH, forgot to answer…
Worked super… thanx mate :smiley: :notworthy: