Go Back   Remedy Community Forums > Games > Max Payne

Reply
 
Thread Tools
Old 06-16-2009, 12:28 PM   #1
Halloween4

Halloween4's Avatar
MP1 - Fogging Properties

Hi all,

I was wondering if anyone knows what the Fogging Properties in the levels.txt for Max Payne 1 are used for, & how you would use them.

They look something like this:

Fogging = TRUE;
FogColor = ( 24, 24, 24 );
FogStart = 5.0;
FogEnd = 100.0;


I always thought that these settings had something to do with adjusting the distance at what you could see the edges of a map , i.e you could adjust these settings so that you could hide the edges of a map at shorter distances by Fogging the view.

However, when I adjust these Properties i can see no difference.

I'd be greatfull for any clues any one ?.......Cheers.
Halloween4 is offline   Reply With Quote
Old 06-16-2009, 03:13 PM   #2
Maddieman

Maddieman's Avatar
Re: MP1 - Fogging Properties

Quote:
GM_ChangeFog ( 0xRRGGBB, float frontPlane, float backPlane, float time );

Changes the fog color (no capital characters, color is given in hex), front plane distance, back plane distance and how fast the fog should change. NOTE: Don't use continuous animated fogs, since the renderer needs to update all scene materials every frame when the fog color is changing.

All it does is set the fog at the start of the level. If you use GM_ChangeFog in your level, the fog will change to that instead.

It's basically the same as GM_changeFog (above), except that instead of hex, fog colour is given as value between 0-255. For example: (255,255,255) is the same as 0xFFFFFF. Backplane (Fog end) controls the overall distance (values between 150-300 will have next to no fog; values between 50-150 are about normal; anything less is what I call "Turok mode" ^_^). Frontplane (Fog start) is less obvious, and I tend to use values between 5-50.

The best thing to do is load a level, open the console, and use GM_ChangeFog and experiment. Once you find a fog setting you like, write it down, convert the hex colours to integer (windows calculator), and use those values (or just ignore the levels.txt fog, and set the fog inside MaxED with GM_ChangeFog).
Maddieman is offline   Reply With Quote
Old 06-16-2009, 03:53 PM   #3
Halloween4

Halloween4's Avatar
Re: MP1 - Fogging Properties

Thanks for your help but I've managed to work it out for myself now.

However, the Fogging process dosen't really give me the results that I was looking for, i.e I was hopeing that it would help me hide the edges of a couple of my external maps a bit more as the maps are more or less an open fields, but instead all this process seems to do is hide distant objects & not map edges.

Do you know of any other way I could achieve what i'm after ?

I was looking at the FOV command in the globalconfig.txt file as a way to achieve but as the command is in the globalconfig.txt it does what it says on the box, i.e it has a Global affect on all maps of the game & not just one, & I only want to fog the edges of a couple of my maps.....
Last edited by Halloween4; 06-18-2009 at 02:36 PM.
Halloween4 is offline   Reply With Quote
Old 06-17-2009, 01:38 PM   #4
Maddieman

Maddieman's Avatar
Re: MP1 - Fogging Properties

Quote:
but instead all this process seems to do is hide distant objects & not map edges.
Can you post a screenshot?

If you're using a skybox texture for the ceilings, you might want to try changing them to just a regular texture map (plain colours work well), otherwise you might get a silhouette effect on the horizon (the fog hides geometery, but not the sky). Or you could try changing the fog colour to that of the sky, so that it blends in more naturally.
Maddieman is offline   Reply With Quote
Old 06-18-2009, 12:16 PM   #5
Halloween4

Halloween4's Avatar
Re: MP1 - Fogging Properties

I don't think i've explained put my problem too clearly, let me go over it more fully.

First of all I should make it clear that this is not an Internal map, & the problem i'm having is with a External map that is more or less just a field with a few trees, shrubs & a couple of hills, plus a small house ( below ), & a barn thrown in for good measure.

Here'in lies the problem, because unlike other outside maps that are usually set around city & or towns, I can not use buildings to obscure the edges of this map as there is only 2 small ones avalible, & i'm also limited to the ammount of map edge that I can hide with trees ( which is hard to do at the best of times because of the gaps in between trees ), & a couple of hills.

