shader problem??


(zbzero) #1

how ican get ride of these weird lines/triangles in the terrain, to explain better look at screenshot i really dont know how to get ride of this!!


(ailmanki) #2

A quick way to get rid of it is:
add to your terrain shader:

q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )

http://www.simonoc.com/pages/articles/terrain1_2.htm

A less quick way is, to to texture it all yourself with alpha volume brushes - also check siminoc’s articles


(zbzero) #3

I already did that but it do not disapear i think after so many tests i get it less noticeable but cant get it perfect, i also try use q3map_nonplanar too to merge the triangles, any other hint??


(ailmanki) #4

q3map_tcgen should work… Can you upload the terrain and shaders maybe?


(Mateos) #5

Here I use a different editor_image, and it works; But if I use directly the texture, it looks the same in editor and ingame: when the angle of the triangles is too angled, I have this in editor.

If needed I can up a screen to prove it works fine here this way, dunno why but it does :slight_smile:

Edit:
Just in case, the shader:

textures/Test/terrain_base
{
	q3map_shadeangle 60
	q3map_lightmapsamplesize 8
	q3map_lightmapsize 1024 1024
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
}

textures/Test/bigrock_rounded_faint
{
	qer_editorimage textures/editor_image/terrain0.tga
	q3map_baseshader textures/Test/terrain_base
	{
		map textures/snow_sd/bigrock_rounded_faint.tga
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

(zbzero) #6

i will give it a try Mateos thx for that, if the problem still occur i will upload the terrain and the shader


(zbzero) #7

The shader exemple not work also the q3map_tcGen ivector with different values not work too, i will need wait more 2 days to get back the map files due a HD problem (my secondary) all my files are stored there :frowning: , i really hope i can get it back because i already have done 50% of this map include the script.


(Mateos) #8

Well in my example you can remove terrain_base and q3map_baseshader, they’re uneeded to fix.

The important is to have a different editor_image than the “map” texture (Which will be the ingame one). I can show you that in editor I have your issue, and after compilation no issue.

Not sure the shade angle thingy can help, it is just supposed to smooth the shadows on terrain/rocky walls to make less noticeable the edges…