Fog

Tutorial collection, comprehensive listings on main site.

Fog

Postby Tutorial on Mon Mar 07, 2005 12:52 am

category
General Half-Life 2/Effects

description
Basic looking and easy to get working.

keywords
fog, env_fog_controller, adding.

Fog is a useful effect to have in your map; it provides vast amounts of atmosphere mainly because it obscures your vision so you’re not quite sure what is in the distance or if something just moved in the shadows.

In this tutorial I will talk you through creating and tweaking fog for your maps.

Click on the entity tool Image or simply press Shift+E.

On the right of your screen you will see two scroll menus with “categories” and “objects” written above them. Make sure in the pop down menu with “categories” written above it has the word “Entities” showing in there.


Image


Next click on the “objects” pop down menu; scroll down until you find “env_fog_controller” then left click on it.


Image


Now just create the entity anywhere around you map as long as it inside the skybox. The location of the entity will not effect how it looks in game.

Image

You’re almost done; all you need to do now is “enable” the fog.
Do this by right clicking on the “env_fog_controller” entity, then scroll down to properties and left click it. The Object properties box will then pop up. Now in the key values box click on “Fog Enable” then to the right you should see a pop down menu with the word “no” there. Simply click this and change it to yes, hit apply and you’re done.


Image Image


That’s it you’re fog is completed it will be really faint until its tweaked but its there, compile your map and check it out.

Image

You probably just compiled and thought “where the hells the fog?” well valve’s default fog settings are really faint, but if the map was bigger you would be able to see it better. Creating fog is one of those things were its really easy to make, but to look good with your map requires a hell of a lot of tweaking and experimenting. Each map will look different in fog even if the settings are exactly the same, that’s why it’s important to experiment. But don’t worry your not on your own. I will pass on all I know. So here goes, ill start of with the entities object properties.

Name = You can give your fog entity a name, useful for vis grouping and tying entities together.

Min/Max DX level = this defines the direct x level of the shaders used in hl 2. If you just set these to default lowest and highest, cs:source will choose the direct x level for the person using the map.

Fog enabled = this defines whether or not fog shows up in your map. If set to yes fog is activated and will show up in game, if set to no fog will not be activated and will not be shown in game.

Fog Blend = to be honest I have no idea what this option does; I can only hazard a guess. I should imagine it toggles the blending of the primary an secondary fog colour, but don’t quote me on this.

Use angles for fog dir = this toggles whether to use the angles to determine the fogs direction. If set to yes it will use angles, if set to no it will just use default.

Primary fog colour = the primary fog colour is the colour that will be the most apparent so set this to the colour you want your fog to be.

Secondary fog colour = the secondary fog colour seems to be highlights set this to any colour you want. *TIP* it looks more natural if you keep it the same colour as your “primary fog colour” but just change the darkness or the brightness.

Primary fog direction = this defines the direction of the fog. It only works is “use angles for fog dir” is set to yes.

Fog start = this defines the distance from the player that fog will start to be rendered.

Fog end = this defines the distance from the player that the fog will stop being rendered.

Far Z plane Clip = I’m not sure what this does, but make sure you keep it at its default valve other wise you will get some real nasty clipping problems in your map.


Okay so know you have a basic idea of what everything does, its time to begin
experimenting. All I can offer now is some advice and a sample of my tweaked fog.

The “fog start” number must be bigger then the “fog end” number to look good in game. If the numbers are the same you will get either no visible fog or so much fog you cannot see anything but white. The bigger the difference between “fog start” and “fog end” the thinner the fog. The closer together the thicker the fog. Here’s a sample of the values I used for some nice subtle fog:

Name - fog
Fogstart – 10
Fogend – 1250
Primary fog colour - 195 195 195
Secondary fog colour - 255 255 255
Blend – Yes

Image

That’s it; you will learn how to make effective looking fog well if you practice over and over again its one of those things that needs constant tweaking to obtain perfection. I hope this tutorial helped, good luck.

Example maps:

http://www.interlopers.net/downloads/maps/fog.zip

Contributed by Signy
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Someth|ng W|cked on Thu Mar 24, 2005 8:38 am

I am pretty sure that with fog blend enabled it has something to do with how the fog blends with the fog in a 3dskybox . . .
User avatar
Someth|ng W|cked
Regular
Regular
 
Joined: Thu Mar 24, 2005 7:48 am

Postby slayera on Thu Mar 24, 2005 8:54 am

