Weird sv_pure 1 pk3 problem


(SteelRat) #1

Hmm, I am stuck in a problem I just don’t seem to be able to solve.

Here’s the deal:
I am making a pk3 file with a fully working map (snatch), all is fine and I can test it without issues at all on the mapping client. Then when I create the pk3 file including all required files it works just great on that same client using +sv_pure 0, but when I change the client to run using +sv_pure 1 then the terrain has changed???

Now…this is a pure client, I have no pk3 files part from the ones that came with GtkRadiant in \etmain.

So with +sv_pure 0 it works.
With +sv_pure 1 it works but the terrain is messed up.

The problem is exactly the same on all other clients I have tested the file on.

I have been trying to find what is missing but I can’t seem to find it.
I have never had this problem before and I have compared my pk3 to other pk3 files I have used for my other maps and can’t find anything wrong.

My initial thought was that the .pcx file for the terrain was missing, but it is not.

Anybody got any good ideas?

Cheers,
SteelRat


(G0-Gerbil) #2

It’s not likely, but I recall there was a problem with one of rivrstyx’s maps where some of the shaders went wrong under funny circumstances.
He actually blamed it on my maps to start with, but it turned out he had duplicate shaders in his map’s shader list, and it turned out that ET reads in the shaders in an arbitrary order (arbitrary in as much as things like having slightly different other files available would change the order).

So erm… my only current suggestions are:

  1. Double double check (or triple check if you like) you aren’t missing something from your source files
  2. Check your shader file to ensure it only contains 1 instance of each used shader from the map.

(SteelRat) #3

Thx G0-Gerbil,

  1. I have checked, recreated and verified the pk3 a number of times and all required files are there and in the proper locations.
  2. Just checked my shader file (and here is where I would expect something to be wrong) and there are no duplicates.

Can’t see why it should work with sv_pure 0 and then not with sv_pure 1 as all I have are the std files required for a map like, bsp, objdata, script, arena, shader, textures and sounds.


(SCDS_reyalP) #4

You’ve probably already done this, but check the console for errors/warnings.

Also, describe or better yet, post a screenshot of how the terrain is messed up.

The .pcx file is only used at compile time.

edit: don->done :banghead:


(MrLego) #5

What’s messed up with the terrain?

Missing textures, texture scaling, lighting, etc…

Anything in the console that stands out?

Missing a lightmap? - I once left one out of a pk3 and things looke a bit off.

Vanilla ET or running a mod?


(SCDS_reyalP) #6

edit: gah, I meant to edit the other post, not double post. No offense intended MrLego


(MrLego) #7

reyalP - when I went back to reread the post I clicked on submit instead of preview and before I could fix it, the power went out.

Sorry for the noob post.
:confused:


(SteelRat) #8

ok, sorry for being a bit unclear…

Here is the terrain OK, focus on the lovely hills at the side of the map.

This is the exact same file but with +sv_pure 1, you can see the areas where suddenly the terrain textures have changed. Even weirder is that only some textures change and others stay intact…

Got any ideas?
SteelRat


(Shaderman) #9

I have no pk3 files part from the ones that came with GtkRadiant in \etmain.

If you’re 100% sure about that, I’d rename the shader and textures you’re using for your terrain and see what happens. If you’re using stock ET textures, copy them to another folder and rename them (don’t forget to change the name and path in your shader).


(SteelRat) #10

Hmmm yeah I could do that. All terrain textures are stock textures with my shader for them, I have always done it this way before so I really don’t see why it is happening now.

What is it that the game engine speficically does different then using +sv_pure 0 vs +sv_pure1?
To my knowledge it ignores all files outside the pk3’s?


(kamikazee) #11

Yes, but it can be that there’s a modified file in your textures dir which gets replaced by the original in pak0.pk3 if you turn sv_pure on.


(Shaderman) #12

Extraordinary problems need extraordinary solutions or workarounds :smiley:

What is it that the game engine speficically does different then using +sv_pure 0 vs +sv_pure1?
To my knowledge it ignores all files outside the pk3’s?