Example:



The above picture might look pretty O.K but that's only because of the angle that the screenshot has been taken from, because in fact the line that separates the land & sky in this screenshot is in fact the edge of the map & if I'd have taken the screenshot from a higher angle the maps edge would have become all the more obvious.

One way arround this would be perhaps to make the map so big that it extends past the FOV set in the globalconfig.txt file so that the maps edge would get blurred out beyond the FOV distance, but a map this big would probably put high demands on the game & course bad lag, so I am at a loss at what I can do about this problem.

Perhaps I & the players of my mod are just going to accept that you can see the edge of the map on a couple of my outside level's which is not too bad as 90% of my mod is set internally. Other then that I can not see any way of hiding the edges of maps that are basically 75% like an emty field, & that are ment to be that way......
Last edited by Halloween4; 06-18-2009 at 02:37 PM.
Halloween4 is offline   Reply With Quote
Old 06-18-2009, 01:13 PM   #6
Maddieman

Maddieman's Avatar
Re: MP1 - Fogging Properties

Humour me a minute.... I've created some extreme (and ugly) examples to illustrate what I was getting at before.

With the skybox texture enabled, the the buildings and other objects (like the helicopter) are silhouetted by the fog & worldsphere. However, if you replace the skybox texture with a more solid material (No Collisions, No Decals, etc), look what happens... the level boundaries are fogged out as well.

Now, you shouldn't have to use as much fog as in those examples (0x0,5,30,0), and you'll need to experiment with the settings and colours a bit (the Silent Hill look might not fit your mod); but it does work. The only downside is that you're going to lose that nice sunset worldsphere...

Alternatively (or additionally), create a huge wall/plane that surrounds your map, and texture it with photos of hills, trees -- anything to conceal the horizon & level boundaries. As the wall will be in the distance (don't allow the player to get close to it), they shouldn't be able to tell that it's 2D.

You can also layer several planes to create a fake sense of perspective -- in my final attachment, I'm using this trick to simulate a large crowd of agent smiths, which I couldn't include otherwise. I doubt it's going to fool anyone, but it should get the idea across without wasting a lot of memory on models. You could use the same idea to a better effect by creating a forest or wood in the distance, without having to model loads of trees.
Attached Thumbnails
Click image for larger version

Name:	fog_example1.jpg
Views:	246
Size:	48.8 KB
ID:	1103   Click image for larger version

Name:	fog_example2.jpg
Views:	245
Size:	51.5 KB
ID:	1104   Click image for larger version

Name:	crowd_example.jpg
Views:	235
Size:	256.9 KB
ID:	1105  
Maddieman is offline   Reply With Quote
Old 06-18-2009, 01:45 PM   #7
Halloween4

Halloween4's Avatar
Re: MP1 - Fogging Properties

Yea,

I don't really want to go with your first suggestion as I want my sky to look like sky, & I think that this fake sky looks worse then seeing the edge of the map itself.

However, your suggestion about using wall/plane is interesting, but there's only one problem there & that is that I accidently deleted a LVL file to one of the maps that I am talking about, & although the map was finished before I lost the LVL file ( & I still have the finished ldb & AI files to the map ), this does however mean that I am no longer able to edit this map internally, & that is why I was looking into the Fogging or FOV methods to solve the problem for this particular map as these methods can be ajusted externally away from the map itself, although your wall/plane suggestion will be something I could look into with the other map/maps.

Saying that I am in fact no stranger to the use of wall/planes myself but not within the Max Payne engine, but when making maps for Microsoft Train Simulator, but it just didn't occur to me to use them here also.
.
Last edited by Halloween4; 06-18-2009 at 02:41 PM.
Halloween4 is offline   Reply With Quote
Old 06-18-2009, 01:57 PM   #8
Maddieman

Maddieman's Avatar
Re: MP1 - Fogging Properties

Ah, now you tell me.

Hmm.. If you can't edit the map, then neither method will work. All FOV does is change the camera lens to either telephoto or wideangle (i.e. fisheye). Max Payne doesn't do depth of field blurring, so you couldn't hide it either way.

I think you're either going to have to settle for it, or rebuild the map -- depends how important it is. For what it's worth, the outdoor shots in the trailer look fine, IMO.

Quote:
I don't really want to go with your first suggestion as I want my sky to look like sky, & I think that this fake sky look, looks worse then seeing the edge of the map itself.
Well bear in mind that those were extreme examples to illustrate the effect -- if you set the fog backplane to about 150, and changed the colour to light gray-blue it would look better (sort of overcast look). But yeah, the best place to use fog is in night time maps where it simulates darkness. Check out some of Froz's mods (Town of eternal night, and Psychopath's Diary), both use fog to hide the map boundaries effectively.
Maddieman is offline   Reply With Quote
Old 06-18-2009, 02:22 PM   #9
Halloween4

