floor fog

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

floor fog

Post by Hell_Soldier »

is there anything i can change my floor into (which is now on 'wolrdspawn' by default) so it wont produce fog?
Balr14
Colonel
Posts: 450
Joined: Sat Aug 03, 2002 4:01 am
Location: Germantown, WI, USA

Post by Balr14 »

Your floor isn't worldspawn and it isn't producing fog, unless you used a fog texture. No brush can be worldspawn. It's a property associated with the map, as a whole. If you have fog indoors and didn't use a fog texture for the floor, your farplane distance is to short.
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

Post by Hell_Soldier »

i do fog using the editor entity manager, when im in the game my world floor (not indoor), which is grassy, got fog stuck to it. which means in some angles it turns gray (not completely)
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

Post by Hell_Soldier »

here, i brought some pics for u to see.
plz dont mind the fog color.

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

taht looks to me liek an ambient light prob. tone that down a bit and go for more suncolor stuff.
Balr14
Colonel
Posts: 450
Joined: Sat Aug 03, 2002 4:01 am
Location: Germantown, WI, USA

Post by Balr14 »

That's the properties of the texture you choose. Change the texture or the lightmap.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

farplane

Post by tltrude »

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.
Tom Trude,

Image
Balr14
Colonel
Posts: 450
Joined: Sat Aug 03, 2002 4:01 am
Location: Germantown, WI, USA

Post by Balr14 »

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.
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

Re: farplane

Post by Hell_Soldier »

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.
what do u mean?
Hell_Soldier
Sergeant
Posts: 74
Joined: Tue Aug 24, 2004 7:40 pm

Post by Hell_Soldier »

i created the fog using the editor, not the script
Balr14
Colonel
Posts: 450
Joined: Sat Aug 03, 2002 4:01 am
Location: Germantown, WI, USA

Post by Balr14 »

How?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Farplane

Post by tltrude »

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.

Image

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 
	} 
} 
Tom Trude,

Image
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

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.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

18000

Post by tltrude »

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.

Image

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.

Image

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

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

um. how will that help.?

that'd just change the compass heading. you'll have to chop chop those brushes.
Post Reply