Author Topic: Shader/texture How to use them (Its a question!)  (Read 4345 times)

Her3tic

  • Posts: 172
  • Turrets: +6/-14
Shader/texture How to use them (Its a question!)
« 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!
...After all, we're all just here because we love Tremulous...
Every revolutionary ends up either by becoming an oppressor or a Heretic.
Albert Camus

Survivor

  • Posts: 1660
  • Turrets: +164/-159
Re: Shader/texture How to use them (Its a question!)
« Reply #1 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.
I’m busy. I’ll ignore you later.

Her3tic

  • Posts: 172
  • Turrets: +6/-14
Re: Shader/texture How to use them (Its a question!)
« Reply #2 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?
...After all, we're all just here because we love Tremulous...
Every revolutionary ends up either by becoming an oppressor or a Heretic.
Albert Camus

Neo(F)

  • Posts: 34
  • Turrets: +2/-0
Re: Shader/texture How to use them (Its a question!)
« Reply #3 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.

Her3tic

  • Posts: 172
  • Turrets: +6/-14
Re: Shader/texture How to use them (Its a question!)
« Reply #4 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...
« Last Edit: June 14, 2008, 03:19:41 pm by Her3tic »
...After all, we're all just here because we love Tremulous...
Every revolutionary ends up either by becoming an oppressor or a Heretic.
Albert Camus

Divmax

  • Posts: 197
  • Turrets: +3/-8
Re: Shader/texture How to use them (Its a question!)
« Reply #5 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.
I'm a developer for the following projects(now I'm inactive) :
TremWars's QVMNot updated anymore
TremWars's Client and Server Executable
TremWars's QVM 2

Her3tic

  • Posts: 172
  • Turrets: +6/-14
Re: Shader/texture How to use them (Its a question!)
« Reply #6 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?
...After all, we're all just here because we love Tremulous...
Every revolutionary ends up either by becoming an oppressor or a Heretic.
Albert Camus

TRaK

  • Posts: 442
  • Turrets: +94/-21
    • TRaK@MG
Re: Shader/texture How to use them (Its a question!)
« Reply #7 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.
« Last Edit: June 14, 2008, 04:21:22 pm by TRaK »

Her3tic

  • Posts: 172
  • Turrets: +6/-14
Re: Shader/texture How to use them (Its a question!)
« Reply #8 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
« Last Edit: June 14, 2008, 05:03:36 pm by Her3tic »
...After all, we're all just here because we love Tremulous...
Every revolutionary ends up either by becoming an oppressor or a Heretic.
Albert Camus