texture problem


(WeeBull) #1

i’m working on a map (tankrace) and i made some textures by myself and i also made some shaders, although i don’t know much about it, i just copied some shaders and changed some things (i know it’s not good to copy, but it would have been more or less the same if i made them myself and this way i was sure that they were good). i put the textures in etmain/textures/tankrace and the shader in etmain/scripts, i test my map and everything works fine. but now i made a pk3, i put the textures in textures/tankrace and the shader in scripts. i try to play it in my normal ET install (not my mapping install) but i can only see 2 or 3 of the textures, the rest is black and orange. here is the shader, maybe someone can find out if there’s something wrong with them.

textures/tankrace/fence //it has an alpha channel and is a 32 bit .tga
{
	qer_editorimage textures/tankrace/fence.tga
	cull disable
	nomipmaps	
	nopicmip
	surfaceparm nomarks
	surfaceparm alphashadow
	surfaceparm metalsteps
	surfaceparm pointlight
	surfaceparm trans
	implicitMask -
}

textures/tankrace/grass //this one is in pak0
{
	qer_editorimage textures/temperate_sd/grass_dense1
	implicitMap textures/temperate_sd/grass_dense1
	surfaceparm landmine
}

textures/tankrace/grassnolandmines //this one is also in pak0
{
	qer_editorimage textures/temperate_sd/grass_dense1
	implicitMap textures/temperate_sd/grass_dense1
}

textures/tankrace/skybox //copied from skies_sd, i only added a nearbox, which worked fine before i made the pk3
{
	nocompress
	qer_editorimage textures/skies_sd/siwa_clouds.tga
	q3map_lightimage textures/skies_sd/siwa_clouds.tga
	
	q3map_sun 0.75 0.70 0.6 135 199 49
	q3map_skylight 75 3
	sunshader textures/skies_sd/siwasunbright
	
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight
	surfaceparm sky
	
	skyparms textures/skies_sd/wurzburg_env/sky 512 textures/tankrace/env/tankrace
 
	{
		fog off
		clampmap textures/skies_sd/siwa_mask.tga
		tcMod scale 0.956 0.956
		tcMod transform 1 0 0 1 -1 -1
		rgbGen identityLighting

	}
}

textures/tankrace/doors_metal //24 bit .tga
{
	surfaceparm metalsteps
	implicitMap -
}

textures/tankrace/water // .jpg but this one does work i believe
{
	nocompress
	qer_editorimage textures/tankrace/water.tga
	qer_trans .25
	q3map_globaltexture

	surfaceparm water
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm lightfilter

	tessSize 256
	cull disable
	deformVertexes wave 100 sin 0 2 .5 .25
	{ 
		map textures/tankrace/water
		rgbGen identity
		blendFunc blend
		alphaGen const 0.7
		depthWrite
		tcmod scale .5 .5
		tcmod turb 0 0.01 0 0.15
		tcmod scroll .01 .01
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
		depthFunc equal	
	}
}

i also have 3 textures without shader and they do work


(Fusen) #2

hmm can’t help with the problem sorry, but does this map involve racing tanks? ;D


(WeeBull) #3

yes, and i already said it in this thread :stuck_out_tongue:


(DAbell) #4

Is it the 2 grass textures that are turning into the Orange and Black grid of Death, if so your comment next to them saying they are in pak0 maybe the problem the textures that you have used there may need to be copied into the textures/tankrace folder because that path doesn’t exist in the pak0 file. Forgive me if i have misread or not understood your post.

<DJ>


(WeeBull) #5

none of the textures work (i only get the black/orange texture), except for the doors_metal and the fence, but the fence is a texture with an alpha channel which doesn’t work, so i see the whole texture but some parts need to be transparent.
about the grass. this texture: textures/temperate_sd/grass_dense1 is in pak0, i only made a new shader for it, just like in supply depot.


(Loffy) #6

About the grass shader, I would take away this shader:


textures/tankrace/grass //this one is in pak0
{
   qer_editorimage textures/temperate_sd/grass_dense1
   implicitMap textures/temperate_sd/grass_dense1
   surfaceparm landmine
}

…and use this shader instead:


textures/tankrace/grass_secondversion
{
   qer_editorimage textures/temperate_sd/grass_dense1.tga
   surfaceparm landmine
   implicitMap -
   {
      map textures/temperate_sd/grass_dense1.tga
   }
}

Will it work? I’m no shader expert, but this is what I would try.
//Loffy


(kamikazee) #7

I believe the last one may not work, as I’d say implicitMap shouldn’t be used if you include a shader pass. (the map … one)

Maybe we’ve got to ask Shaderman? :smiley:


(The Wanderer) #8

implicitMap is a combined mapping and lighting stage
basically instead of saying


{
   map someTexture
  ...
}
{
    map $lightmap
    ...
}

you can just say


implicitMap someTexture 

and it will be the same as above
adding another un-blended mapping stage after implicitMap is simply “covering� all your previous stages.(which basically makes them unnecessary)

implicitMap – uses the shader name for the texture paths in the mapping stage. For example in the textures/tankrace/doors_metal shader above implicitMap is internally doing map textures/tankrace/doors_metal.

