Tremulous Forum

Media => Mapping Center => Topic started by: Her3tic on June 14, 2008, 06:55:41 am

Title: Shader/texture How to use them (Its a question!)
Post by: Her3tic on June 14, 2008, 06:55:41 am
Ok it may be a little stupid, but i don't really get how i can use shader to have something like Light emmiting texture or ladder.
I read a lot about it, but i may be stupid, i got nothing out of it... they say i need to write something like

Quote
textures/common/ladder
{
qer_trans .75
qer_editorimage textures/common/ladder.jpg
surfaceparm ladder
surfaceparm nodraw
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
surfaceparm nomarks
surfaceparm noimpact
surfaceparm playerclip
}

But where do i need to put my texture? Where i need to save the txt file? and will it goes with the pk3 package ??

I'm totally new in mapping, and i really want to know more about it. Please, tremulous users, Help me!
Title: Re: Shader/texture How to use them (Its a question!)
Post by: Survivor on June 14, 2008, 07:21:23 am
*map* stands for your mapname
the texture goes into your textures/*map* directory with the name specified in the text bit.
this text bit goes into your *map*.shader file in the scripts directory of your tremulous base directory. You have to include the shader file into your pk3, in the script subdirectory.
Title: Re: Shader/texture How to use them (Its a question!)
Post by: Her3tic on June 14, 2008, 07:36:58 am
Oh! I'm begining to get it... I extracted the karith pk3 files to see an example. I'll use this as a track to follow step by step! I found the *map*.shader in the script part of the Pk3 so i'll write them down there.

But, how do i put them in GtkRadiant? Is there an Open thing for that?
Title: Re: Shader/texture How to use them (Its a question!)
Post by: Neo(F) on June 14, 2008, 02:16:29 pm
Gtkradiant should automatic be able to load textures(if configured correctly)
then you just have to select a brush and click on a texture.
Title: Re: Shader/texture How to use them (Its a question!)
Post by: Her3tic on June 14, 2008, 03:08:36 pm
To make it able to see my shaders, i need to put the texture in the base of tremulous/base? or the base in the GtkRadiant 1.5.0\trem.game\base

And i add wich name in the Shaderlist?? i'm all confused...
Title: Re: Shader/texture How to use them (Its a question!)
Post by: Divmax on June 14, 2008, 03:37:08 pm
To allow GTKRadiant to detect your shaders, add *name* of your *name*.shader in to the shaderlist.
Title: Re: Shader/texture How to use them (Its a question!)
Post by: Her3tic on June 14, 2008, 04:01:09 pm
Ok lets try this to the beginning.

I want a ladder Shader in my map. So i make a folder with my map name MAPNAME. This folder is in my base (C:\Program Files\Tremulous\base) folder. In the MAPNAME (C:\Program Files\Tremulous\base\MAPNAME) folder, i create these folder:
C:\Program Files\Tremulous\base\MAPNAME\env\MAPNAME in wich i think i need to put some "Skybox" element later.
C:\Program Files\Tremulous\base\MAPNAME\levelshots Where i'll place a .Jpg image of my map
C:\Program Files\Tremulous\base\MAPNAME\maps where MAPNAME.autosave.map, MAPNAME.bak and MAPNAME.map are located
C:\Program Files\Tremulous\base\MAPNAME\scripts where MAPNAME.particle, MAPNAME.arena and MAPNAME.shader are located
C:\Program Files\Tremulous\base\MAPNAME\textures\MAPNAME Where i've putted my Ladder.Jpg

Here what its written in my MAPNAME.shader located in C:\Program Files\Tremulous\base\MAPNAME\scripts :
Quote
textures/MAPNAME/ladder
{
qer_trans .75
qer_editorimage textures/MAPNAME/ladder.jpg
surfaceparm ladder
surfaceparm nodraw
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
surfaceparm nomarks
surfaceparm noimpact
surfaceparm playerclip
}

Here i am now, where do i need to put my shaderlist? I will probably add in it "ladder" isn't?
Title: Re: Shader/texture How to use them (Its a question!)
Post by: TRaK on June 14, 2008, 04:19:33 pm
Don't put the stuff in a /base/MAPNAME folder, put it directly into base.

So, it would look something like this:
-base
--textures
---MAPNAME
----*put textures here
--scripts
---*put MAPNAME.shader here
---*add MAPNAME to shaderlist.txt in this folder so that radiant will load the shaderfile.
--levelshots
---*Put your levelshot here (MAPNAME.jpg)

etc.

If you put the stuff in a subdirectory, radiant won't find it.
Title: Re: Shader/texture How to use them (Its a question!)
Post by: Her3tic on June 14, 2008, 04:32:11 pm
Wow thanks you really helped me out there  ;D
The Env folder goes in the base folder or in the Texture/MAPNAME Folder? Is there a Tutorial to learn how to make a skybox? i got one with 6 face and i would like to test it.

But when i got into GTKradiant, i double click on my mapname, it write "Showing 1 shader" but i cant see it!!
Found it why, i mispelled the path to the texture in my .shader :p