Page 1 of 1

Clampmap Problems. *ANSWERED*

Posted: Fri Jan 08, 2010 3:29 pm
by Pat Howard
I have a jet shader with two blends that swirl and fade in and out:

Code: Select all

textures/phtourney1/celjet
{
	qer_editorimage textures/phtourney1/jet_ring.tga
	surfaceparm nomarks
	{
		map textures/phtourney1/jet_ring.tga
		rgbGen identity
	}
	{
		map $lightmap 
		blendfunc filter
		rgbGen identity
		tcGen lightmap 
	}
	{
		clampmap textures/phtourney1/jet_blend.tga
		blendfunc blend
		tcMod rotate 2
		alphaFunc GE128
	}
	{
		clampmap textures/phtourney1/jet_blend_2.tga
		blendfunc add
		rgbGen wave triangle 0 1.2 0 0.075 
		tcMod rotate 7
		alphaFunc GE128
	}
}
The problem is when I repeat the jet over a face only one jet shows the blends.

Image

I'm pretty sure it has something to do with the clampmap on the blends, but when I take it out it's even worse. The blends rotate in circles around the metal ring rather than spin from the origin properly.

Anyone know a way around this? I tested the stock bouncers and noticed they have the same problem.

Thanks,
-pat

Re: Shader help needed.

Posted: Fri Jan 08, 2010 3:49 pm
by obsidian
Clampmap only works once per face, it maps the texture across the single face. You can't use it on tiling textures. Split up the brushwork.

Re: Shader help needed.

Posted: Fri Jan 08, 2010 4:01 pm
by Pat Howard
This is not ideal since I'm making a 20 brush map, but I was able to shave off the top half a little to make a new face. Messed up the large grid alignments a bit, but good enough I guess.

Thanks for your help!