Globalfog and skybox

General mapping discussions
cec.
Posts: 33
Joined: Sat Aug 20, 2011 11:01 am
Location: Germany

Globalfog and skybox

Post by cec. »

Hey,
I didn't know where to put this question, I hope it's the right section. It's an HD related question about globalfog.
Look at this picture: http://dl.dropbox.com/u/700957/Urban%20Terror/cargoship/shot0672.jpg
As you can see, it doesn't look good. The fog seems to stop somewhere near the brushwork and doesn't affect the sky. You don't notice it in day time maps but in night maps its obvious that there is something wrong.
How to solve the problem? At the moment, the skybox is tightly around the ship so that you can't see any water expect for the front/end of the ship. I thought that I could use the _skybox entity for the water. But I don't think this will solve the problem. The water will blend with the horizon and disappear in the distance but just right above, the moon shines in full brightness. (Well, I could test it if I'm wrong, but I don't think so/I can't compile at the moment – old Mac/Windows story...)
There has to be a solution because in Frankie's video the fog works perfectly. Is there something I'm doing wrong or is there something that I don't know about the globaflog key?

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Globalfog and skybox

Post by Rayne »

It's not stopping near the brushwork it's fading out, it's working as it should.
It can't affect the sky cause skies are infinitely far. And globalfog is calculated by taking in account the distance of the player from the object.
Globalfog looks better if you use bloom, without bloom it looks bland.
Only way to make it look like it's affecting the sky is by using a farbox. Or alternatively a sky entity.

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Globalfog and skybox

Post by Delirium »

Rayne wrote:Only way to make it look like it's affecting the sky is by using a farbox. Or alternatively a sky entity.

You'd need to use a skybox entity, afaik a farbox wont do it, seeming hes using a farbox there. you'd need to push the Geo into a skyportal then make sure it is rendered into the depthfunc so _NOT_ using blendfunc blend

If you look at cascade, the terrain Geo is part of the skybox and so are the far 2d mountains, the 2d mountains aren't rendered into the depthfunc (by using blendfunc blend) so theyre not affected by globalfog, however the mountains aren't blended at all therefore are rendered into depthfunc which means globalfog is rendered infront of them.

As Rayne said, farbox/cloudheight/nearbox(lol) are all infinate, the only way for them to be affected by globalfog is to make some model or something.
I got annoyed with this in Oaks and Derelict so I removed globalfog, but I managed to fix it :)
Image

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Globalfog and skybox

Post by Rayne »

Right, i forgot farbox is infinite too. Hey can he add a patch mesh, shape it to encapsulate the map and then put a fog shader on it?
You think globalfog would react to the patch?

User avatar
johnnyenglish
Space cake
Posts: 898
Joined: Wed Aug 17, 2011 9:23 am
Location: Nottingham, England

Re: Globalfog and skybox

Post by johnnyenglish »

You could just paint more fog onto the skybox images or create a flat grey skybox to match the fog. When it's foggy you generally don't see the sky.

User avatar
Delirium
Posts: 366
Joined: Sat Aug 27, 2011 8:37 am
Location: Auckland, New Zealand

Re: Globalfog and skybox

Post by Delirium »

you could do both, but you can't use a patch mesh inside a _skybox ent cause It'll crash your map
Image

User avatar
Rayne
Site Admin
Posts: 624
Joined: Wed Aug 17, 2011 5:22 pm

Re: Globalfog and skybox

Post by Rayne »

Ni i mean without the skybox entity, just a patch mesh above the map with fog shader.

User avatar
johnnyenglish
Space cake
Posts: 898
Joined: Wed Aug 17, 2011 9:23 am
Location: Nottingham, England

Re: Globalfog and skybox

Post by johnnyenglish »

Actually Del, you can add models to the _skybox box so a model hemisphere would be possible - the floodlights in the skeet map are .ase models inside a little box under the map with a skybox entity inside.

cec.
Posts: 33
Joined: Sat Aug 20, 2011 11:01 am
Location: Germany

Re: Globalfog and skybox

Post by cec. »

It's amazing to see you guys discussing about mapping :)
I think I'll try first Johnny's suggestion and make the skybox darker/more grayish because it seems to be the easiest and fastest solution. I'll let you know how that looks.

User avatar
johnnyenglish
Space cake
Posts: 898
Joined: Wed Aug 17, 2011 9:23 am
Location: Nottingham, England

Re: Globalfog and skybox

Post by johnnyenglish »

You could make a really cheap skybox using 2 different images - one a gradiant from black or dark grey to a lighter grey (top to bottom) and the other matching the darker colour in the gradiant for the _up

The gradiant would be used for the _lf _rt _bk _ft - the images could be small (256x256) as there would be no detail

Post Reply