PDA

View Full Version : Need help on Fog and Distancecull


Silverhawk2000
02-24-2003, 09:05 AM
Hello,

I have a big request for help from the experts out there.

The mysteries of Fog and Distancecull are either a closely guarded secret (just kidding, most people are happy to share any information that they have), or very few people have been able to implement it successfully.

For the past few days I have been trying to include Fog into my Multiplayer (MP) map with no success.
From researching posts and websites, I have learned the following so far.

Regarding Fog…
------------------------------------------------------------------------------------
From within the worldspawn entity there apparently is a way to set a global fog effect.

The key is either _fog (or just the word) fog,
The value is the texture path to the fog effect (I think) something like textures/somewhere/fog

I have tried to add one of the Fog effects that we see in the game (such as in the swamp), and apparently it is possible to achieve in a MP Map. No success however.

There is also a way to implement Fog using a brush (to simulate a low-lying ground Fog) but that is not what I am looking for.

There is also sporadic information about creating something called a FogHull, but I don’t know if it is necessary or if anyone has had any success getting it working in Jedi Knight II: Jedi Outcast.

Regarding Distancecull…
------------------------------------------------------------------------------------
Distancecull can be used, apparently, to prevent the game engine from drawing polygons beyond a certain distance (apparently specified in game units – equivalent to GTKRadient units?) This is useful for wide open maps where the display of many polygons would adversely affect the Frame Rate (FPS). Distance cull should not be used alone as the ‘chopped off’ line of sight creates a Hall of Mirrors (HOM) effect in the distance. However, when combined with Fog it is useful. For example you set the Distancecull to 1000 lets say, and the Fog to 800. The Fog hides the fact that nothing is being drawn after the Distancecull value.

From within the worldspawn entity I tried the key
_distancecull (and just the word) distancull
and 200 for example as a value.

No success. Nothing is culled, every polygon is drawn as far as the eye can see…

--------------------------------------------------------------------------------

If anyone can tell me exactly what parameters I need to include in my worldspawn to get fog and distancecull working I would very much appreciate it. Even better, if you can create a sample hollow box with the fog effect (and/or distancecull) and send me the .MAP I will sing your praises by inscribing your name into titanium with my Light Saber. :)

Any help anyone can give is greatly appreciated. Thanks guys.

My e-mail is jedi.knight@sympatico.ca

:cool:

Tigris
02-24-2003, 01:25 PM
Yeah, would be nice to know (if we get this anwsered I'll say we should make this a sticky!).

irishpump
02-24-2003, 01:54 PM
Yeah me too i typed in distancecull and the units in worldspawn and i came up with nothing

Leslie Judge
02-24-2003, 02:25 PM
I made two test maps.

DC is the distancecull test map. Just start to walk straight towards the opposit corner and watch the box appear. The left half of the box is detail brush, the right side is structural. Notice that the walls are always visible, because they are made out of 1 brush only, so their surface has parts within the distancecull range.

DCWF is the distancecull with fog test map. It is the same map as DC, just added the "fog" key to the worldspawn. I used textures/fogs/narshadaa2 shader just because it has a good visibility range for the test map.

I tested both the maps in SP and MP, however they were saved with the SP mapping mode in Radiant. Both of them worked well in SP AND MP for me.

I can't put the pk3 onto my website, so I can send it by email. If someone wants, he/she can publish it on his/her site.

irishpump
02-24-2003, 03:37 PM
oooo id be interested because my map is huge and only gettin' bigger. My email is irishpump@cableone.net and i have a website that is currently empty but i can put these up if need be.

wedge2211
02-24-2003, 03:54 PM
AKPiggot is using global fog in his Party Crasher level...look at his WIP thread.

My next map is using a global fog, but not a distancecull. I can tell you that you are correct, the key is "_fog" and the value should be "textures/fogs/fog1" or whatever fog you like.

Leslie Judge
02-24-2003, 05:34 PM
Hmm...

In my test maps I used "fog" not "_fog" and it works. ;)

Tigris
02-24-2003, 07:11 PM
With your permission I could load those two maps up on my webspace, Leslie.

Anyway- Me wanna look at them too :)

Just send it at the address in my sig!

Silverhawk2000
02-24-2003, 09:03 PM
Leslie Judge you are Awesome! :cool:

I just tried both examples and they work like a charm. :cool:

:slsaber: Bzzzzzzsssht! Consider your name enscribed in the Titanium Wall of Fame for all time.
Thanks so much for addressing this issue so quickly. You are a mapping God!
A great asset to the mapping community.

Just one more thing to clarify. You said that the sample maps were saved with the SP mapping mode but play fine in MP (Both of them worked well in SP AND MP). Are there any adverse (side) effects that occur when you save your multiplayer map as single?
Just wondering if things like the placement of certain entities would dissapear when saved in SP.

Tigris or irishpump, please follow up with a post here to let the community know if these sample maps are available for download at your site(s). Thanks for volunteering to put these files up.

Tigris, thanks for the vote to make this post a Sticky. That would be great if it happens.

irishpump, good luck with your huge map.

These are exactly the kind of thing we need to help people over those hurdles that can take hours of people's time as they try to figure it out.

Again, Thank you ever so much Leslie for sharing your knowledge.

:cool:

wedge2211
02-24-2003, 09:09 PM
The only difference between a SP map (.bsp) file and a MP map file is the entities. Some entites are defined only in single player, for example, the NPCs, while some are defined only in MP, like flags and holocrons and such. If you use the SP entity defs to make a MP map, not all of your entities will appear/function properly in game, and vice versa. Generally, just make MP maps with the MP defs and SP maps with the SP defs. :)

irishpump
02-24-2003, 10:00 PM
:( I was unable to get it. Leslie sent it to me in email but it was hotmail he/she was sending it from so my cableone account rejected it. So i havent gotten a chance to receive the files. Can anyone send them to me that doesnt have yahoo or hotmail. People who have yahoo or hotmail seem to have problems sending files to me :(

irishpump@cableone.net

irishpump
02-25-2003, 01:28 AM
WOOHOO !!! Ok i got it and ive posted it on my dead site. So go here for Leslie Judge's distancecull and fog helpful pk3 file:

http://myweb.cableone.net/irishpump/default.htm

I will leave the file up for about 2 weeks

yangyan
02-25-2003, 02:39 AM
lol wtf you talking about? well ttyl (I'm no experienced mapper, more of a Average)