smooth terrain


(SoulRebel) #1

hi all!

i dont know how to make terrain to get smooth together… i have tried several shader but nothing works

textures/gma4/terrain_base
{
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_lightmapsize 512 512
	q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
}

textures/gma4/terrain_0
{
	q3map_baseshader textures/gma4/terrain_base
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/grass_dense1.tga
		tcMod scale 0.250 0.250
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/gma4/terrain_1
{
	q3map_baseshader textures/gma4/terrain_base
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_grayvar.tga
		tcMod scale 0.250 0.250
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/gma4/terrain_0to1
{
	q3map_baseshader textures/gma4/terrain_base
	{
		map textures/temperate_sd/grass_dense1.tga
		tcMod scale 0.250 0.250
	}
	{
		map textures/temperate_sd/rock_grayvar.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.250 0.250
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}
textures/gma4/terrain_1to0
{
	q3map_baseshader textures/gma4/terrain_base
	{
		map textures/temperate_sd/rock_grayvar.tga
		tcMod scale 0.250 0.250
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.250 0.250
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

i dont know what terrain_base does nor how i can put this shader on my map…

in this case i use 4 brushes… the first brush-top is textured with terrain_0 the next with terrain_0to1 then terrain_1 and at last terrain_1to0

the 1st (0) brush looks like: grass_dense1.tga
the 2nd (0-1) brush looks like: rock_grayvar.tga
the 3rd (1) brush looks like: rock_grayvar.tga
the 4th (1-0) brush looks like: grass_dense1.tga

but it doesnt look like the hills on radar

plz. help …

(how do i use the common/terrain shader?)


(Machine for to kill) #2

You mixed a bunch of different questions here that are not all related.

To make smooth terrain, or smooth anything for that matter you need phong shading. This is the thread that explains it

http://www.splashdamage.com/forums/viewtopic.php?t=3068

terrain_base is a metashader. I suggest reading the terrain manual that comes with radiant. terrain_base is not a keyword, is just a name that you assigned to this shader. Then any additional shaders you define with the q3map_baseshader directive and that call terrain_base will use the terrain_base parameters in addition to their own. It’s sort of a parent object and all of the children that use the q3map_baseshader will use whatever the parent defined, plus any new additional parameters of their own.

Also terrain texturing does not show up in radiant. In radiant you’ll see the terrain or terrain2 or whatever the common shader is. In game however things should look fine.

By the looks of your shader it seems like you’re using easygen. There’s all kind of problems with that and it can become very difficult to pinpoint which one. Search through the forum to see what has been discussed before. Also take out the tcMod parameters from your terrain (unless you placed them there yourself for various effects).


(SoulRebel) #3

thx for you answer… i haven’t seen the terrain manual, yet

i dont mean phong shader… my question was about how to use common/terrain with own textures like the ones in radar (lmterrainX_X)

but i will first look thought the manual…


(SoulRebel) #4

i got it!

i forgot the *.pcx alphamap and generally to put a terrain-func-group-entity

now it looks like it should… screenshot is here