(Terrain) shader doesn't seem to work

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
User avatar
monaster
Posts: 532
Joined: Mon Apr 28, 2008 1:52 pm

(Terrain) shader doesn't seem to work

Post by monaster »

Hm, don't know how to start this... I began working with terrain in GTKRadiant some time ago (still gotta finish a couple of other maps and terrain would greatly enhance a few of them especially my new one). Now I got that shader here, just a simple one level shader, so nothing is blended or whatever, but it won't show up in GTKRadiant (neither in 1.2.1 nor in 1.5.0).
The er_rock02 texture should be applied to a terrain I've been creating inside EasyGen, since I wanted to know if that thing is something useful for Q3 mapping. But,as said, the exported and saved as .map file shows up in GTKRadiant, but without any er_rock02 texturing, it's just the common terrain texture that is shown, although it has the right key values if you look them up by pressing "n", such as entity, shader, alphamap and so on.
If anyone is familiar with terrain shaders I would really appreciated his oder her help. I hope that I mentioned everything that has to be mentioned. :paranoid:

Shader:

Code: Select all

textures/scum/terrain_0
{
	qer_editorimage textures/scum/er_rock02.tga
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/scum/er_rock02.tga
		rgbGen vertex
		tcmod scale 0.250 0.250
	}
}

textures/scum/terrain.vertex
{
	qer_editorimage textures/scum/er_rock02.tga
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/scum/er_rock02.tga
		rgbGen vertex
		tcmod scale 0.250 0.250
	}
}

The key values shown in the editor for the terrain texture are:

classname func_group
terrain 1
layers 1 (since I got only one texture at that time to make it not too complicated if someone checks this shader)
shader scum/terrain
alphamap scum.pcx

By the way this is the second or third form of my shader: the first ones had .jpg endings instead of .tga and also no qer_editorimage textures/scum/er_rock02.tga, I added that one, but it didn't work neither.
If you are caught on a golf course during a storm and are afraid of lightning, hold up a 1-iron. Not even God can hit a 1-iron.
-Lee Trevino, golfer who actually has been struck by lightning.
maz0r
Posts: 157
Joined: Wed Apr 21, 2004 7:00 am

Re: (Terrain) shader doesn't seem to work

Post by maz0r »

Ehm have you tried to compile the map and looked at the terrain in Q3? Shaders won't always show up correctly in Radiant IIRC.
User avatar
monaster
Posts: 532
Joined: Mon Apr 28, 2008 1:52 pm

Re: (Terrain) shader doesn't seem to work

Post by monaster »

Of course I tried, just forget to mention it, sorry! Inside quake the texture won't show up at all if I compiled with GTKRadiant 1.5.0, only the skybox is visible, but other than that, the terrain which is the only thing beside the skybox and the spawnpoint isn't visible, but it is still there, I can run into walls and mountains and climb up hills; most probably it's because I caulked the terrain on the other (lower non-visible) side where you would never get access too. But since this is a quite normal process (caulking non-visible sides) I don't think that this could be the problem.
Another proof that the terrain has really been compiled (besides that I run into invisible obstacles) is that is see everything in Quake after compiling with GTKRadiant 1.2.1 since this version will show caulked stuff with a black and white texture (at least with my settings). But still the right textures, say er_rock02, are not shown.
If you are caught on a golf course during a storm and are afraid of lightning, hold up a 1-iron. Not even God can hit a 1-iron.
-Lee Trevino, golfer who actually has been struck by lightning.
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: (Terrain) shader doesn't seem to work

Post by jal_ »

The editor doesn't display shaders, only textures, so the painted vertex-blent textures won't show up at the map editor cause they need the shader to blend them, it will always show the generic terrain image.

I think it was better to select the q3map2 template in the exporting window, and I believe your shader doesn't look like the one that template produces, but I'm not 100% sure about this since I created my own template a long time ago and I forgot since then.

Also, remember to add the shader file generated by easygen to your shaderlist.txt so they show up ingame, and if you move the terrain into a different map, remember to check the worldspawn and copy the terrain keys.
User avatar
monaster
Posts: 532
Joined: Mon Apr 28, 2008 1:52 pm

Re: (Terrain) shader doesn't seem to work

Post by monaster »

The shaderlist.txt issue has already been considered when I tried to get that thing running correctly. As far as the hint with vertex-blent texs never showing up inside the editor (at least not in their final form) is concerned thanks a lot!
I think it was better to select the q3map2 template in the exporting window, and I believe your shader doesn't look like the one that template produces, but I'm not 100% sure about this since I created my own template a long time ago and I forgot since then.
Hm, since I used a stand-alone version of EasyGen (1.4.2) and saved newly created terrains inside EasyGen with
Export->terrain entity (.map) there could be a problem with it indeed. Maybe you still got an old shader produced with that template somewhere? This as a base could make things a lot easier. Also, I'll try out the q3map2 template export

[EDIT: Deleted some explanations about GenSurf because I already found the template funcion in export :smirk: ]
If you are caught on a golf course during a storm and are afraid of lightning, hold up a 1-iron. Not even God can hit a 1-iron.
-Lee Trevino, golfer who actually has been struck by lightning.
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: (Terrain) shader doesn't seem to work

Post by jal_ »

Nope, I don't have any old shader, but I checked my shaders and I'm sure my template was based on the q3map2 one, so the q3map2 one works fine(my template isn't any different than the original when per-pixel-lighting is disabled).

BTW, make sure you use the 2.5.17 version of q3map2. Previous had a bug with iluminating the lightgrid from the sun.
Post Reply