Terrain texturing problems (pics included).


(Apple) #1

I was doing some experiments with blending terrain textures manualy (i.e. not using EasyGen) last night and while the results were mostly promising, I am having some issues with seams. Take a look:

http://home.comcast.net/~olsen31/Images/shot0000.jpg

http://home.comcast.net/~olsen31/Images/shot0001.jpg

And even stranger, I have this happening on level terrain as well:

http://home.comcast.net/~olsen31/Images/shot0003.jpg

My shader for the slighty dirty snow is straight out of the fueldump shader…

textures/terraintest/terrain_base
{
	q3map_lightmapMergable
	q3map_lightmapaxis z
	q3map_lightmapsize 512 512
	q3map_normalimage textures/sd_bumpmaps/normalmap_terrain.tga
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	q3map_tcMod rotate 37
	q3map_tcMod scale 1 1
	surfaceparm landmine
	surfaceparm snowsteps
}

textures/terraintest/terrain1_0
{
        qer_editorimage textures/stone/mxsnow2.tga
	q3map_baseshader textures/fueldump/terrain_base
	{
		map textures/stone/mxsnow2.tga
		rgbgen identity
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}


(Ragnar_40k) #2

The shader is missing a command for the dot 2 product, something like: “q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 )”

See this tutorial for more detail.


(G0-Gerbil) #3

Also, all the textures need to be the same resolution.


(LowLife) #4

@ Ragnar: I dont think he’s trying to do dp2 blending.
@ Gerbil: Youre wrong, they can be different sizes, as they are projected at 512*512.

@ Apple: In your shader, you havent renamed the fueldump baseshader to your own. So its trying to use the fueldump one but fails.

So you should replace all occurances of :

q3map_baseshader textures/fueldump/terrain_base

with:

q3map_baseshader textures/terraintest/terrain_base

:smiley: Well at least i think, this is what causes the errors :smiley:


(G0-Gerbil) #5

@ Gerbil: Youre wrong, they can be different sizes, as they are projected at 512*512.

Really? I’ve never had anything but trouble with projected textures at different sizes. shrugs


(Apple) #6

Ding ding ding! We have a winner. The terrain looks right as rain now, thanks!