A quick suggestion. Sometimes having the pk3 in the same game installation that your development files are can give some weird errors like these(sometimes because you have old testing shaders that you’ve forgotten about and are conflicting).
Put the pk3 in a completely clean install that doesn’t have any of your development .map or .shader files and see if the problem is still there.


(Shaderman) #9

Maybe we’ve got to ask Shaderman? :smiley:

You can ask me everything regarding shaders, but don’t expect useful output :stuck_out_tongue:

I’m at work at the moment and don’t have too much time but maybe it’s enough to help.

i test my map and everything works fine. but now i made a pk3, i put the textures in textures/tankrace and the shader in scripts. i try to play it in my normal ET install (not my mapping install) but i can only see 2 or 3 of the textures, the rest is black and orange.

Without looking at the shaders above, I’d say there must be something wrong with the pk3. If the shaders themselves weren’t ok, they wouldn’t even work with devmap, right?

Shaderman


(WeeBull) #10

ok, first of all thx for the help.
i’ve rebuild the pk3 and i still have problems.
these are the textures which are all in textures/tankrace

fence.tga, has an alpha channel but i can’t see through it and when i shoot it i hear a metal sound, but i do see the texure, it’s not orange/black.

textures/tankrace/fence 
{ 
	qer_editorimage textures/tankrace/fence.tga 
   	cull disable 
   	nomipmaps    
   	nopicmip 
   	surfaceparm nomarks 
   	surfaceparm alphashadow 
   	surfaceparm metalsteps 
   	surfaceparm pointlight 
   	surfaceparm trans 
   	implicitMask - 
} 

doors_metal.tga, this one works.

textures/tankrace/doors_metal 
{ 
   	surfaceparm metalsteps 
   	implicitMap - 
} 

bblogo1.tga, doesn’t have a shader and works
bblogo2.tga, doesn’t have a shader and works
water.tga, i do see this texture but it doesn’t move like water and it isn’t transparent

textures/tankrace/water 
{ 
   	nocompress 
   	qer_editorimage textures/tankrace/water.tga 
   	qer_trans .25 
   	q3map_globaltexture 

   	surfaceparm water 
   	surfaceparm trans 
   	surfaceparm nonsolid 
   	surfaceparm lightfilter 

   	tessSize 256 
   	cull disable 
   	deformVertexes wave 100 sin 0 2 .5 .25 
   	{ 
      		map textures/tankrace/water 
      		rgbGen identity 
      		blendFunc blend 
      		alphaGen const 0.7 
      		depthWrite 
      		tcmod scale .5 .5 
      		tcmod turb 0 0.01 0 0.15 
      		tcmod scroll .01 .01 
   	} 
   	{ 
      		map $lightmap 
      		blendFunc GL_DST_COLOR GL_ZERO 
      		rgbgen identity 
      		depthFunc equal    
   	} 
}

red_white.tga, doesn’t have a shader and works
grass_dense1.tga, copied this one from pak0.pk3 textures/temperate_sd, i’ve got 2 shaders for this one, one with landmine, one without and that works but i don’t see the texture (black/orange)

textures/tankrace/grass_dense1 
{ 
   	qer_editorimage textures/tankrace/grass_dense1 
   	implicitMap - 
   	surfaceparm landmine 
} 

textures/tankrace/grass_dense1_nomines 
{ 
   	qer_editorimage textures/tankrace/grass_dense1 
   	implicitMap -
} 

the last thing is my sky, i’ve used the shader from oasis and the only thing i changed was adding a nearbox. i’ve got 6 textures, tankrace_bk.tga, tankrace_dn.tga, tankrace_ft.tga, tankrace_lf.tga, tankrace_rt.tga, tankrace_up.tga. these are in the folder env.

textures/tankrace/skybox 
{ 
   	nocompress 
   	qer_editorimage textures/skies_sd/siwa_clouds.tga 
   	q3map_lightimage textures/skies_sd/siwa_clouds.tga 
   	 
   	q3map_sun 0.75 0.70 0.6 135 199 49 
   	q3map_skylight 75 3 
   	sunshader textures/skies_sd/siwasunbright 
    
   	surfaceparm noimpact 
   	surfaceparm nolightmap 
   	surfaceparm nodlight 
   	surfaceparm sky 
    
   	skyparms textures/skies_sd/wurzburg_env/sky 512 textures/tankrace/env/tankrace 
  
   	{ 
      		fog off 
      		clampmap textures/skies_sd/siwa_mask.tga 
      		tcMod scale 0.956 0.956 
      		tcMod transform 1 0 0 1 -1 -1 
      		rgbGen identityLighting 

   	} 
} 

i’ve uploaded the map here


(Shaderman) #11

I had a (short) look at your map. You should look in the console for errors if something isn’t working as expected. Shortened console log:

WARNING: R_FindImageFile could not find 'textures/tankrace/water' in shader 'textures/tankrace/water'
Shader textures/tankrace/water has a stage with no image

You should append .tga to the line “map textures/tankrace/water” in your water shader.

WARNING: Couldn't find image for shader textures/tankrace/grassnolandmines
WARNING: Couldn't find image for shader textures/tankrace/grass

I can’t find any shader or texture named grassnolandmines/grass. It seems like you compiled your map with those two shaders, but removed them from your .shader file afterwards.

Sorry, have to stop here - dinner is waiting… :smiley: