2024-06-22 07:24:13 +00:00
|
|
|
# Material Command List {#mat_commands}
|
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
## fogParms {#fogParms}
|
2024-06-22 07:24:13 +00:00
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
### Syntax
|
2022-10-03 00:10:54 +00:00
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
**fogParms \<red value\> \<green value\> \<blue value\> \<distance to opaque\>**
|
2022-10-03 00:10:54 +00:00
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
### Overview
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
**Note**: you must also specify "surfaceparm fog" to cause
|
2023-08-21 15:39:01 +00:00
|
|
|
[vmap](vmap.md) to identify the surfaces inside the volume.
|
2022-10-03 00:10:54 +00:00
|
|
|
Fogparms only describes how to render the fog on the surfaces.
|
|
|
|
|
2023-08-21 15:39:01 +00:00
|
|
|
**red value, green value, blue value**: These are normalized values.
|
2022-10-03 00:10:54 +00:00
|
|
|
To obtain the values that define fog color divide the desired color's
|
|
|
|
Red, Green and Blue values by 255 to obtain three normalized numbers
|
|
|
|
within the 0.0 to 1.0 range.
|
|
|
|
|
2023-08-21 15:39:01 +00:00
|
|
|
**distance to opaque**: This is the distance, in game units, until the
|
2022-10-03 00:10:54 +00:00
|
|
|
fog becomes totally opaque, as measured from the point of view of the
|
|
|
|
observer. By making the height of the fog brush shorter than the
|
|
|
|
distance to opaque, the apparent density of the fog can be reduced
|
|
|
|
(because it never reaches the depth at which full opacity occurs).
|
|
|
|
|
2024-12-05 03:04:56 +00:00
|
|
|
### Notes {#notes}
|
2022-10-03 00:10:54 +00:00
|
|
|
|
|
|
|
- The fog volume can only have one surface visible (from outside the
|
|
|
|
fog).
|
|
|
|
- Fog must be made of one brush. It cannot be made of adjacent
|
|
|
|
brushes.
|
|
|
|
- Fog brushes must be axial. This means that only square or
|
|
|
|
rectangular brushes may contain fog, and those must have their edges
|
|
|
|
drawn along the axes of the map grid (all 90 degree angles).
|
|
|
|
|
|
|
|
**Design Notes:**
|
|
|
|
|
|
|
|
- If a water texture contains a fog parameter, it must be treated as
|
|
|
|
if it were a fog texture when in use.
|
|
|
|
- If a room is to be filled completely with a fog volume,it can only
|
|
|
|
be entered through one surface (and still have the fog function
|
|
|
|
correctly).
|
|
|
|
- Additional shader passes may be placed on a fog brush, as with other
|
2024-12-05 03:04:56 +00:00
|
|
|
brushes.
|