texture/shader problems


(Theisy) #1

Ok problem one is that I can’t plant landmines :confused: Here is my shader file, note the lines surfaceparm landmine repeated a couple of times

textures/city1/terrain_0
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/sand_wave_desert.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/sand_wave_desert.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_1
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/road_dirty_gravel.tga
	surfaceparm gravelsteps
	{
		map textures/desert_sd/road_dirty_gravel.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_2
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/sand_dirt_medium.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/sand_dirt_medium.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_3
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/pavement_quad_sandy.tga
	surfaceparm gravelsteps
	{
		map textures/desert_sd/pavement_quad_sandy.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_0to1
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/sand_wave_desert.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/sand_wave_desert.tga
	}
	{
		map textures/desert_sd/road_dirty_gravel.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_0to2
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/sand_wave_desert.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/sand_wave_desert.tga
	}
	{
		map textures/desert_sd/sand_dirt_medium.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_0to3
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/sand_wave_desert.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/sand_wave_desert.tga
	}
	{
		map textures/desert_sd/pavement_quad_sandy.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_1to2
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/road_dirty_gravel.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/road_dirty_gravel.tga
	}
	{
		map textures/desert_sd/sand_dirt_medium.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_1to3
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/road_dirty_gravel.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/road_dirty_gravel.tga
	}
	{
		map textures/desert_sd/pavement_quad_sandy.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_2to3
{
	q3map_baseshader textures/city1/terrain_base
	qer_editorimage textures/desert_sd/sand_dirt_medium.tga
	surfaceparm landmine
	surfaceparm gravelsteps
	{
		map textures/desert_sd/sand_dirt_medium.tga
	}
	{
		map textures/desert_sd/pavement_quad_sandy.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/city1/terrain_base
{
	nopicmips
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
}

Problem two is that whenever I have three textures joining together everything goes to pot. Is there anyway of avoiding this or do I have to make sure it doesn’t happen.


(chavo_one) #2
  1. Make sure your shader is listed in shaderlist.txt
  2. Make sure your baseshader is listed first.
  3. The alphablending doesn’t work with three textures at the same vertex. In easygen, you’ll notice this causes black triangles. You can blend two textures.

(Theisy) #3

Thankyou :clap:

I hadn’t entered it in the shaderlist.txt file. I had a similar problem with scripting. It was about an hour before I found out I needed a scrip_multiplayer :smiley:

On the subject of blending I am fine now as I have gotten rid of the areas which were mucked up and they look better than before.