AFAIK

  • (what you wrote above) only pk3 contents are loaded and uses (no extracted textures for example)
  • client and server pk3 files must have the same CRC? checksum
  • (not sure about this) every pk3 which is used (or better loaded?) by the server must be available on the client.

(EB) #13

I have a question…

How’z about letting someone “test it the same way” but on their ET-mapping-install ?

I will volunteer: etmaps@gmail.com
…and I will look over the shaders and such as well.
(mail it if ya want to)


(Loffy) #14

Hi EB!
The Steelman sent the pk3 to me yesterday. I tried it in both my ordinary install (which I use when I play ET and dominate on public servers) and in my clean default ET-install (which I use for map testing).
I got the bug in both installs! The bug that he describes above, in the second screenshot with the red circles on top of the mountain. Grass in the wrong places, in other words, in both Et installs.
The mystery continues…


(kamikazee) #15

I still think that the applied texture is simply grass texture.

For some reason, a rock-looking texture might have ended up in your textures folder where it looks good if you test unpure. If then the version from pak0 is used, it looks like a grass texture as it should have been.
At least, this sounds the most obvious to me.

We might help more if we know what the texturename is.


(SteelRat) #16

Thanks guys!

Here goes the current shader:

textures/snatch/terrain_base
{
	nopicmip
	q3map_lightmapaxis z
	q3map_lightmapmergable
	q3map_tcGen ivector ( 384 0 0 ) ( 0 384 0 )
}


