Problem with creating first level

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Problem with creating first level

Post by N|K »

I have created a room in GTKRadiant 1.5.
I have created my own texture 'bla.tga' and placed it in 'baseq3/textures/bla'.
I have applied my custom texture to the roof in my level.
I have created bla.shader in 'baseq3/scripts'.
I have added 'bla' to shaderlist.txt.
I have successfully loaded my level.

My script is as follows within ***:

***

textures/bla
{
map textures/bla/bla.tga
tcMod scroll 1.0 1.0
}

***

The problem is the that texture on the roof is not scrolling.
I have read the GTKRadiant 1.5 manual for 12 hours and read numoures dated websites but have not been able to solve my problem.

I suspect there is mandatory 'elements' that are required for a shader file that I have not added; documentation does not mention such.

Does anyone know why this problem is occuring?
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Problem with creating first level

Post by AEon »

It is usually a good idea to simply search for a shader that does what you want, i.e. scroll. To then duplicate its code, changing its name and using your texture instead, e.g.:

Code: Select all

textures/aecantw2/ae_zzztpink
{
	qer_editorimage textures/sfx/proto_zzztpink.tga
	q3map_backsplash 0 0	// Avoid point source lighting on face
	q3map_surfacelight 1000	// was 2000, far too bright
	q3map_lightsubdivide 32	// Finer subdivision
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm trans
	{
		map textures/sfx/proto_zzztpink.tga
		tcGen environment
        tcMod turb 0 0.1 0 0.1
        tcmod scroll .1 .1
		blendfunc GL_ONE GL_ONE
	}
}
A quick compare seems to hint that your map ... code should be placed in a separate stage, i.e. in another pair of {} brackets:

Code: Select all

textures/bla
{
   qer_editorimage textures/bla/bla.tga  // Might be required for GTKradiant to show the texture in-editor.
   {
   map textures/bla/bla.tga
   tcMod scroll 1.0 1.0
   blendfunc GL_ONE GL_ONE  // Not sure, this may also help.
   }
}
I am sure Obsidian can give you explicit help.
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Re: Problem with creating first level

Post by N|K »

Tried the blendfunc and also added another pair of {} but did not work..
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

Re: Problem with creating first level

Post by dONKEY »

Obvious but sometimes easily over looked. Are you sure you have applied the shader? Shaders are shown in radiant with a white border.
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Re: Problem with creating first level

Post by N|K »

There is no white border around my texture. I suspect this is an indication that the shader has not been coorelated with the texture?

How can a shader be applied to a texture?
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Problem with creating first level

Post by AEon »

Note: The white border shows around the shader in the textures (t-key) window!

Try selecting the shader from the textures menu, i.e. the "blah". It should then load all the shaders in blah.shader... and one with the frame around it should be present in your textures window.
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Re: Problem with creating first level

Post by N|K »

Where is the texture menu located?
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Re: Problem with creating first level

Post by N|K »

If you are refering to the window that has thumbnails of all the textures; I applied 'Show shaders' & 'Shaders Only', and some of the menu's dissapear, and 'Bla' is still there. Within bla is my texture, however a white boarder is not around it.
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Problem with creating first level

Post by AEon »

In the GTKradiant menu bar... where File, Edit, etc are also present. Select "Textures" menu there. It will list all the shaders mentioned in shaderlist.txt at the lower end of that menu, your "blah" shader should also be present.
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Re: Problem with creating first level

Post by N|K »

There is no 'Textures' in any of the tab menu's, or icons in the bar bellow.

I am using the latest version of GTKRadiant; 1.5.
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Problem with creating first level

Post by AEon »

Just noticed in your shader file you should name it:
  • textures/bla/bla
instead of
  • textures/bla
This way the editor will automatically load your textures/bla/bla.tga file.

As a test rename your shader (not the shader file) to
  • textures/bla/bla_test
this lets you differ between your texture and the associated shader more easily. You will then want to apply bla_test to your brushes.
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Problem with creating first level

Post by AEon »

N|K wrote:There is no 'Textures' in any of the tab menu's, or icons in the bar bellow.
I am using the latest version of GTKRadiant; 1.5.
Sorry, I am using GTKradiant 1.2.13... and I "thought" they kept the menu in 1.5... alas I do not have 1.5 installed... maybe one of the other mappers can help out here.
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Re: Problem with creating first level

Post by N|K »

No problem man, thanks for your help anyway, it has been appreciated! (Y)
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Problem with creating first level

Post by obsidian »

Read up on the shader manual linked in my signature.

In GtkRadiant 1.5.0's default layout the texture menu is in the bottom right corner. If your texture does not have a white border around it, it means that it does not have an attributed shader file to it, or it's not reading the shader file correctly (either because it can't find it or it has syntax errors in it preventing it from being read correctly).

Basics of texture organization is as follows:

Placement of custom textures should always be in a custom subdirectory, something like these two examples:

Code: Select all

textures/obsidian_mymap/texturename.tga
textures/bla/bla.tga
Shaders need to be in the "scripts" directory. You can call the shader file anything you want, but for organizational purposes, it is generally the same as the custom texture subdirectory:

Code: Select all

obsidian_mymap.shader
bla.shader
To make GtkRadiant read the shader, you add them to the shaderlist.txt. If the shader file is obsidian_mymap.shader, I would add obsidian_mymap in the shaderlist, and in your example, you would add bla.

Within the shader file is a listing of all shaders scripts. Each one headed by the name of the shader, which in general (but not always) is the directory path to your texture file:

Code: Select all

textures/obsidian_mymap/texturename
textures/bla/bla
It must then be followed by a matching pair of curly brackets, { and }, this denotes the contents of this shader script as opposed to other shaders scripts in the same file. Within this bracket are general/global shader directives like q3map_*, surfaceparm, qer_*, etc..

For each additional texture stage, they must be enclosed within another pair of curly brackets within the first pair. Textures are always listed as .tga regardless if it is actually a .tga or a .jpg.



So, in your example, assuming the texture is in "textures/bla/bla.tga", your shader would be as follows:

Code: Select all

textures/bla/bla
{
	{
		map textures/bla/bla.tga
		tcMod scroll 1 1
	}
}
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
N|K
Posts: 63
Joined: Wed Sep 23, 2009 11:11 am

Re: Problem with creating first level

Post by N|K »

Hey man! The problem is solved.. I was just missing 3 bytes of code!

textures/bla

to

textures/bla/bla

Your advisory has been much appreciated!
Post Reply