shader prob


(redfox) #1

so i used my own textures. it works in radiant (1.4) but if i go to ET there are no textures.
i have shader in scripts folder. its name is that what is my folder’s name in textures (old_stone)
and the contents if the shader file is:

textures/old_stone/floor5_wooden
{
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/floor6
{
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/roof1
{
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/wall3_wooden
{
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/wall4_wooden
{
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm roofsteps
	implicitMap -
}

textures/old_stone/wall5
{
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm woodsteps
	implicitMap -
}
textures/old_stone/blouse1
{
	surfaceparm alphashadow
	surfaceparm nonsolid
	surfaceparm trans
	implicitMask -
}

textures/old_stone/blouse1anim
{
	qer_editorimage textures/old_stone/blouse1.tga
	deformVertexes wave 30 sin 0 3 0 0.2
	surfaceparm alphashadow
	surfaceparm nodamage
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm trans
	tessSize 64
	implicitMask textures/old_stone/blouse1.tga
}

so id there something wrong? :confused: when compiling then it happily loads the old_stone.shader


(stealth6) #2

you are not including the texture to show

this is probably not perfect, but it will work (I am not a master a shaders )

textures/old_stone/floor5_wooden
{
	qer_editorimage textures/old_stone/floor5_wooden.jpg
	q3map_lightimage textures/old_stone/floor5_wooden.jpg
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm trans
	surfaceparm woodsteps
	implicitMap -
	{
		map $lightmap 
		rgbGen identity
		tcGen lightmap 
	}
	{
		map textures/old_stone/floor5_wooden.jpg
		blendfunc filter
		rgbGen identity
	}
}

(redfox) #3

blaah. it still doesn’t work


(redfox) #4

and it doesn’t show the main textures, either!


(stealth6) #5

hmm strange did you rwemeber to do fulsh and reload shaders, and add the shader file name to the shaderlist.txt?


(redfox) #6

yes everything is done, and it doesn’t show the main textures, either!


(stealth6) #7

are you sure the man textures are the right format?
so size 1x1 2x2 4x4 64x64 128x128 etc… or 64x128

so a power of 2
and if it is a .tga file then it has to be 24 bit and if it has invisible parts 32 bit


(RayBan) #8

you should cover all the basics for your shader, so you need to have these image files,

textures/old_stone/floor5_wooden.jpg
textures/old_stone/floor6.jpg
textures/old_stone/roof1.jpg
textures/old_stone/wall3_wooden.jpg
textures/old_stone/wall4_wooden.jpg
textures/old_stone/wall5.jpg
textures/old_stone/blouse.tga
textures/old_stone/blouse1anim.tga

and those images MUST be at powers of 2, for example 1x16, 16x16… 256x256, 512x256, 512x512 and so on

your shaders in a file called old_stone.shader ( make shure it says .shader for the extension )
and finally you have to add your shader name to the shaderlist.txt
ie.


village
wood
xlab_door
xlab_props
xlab_wall
[B]old_stone[/B]

also you might notice that i use the extension of .jpg for most of your images, they could
also be .tga, but the last 2 shaders, blouse and blouse1anim use implicitmask so im assuming
they have alpha channels…

and now for your shaders, theres to much non essential stuff there you should chop out,
like the pointlight and trans for some of them. pointlight will make that surface vertex lit and
not by lightmaps, which is good for models and may have some use for surfaces compiled into
the map, but i would suggest sticking with lightmaps for those. also the trans being used in
implicitmapped shaders is not needed, but i do not know specificly what type of textures
you are using ( perhaps you should post some to get a better idea ).

these shaders should work, i’ll chop out some of the meat and leave what should be needed,


textures/old_stone/floor5_wooden
{
	//surfaceparm nomarks   // are you shure you want these here?
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/floor6
{
	//surfaceparm nomarks
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/roof1
{
	//surfaceparm nomarks
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/wall3_wooden
{
	//surfaceparm nomarks
	surfaceparm woodsteps
	implicitMap -
}

textures/old_stone/wall4_wooden
{
	//surfaceparm nomarks
	surfaceparm roofsteps
	implicitMap -
}

textures/old_stone/wall5
{
	//surfaceparm nomarks
	surfaceparm woodsteps
	implicitMap -
}
textures/old_stone/blouse1
{
	surfaceparm alphashadow
	surfaceparm nonsolid
	surfaceparm trans
	implicitMask -
}

textures/old_stone/blouse1anim
{
	qer_editorimage textures/old_stone/blouse1.tga
	deformVertexes wave 30 sin 0 3 0 0.2
	surfaceparm alphashadow
	surfaceparm nodamage
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm trans
	tessSize 64
	implicitMask textures/old_stone/blouse1.tga
}

the nopicmip and nomipmaps i don’t think are needed, but then again i do not know
the look your going for, back in the quake3 days we would use the r_picmip command to
change the image quality to very low, made the textures all sort or blurry or smeared…
smearish? =P, but basicly for competition settings where we needed the best quality
fps we could get, so we would tweak cvars like that, adding nopicmip in the shader would
tell the engine to ignore what the cvar r_picmip is set at, and to display this image
at best quality, now this is what you might be going for… but if your using stock et textures
also, then i would recommend to remove the nopicmip and nomipmaps from the shaders
so your textures would match any r_picmip level.

your also using nomarks on shaders you have set to woodsteps… i would remove the
nomarks from those, but then again, maybe thats what you want.

just a small note, when you implicitmap -, or implicitmask -, the shader name must match
the texture name, unless you specificly add a path after the impicitmap or mask keyword.

now aside from all that, are there any typos? name mismatches? ie, you type in .script when
it should have been .shader or viseversa… ( i make that mistake a lot )


(redfox) #9

thank you very much! but do i have to compile my map again when i resized these images and changed the .shader?


(pazur) #10

No. You don’t need to recompile. Shaders are loaded while the map is loaded.


(redfox) #11

ty, but what about the MAIN textures then? why don’t they work?