floor fog
Moderator: Moderators
-
Hell_Soldier
- Sergeant
- Posts: 74
- Joined: Tue Aug 24, 2004 7:40 pm
floor fog
is there anything i can change my floor into (which is now on 'wolrdspawn' by default) so it wont produce fog?
-
Hell_Soldier
- Sergeant
- Posts: 74
- Joined: Tue Aug 24, 2004 7:40 pm
-
Hell_Soldier
- Sergeant
- Posts: 74
- Joined: Tue Aug 24, 2004 7:40 pm
farplane
I am having the same kind of problem. When you look north or south the grass gets that gray look. But when you face east or west, the gray is gone. I did notice that this problem is not there if you use LOD or patch mesh. But, it sure shows up using brushes.
So, what is it in the shader that is causing it?
Here are my settings:
"sunflarename" "none"
"sundirection" "-40 225 0"
"lghtmapdensity" "16"
"vis_derived" "1"
"ambientlight" "17.5 17 17"
"suncolor" "65.5 65 65"
Farplane is set in the script:
$world farplane 18000
$world farplane_color ".433 .445 .433" // was .6 .6 .65
$world farplane_cull 0
Could it be that setting farplane in the script, and not in the map, causes it?
One more thing, the playable area of the map is not in the center of the skybox, it is off to one side--the east side.
So, what is it in the shader that is causing it?
Here are my settings:
"sunflarename" "none"
"sundirection" "-40 225 0"
"lghtmapdensity" "16"
"vis_derived" "1"
"ambientlight" "17.5 17 17"
"suncolor" "65.5 65 65"
Farplane is set in the script:
$world farplane 18000
$world farplane_color ".433 .445 .433" // was .6 .6 .65
$world farplane_cull 0
Could it be that setting farplane in the script, and not in the map, causes it?
One more thing, the playable area of the map is not in the center of the skybox, it is off to one side--the east side.
Damn, it's been over a year since I used any stock textures. As I recall, it occurs on textures meant to be blending textures on mesh, although I remember there was something peculiar about textures with alphashadow, too. Look for blendfunc or alpha shadow in the shader.
There is one other thing that will cause this... the sky texture.
There is one other thing that will cause this... the sky texture.
-
Hell_Soldier
- Sergeant
- Posts: 74
- Joined: Tue Aug 24, 2004 7:40 pm
Re: farplane
what do u mean?tltrude wrote: One more thing, the playable area of the map is not in the center of the skybox, it is off to one side--the east side.
-
Hell_Soldier
- Sergeant
- Posts: 74
- Joined: Tue Aug 24, 2004 7:40 pm
Farplane
He means he added the farplane values to the map and not in the script as I did--guess that question is answered.
By "off to one side" I mean that the sybox is large, but the area with the terrain is small and not in the center. I use the extra skybox room to light objects duing the compile. Those objects move durring the game. That should not matter because the farplane is drawn at the same distance from each player.
Here is an example of the gray grass. The grass near the (moving) streambed is on a patch mesh (does not scroll) and the scrolling grass textures around it are on brushes. The difference is not to great at that angle, but if I look north it is very gray.

The sky texture is a rip off from the COD demo. Here is the shader for the scrolling grass. But, it to does not turn gray when applied to a patch.
By "off to one side" I mean that the sybox is large, but the area with the terrain is small and not in the center. I use the extra skybox room to light objects duing the compile. Those objects move durring the game. That should not matter because the farplane is drawn at the same distance from each player.
Here is an example of the gray grass. The grass near the (moving) streambed is on a patch mesh (does not scroll) and the scrolling grass textures around it are on brushes. The difference is not to great at that angle, but if I look north it is very gray.

The sky texture is a rip off from the COD demo. Here is the shader for the scrolling grass. But, it to does not turn gray when applied to a patch.
Code: Select all
textures/moving_train/m_nu_grass_set2a_Sp
{
qer_keyword mgrass
surfaceparm grass
surfaceparm nomarks
{
map textures/moving_train/m_nu_grass_set2a_Sp.jpg
depthWrite
tcMod scroll 3 0
tcMod scale 1 1
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
I remember this kind of fog thing a while back.
Don't ask me why, but for some reason on a large brush, the fog at the far end of the farplane translates itself to the near end of the brush.
For that reason, I try to make any brushes in sections. (This will happen on Patch Meshes as well, if they are long enough).
If my farplane is 10,000, I won't have any brush longer than 1000. (Brush-terrain or road in particular)
The closer the length of the brush to the farplane distance, the more "fog" appears on the brush itself.
tltrude's gray is very light because of his 18,000 farplane.
Hell Soldier's appears worse because his farplane is shorter.
I have no idea what part of a textures shader could be adjusted to prevent the effect., but I am not sure that it has to do with the shader.
Don't ask me why, but for some reason on a large brush, the fog at the far end of the farplane translates itself to the near end of the brush.
For that reason, I try to make any brushes in sections. (This will happen on Patch Meshes as well, if they are long enough).
If my farplane is 10,000, I won't have any brush longer than 1000. (Brush-terrain or road in particular)
The closer the length of the brush to the farplane distance, the more "fog" appears on the brush itself.
tltrude's gray is very light because of his 18,000 farplane.
Hell Soldier's appears worse because his farplane is shorter.
I have no idea what part of a textures shader could be adjusted to prevent the effect., but I am not sure that it has to do with the shader.
18000
I only set the farplane to 18000 because of this problem. Here is another screenshot when the terrain was all patch mesh and the sky was caulksky--light compile was skipped too. The farplane was at 8400--which is about were it should be.

As you can see, there is no grass fog looking north--other than the normal farplane effect. The patch mesh brushes ran the entire length of the map--as do my current solid brushes. I changed them all to solid brushes because of big black shadows on some of the patches.
Here is what it looks like now (with farplane at 8400). Notice that the metal texture on the train roof does not have the same problem as the grass texture.

Cutting up all the terrian brushes seems a bit drastic! I will try "northyaw 90" in worldspawn to see if that helps.

As you can see, there is no grass fog looking north--other than the normal farplane effect. The patch mesh brushes ran the entire length of the map--as do my current solid brushes. I changed them all to solid brushes because of big black shadows on some of the patches.
Here is what it looks like now (with farplane at 8400). Notice that the metal texture on the train roof does not have the same problem as the grass texture.

Cutting up all the terrian brushes seems a bit drastic! I will try "northyaw 90" in worldspawn to see if that helps.

