Terrain Problems


(Steuernol) #1

I have read the other threads about textures not showing up on easygen generated terrain, and tried the things they mentioned and I still cannot get it to work. I have used easygen to generate the terrain, saved the metashader, the alphamap, and used the wolfet templates. Didn’t work, compared my shader to the official ones, almost the same, I am not sure what to do, any help would be apprciated.

Here is my shader file, if that helps


textures/test/terrain_0
{
	q3map_baseshader textures/test/terrain_base
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_1
{
	q3map_baseshader textures/test/terrain_base
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/temperate_sd/rocky_sand.tga
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_2
{
	q3map_baseshader textures/test/terrain_base
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/temperate_sd/rock_grayvar.tga
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_3
{
	q3map_baseshader textures/test/terrain_base
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/temperate_sd/grass_path1.tga
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_4
{
	q3map_baseshader textures/test/terrain_base
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/temperate_sd/grass_dense1.tga
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_5
{
	q3map_baseshader textures/test/terrain_base
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/test/sand_1.tga
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_0to1
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/rocky_sand.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_0to2
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/rock_grayvar.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_0to3
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/grass_path1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_0to4
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_0to5
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/test/sand_1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_1to2
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/rocky_sand.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/rock_grayvar.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_1to3
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/rocky_sand.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/grass_path1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_1to4
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/rocky_sand.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_1to5
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/rocky_sand.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/test/sand_1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_2to3
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/rock_grayvar.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/grass_path1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_2to4
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/rock_grayvar.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_2to5
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/rock_grayvar.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/test/sand_1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_3to4
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/grass_path1.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_3to5
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/grass_path1.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/test/sand_1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_4to5
{
	q3map_baseshader textures/test/terrain_base
	{
		map textures/temperate_sd/grass_dense1.tga
		tcMod scale 0.252 0.252
	}
	{
		map textures/test/sand_1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.252 0.252
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/test/terrain_base
{
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_lightmapsize 512 512
	q3map_tcGen ivector ( 254 0 0 ) ( 0 254 0 )
}

thanks in advance


(chavo_one) #2

Did you add your shader to shaderlist.txt?


(Steuernol) #3

Yeah, I’ve done that. Still no change. It used to work fine, then my installation of ET crapped out. I think some server config file threw some settings off. I was getting a Handle out of range error, whenever I tried to use \devmap test . The only solution I found was to reinstall ET, so I did, and no terrain generated by easygen has textures in the game. Also I have reinstalled Radiant, when I went to 1.3.11 a couple of days ago, and still no change.


(Drakir) #4

Do you have the right stuff set in the func_group (terrain)?

key: terrain
value: 1

key: alphamap
value: test.pcx

key: shader
value: test/terrain


(Steuernol) #5

Yeah, all those key and values are there and 1 additional one

Key: layers
Value: 6


(Drakir) #6

One thing to test can be that the tcmod scale seems pretty odd, 0.252?

Try taking the last 2 out making it 0.250. This is only a guess.


(Frankesk) #7

Try using a more unique name instead of “test”…

(this trick once worked for me when a terrain didnt show up)

EDIT: maybe you’re using too many layers… also?


(nono) #8
  • Place the base shader at the top (it’s currently at the bottom).
  • Remove all the “tcMod scale 0.252 0.252”. Runtime scaling hurts performence and should only be used if one of the stages requires a different scaling.
  • change the “q3map_tcGen ivector ( 254 0 0 ) ( 0 254 0 )” to “q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )”. The textures on the terrain will look nicer.
  • You might also want to add “rgbGen identity” to all the stages, since you are using lightmapping.
  • correct all the “surfaceparm gravelsteps” to something more sensible (grass steps for the grass, remove it for the rocks, etc.).
  • remove “surfaceparm landmine” from where it doesn’t make sense.
  • Maybe use phong shading, add the following to the baseshader:

q3map_forceMeta
q3map_nonPlanar
q3map_shadeAngle 180

Then all the grunt work is done. Only the tweaking remains. :smiley:


(Steuernol) #9

Thanks for all the replies, the problem has been fixed, I believe it was the tcMod 0.252 0.252 lines. I had been following a tutorial, and it said press the ‘+’ key four times to scale the textures across the terrain, but I guess it screws things up instead.