Terrain shader not working


(stephanbay) #1

Hi, i have got recently a problem with my terrain shader. the textures doesnt show correctly and no blending is working. Terrain made with easygen but manually textured on radiant. Shader name added to shaderlist of course.

here are some pics of actual and the pics of the terrain i want. Thank you for your help



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


textures/pha/terrain_0
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_1
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/master_grass_dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_0to1
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_0to2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/dirt3.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/dirt3.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/pha/terrain_1to2
{
	q3map_baseshader textures/pha/terrain_base
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
	surfaceparm landmine
	surfaceparm grasssteps
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		tcMod scale 0.167 0.167
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen vertex
		tcMod scale 0.167 0.167
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}


[/img]


(CyburK) #2

i dont understand why you are texturing the terrain twice :???: the shader you posted is generated by easygen and if you texture the brush in radiant you tell the brush to have two textures at a time wich is not possible i think (and not wanted). if you want to have a different texture than you had in easygen just replace the texture path after your needs or adjust the scaling.


(stephanbay) #3

no no i didnt retextured the terrain a second time. its the same. it just that the shader is not working anymore or i dont know. both pictures are using the same shaders but for an unknown reason when the map is compiled i have this problem now. Hope somebody can help


(CyburK) #4

but manually textured on radiant

try this: dont texture the terrain manually in radiant, only use the shader from easygen.
and dont cut the terrain with the clipper tool. if you want to remove/cut terrain brushes do it as its explained in this tutorial.

http://kos.philgeorge.com.au/tutorials/putting_building_into_your_terrain/putting_building_into_your_terrain.html


(stephanbay) #5

ok the thing is that i lost the original easygen file for the terrain so i did the textures manually. is there anyway to do it again with easygen. cuz now the map is almost done. can i export my .map and retexture it ? if yes, will i lose all the entities or anything that have been made by radiant?


(Kic) #6

Thirst try to find pcx of your map from easygen. If you canť find, you can import terrain to easygen from GTK Radiant with entities, in import window mark wordspawn & group entities , make changes in easygen and export back to Radiant map, in export window in easygen donť forget mark include models. !!! Than you import your map to easygen make rather copy of your map and place on other place!!!
nice screenshots, it looks as a good map
I think it should work.


(stephanbay) #7

ok thank you i will try it