Unclear water


(Uchronic) #1

Hello,

I’m currently trying to make unclear, cloudy, dirty water.

In my map (still beta), players are going in the underground of Paris. If you want to know more about it, click here
So far, the water was the classical “siwa water” which is much too clean for big city undergrounds. Look at this screenshot :

So first, I’ve changed the texture of the water, and I made a green-dirty texture :

But as it was to still, i added to the shader a “deformVertexes” option, to have “swirl” or “eddies” (not sure about these words :p).
It worked perfectly, and the water was more realistic.

But, inside the water, it’s very clear, too clear for a water that is supposed to be dirty. My “dirtywater” texture looked like a ceiling.

And I remembered the ChavoOne’s Venice map. There is canal, and when you’re inside it, there is a fog, that is really good.
So I made a fog brush, with less visibility than in Venice.
I let a little distance beetwen the surface of the water and the fog brush.

The result was the following :

At first, it seems perfect.
But when look carefully, you can see the 2 brushes (water and fog) :

And it’s getting even worse, when you’re inside the water :

You can see clearly the 2 different brushes, and it is very weird to see this lign of pure water.
:disgust:

So I tried 2 different solutions :
1st : I’ve reduced the distance between the 2 brushes so that they were almost at the level.
But, as the water was deformed, I had this kind of result :
Here (in another room), you have the water from outside (it seems good):

And here, you can see from inside the water :

The water, when it’s deformed, is going “inside” the fog brush and we have this effect. :bored:

2nd : To find another solution, i added to the shader of the fog a “deformVertexes” effect too ! But there are not synchronised. So I have the same effect than the precedent, except that we can see it not only from inside the water, but also from outside !


So here’s my question : Can I have a brush that is, at the same time, water and fog ? How can I have a realistic effect of dirty water ? :???:

I know one of the solution could be to delete the “deformVertexes” effect of the water (as in Venice), but I’d like to keep the 3 effects (deform, dirtywater texture, and fog inside the water) as this would be the best realistic effect instead of stepping back.

Thank you for your answers.


(carnage) #2

ime no expert but here is my gess

make a fog shader and aplly it to gives sides of your water brush
make a fog shader and give it a pass with the water texture on too. deform the vertices of this shader

apply this to the top of your brush

then ither make both shaders water (not sure if this will work) or duplicate your fog brush and give it the water nodraw texture


(]UBC[ McNite) #3

Well try it out… use 1 brush and give it surfaceparm fog and water at the same time.

What you could try too is: make a foggy water brush but give it no surface-brush (similiar to the water-nodraw common texture, only with surfaceparm fog) but without a texture that s on the outside of the brush. Then you should be able to put another brush with your surface texture all around the water and place its surface exactly at the height of the foggy-water-brush.

But its likely that you won’t get the perfect solution. I messed around with a very similiar problem and wasn’t able to get it working.


(Diego) #4

I wish I had looked for this post before working on this too. Looks like I came up with the same partial solution on my own.

I’m not deforming my vertexes so using 2 brushes is ok with me. I did get a shader with both water and Fog parameters to work, except the fog also affected the top surface of the water. This looked really dumb on a large body of water. I did try to make the 2 brushes flush with each other and then apply the polygonOffset parameter to my non-fog shader. But the result was the same as if I just used the water fog shader on only 1 brush.

nd by using 2 different shaders, the water surface looks kind of murky from above, but when you look at it from below, I have some nice caustic texture patterns visible.


(Uchronic) #5

Yes, this is the solution I had to choose too.
Nevertheless, it ain’t perfect.