Need some shader help..


(SteelRat) #1

I am trying to make some dirty water, but it keeps being too bright.
What value or values do I need to change to make it be less bright?

Here is a screenshot (gamma adjusted), as you can see the water is too bright compared to the rest of the environment.

Here is my shader (yes I have borrowed parts of it since I am not very good with shaders)


textures/sewers/water01
{
	nocompress
	qer_editorimage textures/sewers/water01.tga
	qer_trans .5
	q3map_globaltexture
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm water
	surfaceparm nomarks
	cull disable
	nopicmip
	nofog

	waterfogvars ( 0.51 0.53 0.55 ) 0.2
		{ 
		fog on
		map textures/sewers/water01.tga
		blendFunc blend
		alphaFunc GE128
		depthWrite
		rgbgen identity
		tcmod scale 0.5 0.5
		tcmod scroll -.02 .001
	}
	
	{ 
		fog on
		map textures/liquids_sd/seawall_ripple1.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sin 0.3 0.02 0 0.25 
		tcmod scale 0.01 0.01
		tcmod scroll -.001 -.0002
	}
	
	{ 
		fog on
		map textures/liquids_sd/seawall_ripple1.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sin 0.1 0.03 0 0.4
		tcmod scale 1 1
		tcmod scroll -.005 -.001
	}
	{ 
		fog on
		map textures/sewers/sewers_shimshim.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sin 0.4 0.02 0 0.3
		tcmod transform 0 1.5 1 1.5 2 1
		tcmod scroll .005 -.001
	}
}

Any advice would be highly apprechiated!

Cheers,
SteelRat.


(Mr_Tickles) #2

Ummm… I have to run as i’m late… but just try putting in GT0 instead of GE128.
and I think you generally should put the fog in a different brush…


(SteelRat) #3

Thanks.
I removed the fog stuff and added GTO and now it is too dark :stuck_out_tongue:


(SteelRat) #4

Got it like I want it now:

:smiley:


(Mr_Tickles) #5

Good good, glad to hear it’s working :slight_smile:
Looks nice, are you going to put any rats in that water? :wink:


(SteelRat) #6

Hmm…would be nice to have some bot support in ET :wink:
I think I will have to settle for rat sounds…

BTW - Here is the shader I ended up using

textures/sewers/water01
{
	nocompress
	qer_editorimage textures/sewers/water01.tga
	qer_trans .5
	q3map_globaltexture
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm water
	surfaceparm nomarks
	cull disable
	nopicmip
	nofog

	waterfogvars ( 0.51 0.53 0.55 ) 0.2
		{ 
		map textures/sewers/ripple_water.tga
		blendFunc blend
		alphaFunc GTO
		depthWrite
		rgbgen identity
		tcmod scale 0.5 0.5
		tcmod scroll -.005 .001
	}
	{
      fog on
      map textures/sewers/water01.tga
      blendFunc GL_ONE GL_ONE
      rgbGen wave sin 0.3 0.02 0 0.25
      tcmod scale 0.01 0.01
      tcmod scroll -.001 -.002
   	}
   
	{
      fog on
      map textures/sewers/sewers_shimshim.tga
      blendFunc GL_ONE GL_ONE
      rgbGen wave sin 0.4 0.02 0 0.3
      tcmod transform 0 1.5 1 1.5 2 1
      tcmod scroll .006 -.002
	} 
}


(Mr_Tickles) #7

Ermm… it should be GT0 not GTO as in the number “zero” not the letter “O”… There should be a number e.g. “Greater Than 0”, “Greater Than or Equal to 128” or “Less Than 128”
Well, I suppose if you have the fog working and it’s all ok, there’s not much point in changing it :stuck_out_tongue:

You could do some very basic rats if you wanted by using an alpha channel, a picture of a rat, a very small gap for it to move between so it doesn’t really have to do much “thinking” or interaction and this web page as a guide :wink:
Don’t forget the scroll and turb :wink:
I have tried some leaves, but also used them on a rotating brush which gives you a more random, if you could call it that, appearance.
Lol, I suppose you could even apply the shader to a patch if you wanted to give it a path… I suppose you could just have a rat coming from a hole and scrurrying into another somewhere :S up to you… may be a bit too much effort though :stuck_out_tongue:


(Gringo Starr) #8

You could make a map of a rat and compile it into an ASE model. It would be larger than life in the .map (say 10x) since you’re limited by the grid. Then, have someone change the ASE model into an MD3 for you (I’ve tried, but you may need 3dsMax to do it right). Then, attach it to a prop so it can inflict damage and be shot. :slight_smile: I have no clue if the below example would work, but it might be worth trying it. lol


(Mr_Tickles) #9

LOL! I’d love to see that… much better than the shader way :wink:
(P.S. I don’t think gibs works… I tried it once but it didn’t seem to.)


(Gringo Starr) #10

I know you can make a func_explosive put out gibs, but you’re probably right since it’s not listed there. :slight_smile:


(ratty redemption) #11

hee hee, I`d like to see this if you can get the rat model working, great idea guys… but you knew I would say that :wink: