Farplane White-out Question...

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

Moderator: Moderators

Post Reply
Franaticus Satanii
Colour Sergeant
Posts: 84
Joined: Tue Aug 19, 2003 5:38 pm
Location: Florida, USA

Farplane White-out Question...

Post by Franaticus Satanii »

I realise this question has been asked a thousand times before..I think I just spent 2 hours reading through all the threads after a large search response :shock:

Here is the question. In my script I added the farplane information, only in the script (no map additions) which looks like this:

Code: Select all

$world farplane 8000 
$world farplane_color (.333 .333 .329)
The results were god awful...I wanted a slight distance haze...I received a slight haze but 90% of my textures turned white until you were within just a few units of them. It was horrible!!

Is there a combination of procedures in both the map AND the script to prevent this whiting out of textures?

I found a thread by jv_map and tltrude (yes, I read all the way back to 2002) which explains it like this:
The fog is called "farplane" and you set the distance and color in worldspawn.

1. Select one of your skybox brushes.
2. Hit key N.
3. In the "Key:" box type farplane.
4. In the "Value:" box type in the longest distance (in units) found on your map. Example: 8000.
5. Hit enter.
6. Now type farplane_color in the key box.
7. In the value box type three numbers for the color. Example: 0.7 0.7 0.55 .
8. Hit enter and key N again on the keyboard.
9. Save your map.
Do I have to add this information in my map to all skybox elements (including my tree line); am I just fine with the script, ot both, or.....hell, I'm confused. There are so many different ways of accomplishing the same thing and the forums have them all.

Anyone help narrow down the option available based upon my scenario/problem?

Thanks.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

You don't have to add that information to any of your skybox brushes.
You simply need to be sure that the "worldspawn" entry is chosen in the entity window. It will be the very last entry in the list.

If you add your farplane in this manner, there is no need for a scripted farplane at all.

As far as your brushes turning white until you are next to them, that will happen if your brushes are very long. For some reason the "farplane" at the far distance of the brush translates itself through the whole brush. Simply use several brushes to get rid of this effect.

Someone may know of a better way, but I do not.

Hope this helps.

Kill Ya later!
Image
Franaticus Satanii
Colour Sergeant
Posts: 84
Joined: Tue Aug 19, 2003 5:38 pm
Location: Florida, USA

Post by Franaticus Satanii »

Here's a question that follows along with the first...what is the best way to keep the fog OUT OF my buildings? it populates everywhere and I just want it outside....is that possible?
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

Unless there's a way to use volumetric fog in mohaa the answer is no. I believe Mpowell had tried it before and used triggers to turn it on and off via script, but the problem was that if one player triggered the fog everybody else could see it happen.
User avatar
General_DisArray
Warrant Officer
Posts: 142
Joined: Tue Dec 17, 2002 4:17 am
Location: magnolia, texas

Post by General_DisArray »

to resolve this issue don't you make your farplane no shorter than your longest/widest/deepest building? say your longest building is 4500 units deep/wide, wouldn't you make the farplane no less than 4500? that is how i understand it.
Franaticus Satanii
Colour Sergeant
Posts: 84
Joined: Tue Aug 19, 2003 5:38 pm
Location: Florida, USA

Post by Franaticus Satanii »

I just wanted a little haze to my map. If the haze extends inside....i'll live with it.

I am a new mapper and this is probably getting more complicated than it needs to at this stage.

I really needed that damn "white-out" effect to go away. I have started breaking up some of the longer brushes to see if that helps.

Thanks to crunch for the initial response....and to pantera and gen_dis for the follow-up.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

OK, this is a rough explanation of how the farplane in this game works.

You specify a color, and a distance. Let's say you use 2048, with a color of (0 0 0). The fog will be black, and if a polygon is 2048 or more units away, it will not be rendered ( sort of different with models ). Of course, the polygons have to "fade to black" before they are just culled completely. There is a certain distance x, where the object begins to fade. If ANY part of the object is x units away, the whole object will begin to fade away. So now lets say you have a farplane of 2048, a farplane_color of (0 0 0), and you've got a huge area, like 8192x8192. Now you have a long brush 1536 units long. If you stand in the middle of the brush lengthwise, it will sort of look normal. However, if you stand at one END of the brush, the whole thing will look black. As you know, the game is built by triangles, not squares. So a simple rectangle 1536 unit wall can be split up into 2 triangles. Those triangles stretch from one end to another. In this case, the some ends of the triangles are at least x units away from the player, so the whole triangle will be colored darker, since it is "fading to black". This would in effect make the whole wall darker. If you split up the brush by 4, you would have brushes that are somewhere around 400 units long. Now if you stand next to one of these brushes, the brush itself will not look really "faded", but the ones further away will...

So basically, if you had a bunch of LOD Terrain at max detail spaced at 4096x4096, with a farplane of 2048, it would still look normal, because each of the triangles is individually colored based on the distance. So, yes, splitting up the longer brushes will sort of fix that "white out" effect.
Post Reply