Terrain Bug in 2.3.35 / 2.3.36 or just changes?


(system) #1

Hi i had problems with my Terrain-shader.
Using Q3Map1 all went fine with the marks if you fire at the terrain-surface.

But compiling with Q3map2.3.35+ there are no marks. Just the same kind if i shot a stone, but no sand flying in the air.
Maybe I missed sone new stuff in this version, or maybe it’s a bug.

Here’s my Terrain-Shader:


textures/wald2/terrain_0
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
		 map textures/stone/mxrock2t.jpg
	}
{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_1
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
		map textures/stone/mxrock3_a.jpg
	}
	
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_2
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
		map textures/stone/mxrock4c.jpg
	}
	
{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}


textures/wald2/terrain_3
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
		map textures/stone/mxrock3aa.jpg
	}
	
{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_0to1
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
		map textures/stone/mxrock2t.jpg
	}
	{
		map textures/stone/mxrock3_a.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}

	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_0to2
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
		map textures/stone/mxrock2t.jpg
	}
	{
		map textures/stone/mxrock4c.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}

	
{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_0to3
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
	map textures/stone/mxrock2t.jpg
}
	{
		map textures/stone/mxrock3aa.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	

{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_1to2
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )

	{
		map textures/stone/mxrock3_a.jpg
	}
	{
		map textures/stone/mxrock4c.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}

	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_1to3
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )

	{
		map textures/stone/mxrock3_a.jpg
	}
	{
		map textures/stone/mxrock3aa.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}

	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain_2to3
{
	q3map_lightmapsampleoffset 8.0
	q3map_lightmapaxis z
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )

	{
		map textures/stone/mxrock4c.jpg
	}
	{
		map textures/stone/mxrock3aa.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}

	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/wald2/terrain.vertex
{
	{
		map textures/stone/mxrock2t.jpg
		rgbGen vertex
	}
}


(pazur) #2

i posted my terrain shader in the “new fur code(grass)” thread here. with 2.3.32 the gravelsteps(default) and grasssteps stuff works fine.

i noticed that the original common/terrain shader has surfaceparm nomarks. i use my own custom terrain shader(i mean the one with q3map_terrain… natter/natterterrain). maybe u take that surfaceparm nomarks out and see what happens


(ydnar) #3

Why do you have per-stage tcMod scale directives?

The q3map_tcGen ivector directive does all texture projection in Q3Map2, so the game doesn’t have to waste CPU cycles doing it at render time.

Remove those, and adjust your ivector lines if necessary to compensate.

y


(system) #4

It’s just the standart Terrain-shader easygen puts out, then exporting a terrain.
Without the tcmodscale the terrain looks very ugly.
I’m no Metashader specialist. :wink:

UPDATE:
I updated the code-block in my first posting with my current shader, but I can’t get it to work. :frowning:
I tested several values for q3map_tcGen ivector, but after a compile it all looked the same like before.

And there is still no Sand flying in the air then i shot at the terrain.

That bug is making me insane. :frowning:


(system) #5

ydnar, i tested your slterra with 2.3.36 and there is the same bug like in my map. I only replaced the sky with a standart wolf-sky.
No Sand if yu fire on the terrain and wrong scaling of the textures.

I also comiled the mp_beach map and there is all fine. I think itÄs because the terrain on mp_beach is vertex-lit.

screenie:


(pazur) #6

this is caused because the terrain common tex is 64x64. add: q3map_texturesize 512 512


(pazur) #7

… hmm i use opera browser. i get a general error msg and the post is visible in the thread but not in the overview :frowning:


(Old_Fellow) #8

@ Fiesling

I practised the same tests with the Ydnar’s slterra map.
I did not note any problem with the terrain, in lightmap as in vertex.
My tests were carried out for Q3A and RTCW with the q3map2 version 2.3.36.
Ensure yourself to have all the elements correctly laid out to carry out your tests.
You need:

slterra.shader in the “scripts” folder.
“slterra” in shaderlist.txt
image slterra.pcx in the “main” folder for RTCW, in the “baseq3” folder " for Q3A.
q3map_terrain in common/terrain and common/terrain2.

Apparently, there is no bug.

@ pazur

q3map_texturesize 512 512 is not really needed.


(Old_Fellow) #9

Same thing for me, but with I.E. 6


(ydnar) #10

Make sure your terrain shader is listed in shaderlist.txt. This is important; Q3Map2 needs to read it to get the correct texturing and surfaceparm info.

Also, the terrain layer shader should have the correct surfaceparms: grasssteps, gravelsteps, snowsteps, etc. They are set via your terrain shader, not the shader that’s on the brush in Radiant.

y


(pazur) #11

@Old_Fellow
i read in the old quake3world forum that q3map_texturesize is not needed. i took it out and my terrain looked like fieslings


(system) #12

I haven’t listed it in the shaderlist.txt. I will try it tomorrow. Hope it helps this time.


(eyeronik) #13

unless you add surface parm grasssteps it will never work it wont know its grass/dirt without that in the shader