Level Editor/Entities/Fog Volume

From TeamSpec Wiki
Jump to navigation Jump to search
Fog Volume
Made with Functional > Create Fog Volume
What it is A box (or other shape) of volumetric fog: mist in one place, or dusty air that shows the light shafts in one room
In the game Yes, it is exported with the map

A Fog Volume fills a box of space with volumetric fog of its own: a misty hollow, smoke hanging in a hall, or dusty air in a warehouse whose windows throw shafts of sunlight while the open ground outside stays clear.

A fog volume is part of the map's volumetric fog, so it shows only when Volumetric Fog Enabled is ticked in Map Config > Environment. With the Environment's own Volumetric Fog Density at 0, the volumes are the only fog in the map. Players see volumetric fog only when Allow Volumetric Fog is ticked in their Settings, so a map must still look right without it.

For light shafts across the whole map without placing volumes, see Light shafts and fog.

Placing one

  1. Turn volumetric fog on: Map Config > Environment, Volumetric Fog Enabled.
  2. Choose Functional > Create Fog Volume and click a surface. The volume's box, 8 × 4 × 8 m, stands on the surface you clicked.
  3. Fit the box to the room with its Size or the 2D views' resize handles, and set how thick the fog is with Density.

The editor draws the volume's box as an outline and a marker labeled Fog Volume; the fog itself shows in the 3D view as it will in the game. The Viewport Rendering window's Volumetric fog box hides all of it for your view while you work.

Inspector

Setting Type Default What it does
Size Meters (X, Y, Z) 8, 4, 8 How big the volume is.
Shape List Box Ellipsoid, Cone, Cylinder, Box or World. World fills the whole map and ignores Size.
Density Number 0.05 How thick the fog is. Below 0 it takes fog away where volumes overlap, to clear a pocket inside a bigger volume.
Albedo Color White The color the fog scatters light in.
Emission Color Black Light the fog gives off by itself, with no light shining on it: a glowing haze.
Height Falloff Number 0 How fast the fog thins with height. 0 is even from top to bottom.
Edge Fade Number 0.1 How softly the fog fades out toward the edges of its shape.

A duplicated fog volume gets its own copy of these settings, so changing one never changes the other. A Mirror Node's copy follows its source.

Light shafts inside

Sunlight and lights shine through the fog, so shafts show where light falls through a window, a grate or a gap in a roof. To make them stronger:

  • Raise the sun's Light Volumetric Fog Energy (in Map Config > Environment, under the sun) above 1. The official maps use 3.
  • Lower the Light Volumetric Fog Energy of lamps inside the volume, so they do not glow in the air around them.
  • Lower the Environment's Volumetric Fog Anisotropy to make shafts brighter seen from the side and the glare toward the sun weaker.
Note: With the Environment's Volumetric Fog Beam Contrast above 0, fog that is lit evenly is removed like any other evenly lit air: a volume then shows only the shafts through it, not a visible mist. For mist, leave Beam Contrast at 0. See Light shafts and fog.

In the game

  • Each fog volume adds a little to the cost of the map's volumetric fog, more the more of the view it covers. Fit volumes to the rooms that need them rather than covering the map with them; for fog everywhere, use the Environment's own density.
  • Volumetric fog reaches only as far from the camera as the Environment's Volumetric Fog Length, so a volume far away shows nothing until players come closer.
  • A fog volume in the 3D skybox is left out of the export, for the same reason; the export log lists it.

Related pages

TeamSpec Level Editor
Basics Getting started · Interface · Viewport and camera · Selecting and hiding · Keyboard shortcuts · Settings · Map Config · Troubleshooting
Menus File · Edit · View · Tools · Functional
Panels Scene tree · Inspector · Materials · Props · Snapping · UV editor · Displacement · Terrain
Tools Move, Rotate and Scale · Box · Sphere · Cylinder · Prism · Stairs · Spiral Stairs · Spiral Tower · Arch · Path Brush · Plane · Terrain · Clip · Duplicate · Ruler and Cordon · Edit Vertex and Edge · Edit Face · Loop Cut · Material Brush · Vertex Color Brush · Displacement · Prop Path
Entities Brush · Zone · Group · Mirror Node · Prop · Spawn Point · Supply Pickup · World Boundary · Lights · Fog Volume · Water · Sounds · Anchor Platform · Payload Track · Boss Spawn · Map Marker · World Text · Decal · Door · Button · Logic entities · 3D Skybox · Nav Region
Workflows Your first map · Brushes and CSG · Materials and UVs · Lighting and lightmaps · Bots and navigation · Mirrored maps · Outputs and logic · Custom assets · Playtesting · Exporting and publishing · Importing Source maps
Scripting Overview · Server rules · Client HUD · Bots · Teams and spawning · Zones · Pickups · Payload tracks · Map entities · Language · Sandbox limits · Testing · King of the Hill · Team Deathmatch · Payload · Conquer · Soul Banking · Service · Training Range · API reference · What a script may use