Halloween4's Avatar
Re: MP1 - Fogging Properties

Quote:
Originally Posted by Maddieman View Post
I think you're either going to have to settle for it, or rebuild the map -- depends how important it is. For what it's worth, the outdoor shots in the trailer look fine, IMO.
Well I certainly am not going to redo the map as you yourself will know how long mapping & scripting can take, & having to rebuild & rescript an entire map is enough to make even the hardiest of modders want to give it up on a project entirely...lol

As for the map not looking too bad in my trailer, well camera shots in trailers are in most part taken with a loose camera so to get the best possible shot as you are probably well aware, so in this case the shots have been taken as to not show the edges of the map as much as possible, but the edges of the map become all too obvious when in game as you can walk straight upto them.

My only consolation here is that the map in question is not part of the main game, but is in fact the map for the new tutorial level that I made for this mod, which was entirely nessarsary as many aspects of my mod play some what differently to the original Max Payne game.

So do you just think i'm just being over fussy here seeing that this is only the map to the Tutorial level ?
.
Last edited by Halloween4; 06-18-2009 at 02:46 PM.
Halloween4 is offline   Reply With Quote
Old 06-18-2009, 02:56 PM   #10
Maddieman

Maddieman's Avatar
Re: MP1 - Fogging Properties

Doesn't sound like you have an alternative, to be frank. What else can you do?

I've included half-finished maps in my mods before and no one seemed to complain too much -- as long as the main levels are decent, don't worry about it too much.
Maddieman is offline   Reply With Quote
Old 06-18-2009, 03:41 PM   #11
Halloween4

Halloween4's Avatar
Re: MP1 - Fogging Properties

Quote:
Originally Posted by Maddieman View Post
I've included half-finished maps in my mods before and no one seemed to complain too much -- as long as the main levels are decent, don't worry about it too much.
I must stress that this level is not half finished, it is in fact entirely finished apart from the player being able to see the edges of the map. Which was an after thought as I didn't think i'd be able to hide them anyway being that the map is an open field, as mentioned above.
Halloween4 is offline   Reply With Quote
Old 06-19-2009, 07:58 AM   #12
Maddieman

Maddieman's Avatar
Re: MP1 - Fogging Properties

Then I doubt you've got anything to worry about it.
Maddieman is offline   Reply With Quote
Old 07-26-2009, 09:45 PM   #13
satan

satan's Avatar
Re: MP1 - Fogging Properties

I think the best possible way out is to have a fog with appropriate color and then try making the skybox in such a manner that it's partially foggy, especially having low height fog which you see in greater distance. This setup usually syncs pretty well.

You might check out the skybox I made for MI:New Dawn, where I tried to achieve something like that. I took the basic funda from the official skyboxes which animates, and then expand a bit on it. Even in most official non-animated skyboxes you'll find that the horizon is always foggy, either less, or more. This helps the skybox sync nicely with the mild fog you'll have. Also why not make a terrain in the skybox only, making people feel it's an open area, but can't reach it?
satan is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:22 PM.


Copyright ©1995 - 2014, Remedy Entertainment, Ltd. All Rights Reserved.
Ideas and messages posted here become property of Remedy Entertainment, Ltd.

Community powered by vBulletin®. Copyright ©2000 - 2014, Jelsoft Enterprises, Ltd.