More terrain texture woes


(stil) #1

After scrapping an old version of this heightmap, I changed the original greyscale image to accomodate some more terrain. However, I’m running into the same problems which plauged the old heightmap.

http://www.angelfire.com/indie/stil/pics.html

The first pic is a standard version of the shader file.


textures/terra3/terrain_0
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/stone/mxsand2.jpg
		rgbGen vertex
		tcmod scale 0.125 0.125
	}
}

textures/terra3/terrain_0
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/stone/mxsand2.jpg
		rgbGen vertex
		tcmod scale 0.125 0.125
	}
}

The second pic is the q3map version of the shader file.


textures/terra3/terrain_0
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
	{
		map textures/stone/mxsand2.jpg
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/terra3/terrain_0to1
{
	q3map_lightmapsamplesize 64
	q3map_lightmapaxis z
	q3map_texturesize 512 512
	q3map_tcGen ivector ( 128 0 0 ) ( 0 128 0 )
	
	{
		map textures/stone/mxsand2.jpg
	}
	{
		map textures/stone/mxsand1.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

I’m still no closer to figuring out what is causing these probs :frowning:
I have a faint idea that it might be caused by the dimensions of my heightmap ?

39 by 55 divisions. 128 units per divison; 4992 by 7040 total size

The greyscale image is 40 by 56 pixels.

Before I ran into the texture probs, the terrian map wouldn’t even render. I deleted one column of pixels from the heighmap and started again. (original image size was 41 by 56) This fixed that prob…although I dont know why the image sclae was a prob in the first place. :banghead:


(chavo_one) #2

In the second shader you have conflicting directives. It’s my understanding that ‘q3map_texturesize’ and ‘q3map_tcGen ivector’ do the same thing. So the fact that you are setting your texture to repeat every 512 units with ‘q3map_texturesize’ and every 128 units with q3map_tcGen ivector’ seems silly. The actual shader is setting it to repeat every 128 units since ‘q3map_tcGen ivector’ is the last one listed, and I don’t think that’s what you want. Either remove one of them or set them both to common values.


(stil) #3

Ahhhhh…can I get a second opinion on that please :?
:wink:


(demonspawn) #4

I think I can help on this…make sure your shader is in your shader list…I know this sounds stupid but I think you’ll find that it fixes your problem…speaking from experience…as I had the same trouble.


(stil) #5

I’ll give that a try, thanks.


(stil) #6

It worked n_n

…but why :?

W0o0o, I’m finally getting there… but now I’m paranoid that something else is going to go wrong :open_mouth:


(ydnar) #7

The shader has to be in shaderlist.txt in order for Q3Map2 to know about it.

BTW, q3map_tcGen and q3map_textureSize are two very different directives. They do not mean the same thing. To be more specific, you don’t need q3map_textureSize if you’re making a level for the PC. Also, you may have better results with the lightmap quality if you remove q3map_lightmapSampleSize.

y