Page 1 of 1

Liquid shader acts solid

Posted: Wed Jun 22, 2011 5:51 am
by EmeraldTiger
For reasons I can`t comprehend my slick new "yellow" slime shader acts like it`s solid, rather than a liquid you can swim through. In the shader file I defined "nonsolid" and "slime", but for some reason q3map2 totally disregards the surfaceparms and treats the shader as a solid texture.

Here`s the shader in question:
textures/pastex/yellowslime

Code: Select all

{
	qer_editorimage textures/pastex/yellow_slime.tga
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm slime
	surfaceparm trans
	cull disable
	deformVertexes wave 100 sin 1 1 1 0.1 
	tessSize 64
	qer_trans 0.5
	q3map_surfacelight 450
	q3map_globaltexture
	{
		map textures/pastex/yellow_slime.tga
		tcMod turb 0 0.025 0 0.25
	}
	{
		map textures/effects/envmapligh.tga
		blendfunc add
		tcMod scroll 0.25 -0.28
		tcGen environment 
	}
}

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 6:02 am
by dONKEY
Are you applying the slime shader onto a nodraw brush?
Sometimes that can cause the issue you describe.

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 6:05 am
by EmeraldTiger
The slime shader is applied to all surfaces of the brush.

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 9:39 am
by subst
I don't think there's a problem with that shader, I tried it and it worked properly as slime (copied the code, only changing the paths). You could try to make a new boxmap and try it in there. If it works there could be some problem in the original map, if not there must be something else in the shader file or such i guess... Or something silly like forgotten clip brush, made invisible in editor by view-filter :p

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 9:59 am
by EmeraldTiger
I put the brush with the shader in a plain, unmodified box map as a means of testing it, I receive the same results. That`s odd though, how it has problems on some set-ups but not on others.

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 10:11 am
by subst
That's pretty weird :p And what if you make a new .shader file, containing only the slime script and nothing else.

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 11:11 am
by Eraser
Are you sure the shader is tied to the texture you select in the texture window? Is the texture displayed with a white border around it (in the texture selection window)? If that's not the case then you're simply selecting the texture and not the shader. Is the shader file correctly referenced in shaderlist.txt?

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 2:48 pm
by obsidian
Eraser wrote:Is the shader file correctly referenced in shaderlist.txt?
Probably this.

Re: Liquid shader acts solid

Posted: Wed Jun 22, 2011 9:46 pm
by EmeraldTiger
Ahh, pasctf4.shader wasn`t in the shaderlist.txt file. I put it in and sure enough it started working. Thank you.

Strange thing though is that even though the surfaceparms didn`t work, the special visual effects I applied did. Not sure why it does that.

Re: Liquid shader acts solid

Posted: Thu Jun 23, 2011 2:07 am
by obsidian
Q3Map2 reads shaderlist.txt to find the right shaders. Surfaceparms are only read by Q3Map2.

Q3 reads all the shaders. Scrolling and other surface effects are only read by Q3.

Without the shaderlist.txt, Q3Map2 couldn't find your shaders, but Q3 could still read them. Since the surfaceparms aren't compiled into the .bsp, they are treated as normal surfaces.