Someth|ng W|cked wrote:I am pretty sure that with fog blend enabled it has something to do with how the fog blends with the fog in a 3dskybox . . .


Nope, been there done that. Torn up my map and I stopped using it. Blend looks worse.
Image


"When one person suffers from a delusion it is called insanity. When many people suffer from a delusion it is called religion." -Robert Pirsig
User avatar
slayera
Veteran
Veteran
 
Joined: Wed Dec 08, 2004 3:15 am
Location: Near the world's only super volcano.

FOG texture

Postby Hendrix on Thu Apr 28, 2005 1:29 pm

Can you explain what the fog texture is for?
Hendrix
Dumpling
Dumpling
 
Joined: Thu Apr 28, 2005 1:28 pm
Location: UK

Postby Hendrix on Thu Apr 28, 2005 1:41 pm

Is there any way to constrain the fog to a certain area? Otherwise it just floods the entire map etc
Hendrix
Dumpling
Dumpling
 
Joined: Thu Apr 28, 2005 1:28 pm
Location: UK

Postby Signy on Thu Apr 28, 2005 4:33 pm

I wish i knew.

When i wrote the tutorial i couldnt find a way but that was way way back.

I may have a little explore and see what i can dig up.

Sigs
User avatar
Signy
Pheropod
Pheropod
 
Joined: Fri Nov 12, 2004 1:21 am
Location: UK

Postby Grim Reaper on Wed Jun 01, 2005 2:24 pm

Sigs you found out, i want to confine it to just one room.
Mapper
jman wrote:Blocky, yet good.

Image
Grim Reaper
May Contain Skills
May Contain Skills
 
Joined: Mon May 02, 2005 9:40 am
Location: Its this place, with air, and buildings, and there is lots of concrete...

Postby novalin on Wed Aug 24, 2005 2:53 am

so how do u make it in one room?
User avatar
novalin
Regular
Regular
 
Joined: Tue Jun 07, 2005 9:19 am
Location: San Francisco

Postby novalin on Sat Sep 10, 2005 10:11 pm

anyone know?
User avatar
novalin
Regular
Regular
 
Joined: Tue Jun 07, 2005 9:19 am
Location: San Francisco

Postby ferret on Sun Sep 11, 2005 12:30 am

the only way is to have multiple env_fog controllers that are either enabled or disabled. Then you can use triggers when people enter the room -- Of course, then it would only work in an sp map.
*** May the Source Be With You ***
User avatar
ferret
Senior Member
Senior Member
 
Joined: Fri Jun 10, 2005 10:03 pm
Location: oHIo

...

Postby nick1101 on Wed Sep 14, 2005 7:51 pm

good tut
but i just want a thin like a fog,
when i do it. it goes through my whole map,
looks nasty

:)
nick1101
Dumpling
Dumpling
 
Joined: Sat Sep 10, 2005 11:39 pm

Postby nub on Wed Nov 16, 2005 3:07 am

For making fog go in one room only, isn't there some sort of tool texture that blocks fog sort of like the blockbullets texture?

I dont have the time nor do I have memory to use hammer editor right now, hopefully im getting an alienware computer in the future. :)
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Postby ferret on Wed Nov 16, 2005 4:24 am

nub wrote:For making fog go in one room only, isn't there some sort of tool texture that blocks fog sort of like the blockbullets texture?

I dont have the time nor do I have memory to use hammer editor right now, hopefully im getting an alienware computer in the future. :)
You have to use triggers before each room to send an input to change the fog's color (or other parameters)
*** May the Source Be With You ***
User avatar
ferret
Senior Member
Senior Member
 
Joined: Fri Jun 10, 2005 10:03 pm
Location: oHIo

Postby -[Getty]- on Sat Dec 03, 2005 7:11 pm

Hendrix wrote:Is there any way to constrain the fog to a certain area? Otherwise it just floods the entire map etc


http://forum.interlopers.net/viewtopic.php?t=1792
source-maps wrote:a Quad Core CPU , arent that like 4 cpus?


-=-=-=-=-=-=-=-=-
Club No Release
-=-=-=-=-=-=-=-=-
User avatar
-[Getty]-
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Sun Nov 27, 2005 5:54 pm
Location: Pennsylvania

Postby jister on Sun Dec 11, 2005 4:19 pm

if you just want it in one room, i'd say use a smoke volume...
User avatar
jister
May Contain Skills
May Contain Skills
 
Joined: Wed May 11, 2005 7:35 pm
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users