textures/snatch/terrain_0
{
	q3map_baseshader textures/snatch/terrain_base
	qer_editorimage textures/temperate_sd/grass_path1.tga
	{
		map textures/temperate_sd/grass_path1.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm landmine
	surfaceparm grasssteps	
}

textures/snatch/terrain_1
{
	q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/rock_grayvar.tga
	{
		map textures/temperate_sd/rock_grayvar.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/snatch/terrain_2
{
	q3map_baseshader textures/snatch/terrain_base
	qer_editorimage textures/temperate_sd/grass_dense1.tga
	
	{

		map textures/temperate_sd/grass_dense1.tga
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm landmine
	surfaceparm grasssteps
}


textures/snatch/terrain_3
{
	q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga

	{
		map textures/temperate_sd/rock_ugly_brown.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/snatch/terrain_4
{
	q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/dirt_m03icmp_brown.jpg
	{
		map textures/temperate_sd/dirt_m03icmp_brown.jpg
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm landmine
	surfaceparm gravelsteps
}

textures/snatch/terrain_0to1
{
	q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/grass_path1.tga
	
	{
		map textures/temperate_sd/grass_path1.tga
	}
	{
		map textures/temperate_sd/rock_grayvar.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm grasssteps
}

textures/snatch/terrain_0to2
{

    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/grass_path1.tga
	{
		map textures/temperate_sd/grass_path1.tga
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm landmine
	surfaceparm grasssteps
}

textures/snatch/terrain_0to3
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/grass_path1.tga
	
	{
		map textures/temperate_sd/grass_path1.tga
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm grasssteps	
}

textures/snatch/terrain_0to4
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/grass_path1.tga
	
	{
		map textures/temperate_sd/grass_path1.tga
	}
	{
		map textures/temperate_sd/dirt_m03icmp_brown.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm grasssteps	
}

textures/snatch/terrain_1to2
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/rock_grayvar.tga
	
	{
		map textures/temperate_sd/rock_grayvar.tga
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm landmine
	surfaceparm grasssteps
}

textures/snatch/terrain_1to3
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/rock_grayvar.tga
	
	{
		map textures/temperate_sd/rock_grayvar.tga
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/snatch/terrain_1to4
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/rock_grayvar.tga
	
	{
		map textures/temperate_sd/rock_grayvar.tga
	}
	{
		map textures/temperate_sd/dirt_m03icmp_brown.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/snatch/terrain_2to3
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
	
	{
		map textures/temperate_sd/grass_dense1.tga
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm grasssteps	
}

textures/snatch/terrain_2to4
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/dirt_m03icmp_brown.jpg
	
	{
		map textures/temperate_sd/grass_dense1.tga
	}
	{
		map textures/temperate_sd/dirt_m03icmp_brown.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm grasssteps	
}

textures/snatch/terrain_3to4
{
    q3map_baseshader textures/snatch/terrain_base	
	qer_editorimage textures/temperate_sd/dirt_m03icmp_brown.jpg	
	{
		map textures/temperate_sd/rock_ugly_brown.tga
	}
	{
		map textures/temperate_sd/dirt_m03icmp_brown.jpg
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/snatch/terrain.vertex
{
	{
		map textures/temperate_sd/grass_path1.tga
		rgbGen vertex
	}
}

textures/snatch/snatch_sky
{
	nocompress
	qer_editorimage textures/skies/topclouds.tga
	q3map_lightrgb 0.8 0.9 1.0
	q3map_sun 1 .96 .87 140 140 45 
	q3map_skylight 80 4   
	q3map_nofog
	
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight
	surfaceparm sky
	
	skyparms textures/skies_sd/wurzburg_env/sky 512 -
 
	sunshader textures/skies_sd/batterysunfog
	{
		map textures/snatch/sky_4.tga
		tcMod scroll -0.001 -0.0025
		tcMod scale 1 1
	}
}

textures/snatch/radiowall
{ 
   nopicmip 
   nocompress 
   nomipmaps 
   { 
      map textures/snatch/radiowall.tga 
      blendfunc blend 
   } 
}


textures/snatch/tunnel_dirt
{
	implicitMap -
	nopicmip
	surfaceparm gravelsteps
}



See any issues part from my usual shoddy shaders? :wink:


(SteelRat) #17

I copied the textures to my own directory and updated the shader after renaming the files to snatchgrass and so on…still the same issue.


(Shaderman) #18

Some suggestions:

textures/snatch/terrain_base
{
	//nopicmip
	//q3map_lightmapaxis z
	//q3map_lightmapmergable
	//q3map_tcGen ivector ( 384 0 0 ) ( 0 384 0 )
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
}

I would simplify the shader to break down the problem (remove parameters you don’t really need at the moment). AFAIK you should use the size of your textures for tcGen ivector. If you solve this problem, you could add q3map_shadeangle 180 to the base shader for phong shading.


textures/snatch/terrain_0
{
	q3map_baseshader textures/snatch/terrain_base
	qer_editorimage textures/temperate_sd/grass_path1.tga
	{
		map textures/temperate_sd/grass_path1.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	surfaceparm landmine
	surfaceparm grasssteps	
}

In this shader (and all other terrain shaders, too) I’d remove the qer_editorimage textures/temperate_sd/grass_path1.tga parameter for testing. Maybe this editorimage is used for some reason instead of the texture… The second thing in this shader are the surfaceparms. AFAIK they need to be set before the first stage (don’t know what happens if they are not).

If this doesn’t help, which one is the shader used at the problematic places?

Edit:

In this shader (and all other terrain shaders, too) I’d remove the qer_editorimage parameter for testing.

instead of

In this shader (and all other terrain shaders, too) I’d remove the qer_editorimage textures/temperate_sd/grass_path1.tga parameter for testing.


(SCDS_reyalP) #19

No, the engine will never use the editor image. The compiler will use it for lighting calculations (e.g. color produced by bounce) under some circumstances.

The shaders aren’t going to behave differently between pure and unpure, so I wouldn’t start messing with them.

The difference is going to be which files are found, and possibly the order in which they are seen.

Use the ‘path’ command to see the search order in each case. Make absolutely sure you don’t have a stray .pk3 with an old version of the shader, images, or .bsp

If you want me to take a look at it, feel free to send the .pk3 to reyalp(at)gmail.com


(EB) #20

Hopefully he will send it to you for investigation…as I have not received the file to work on any research.