Color Correction In SMOD

This article is incomplete. You can help by adding to it, or just wait until Skepsis gets off his lazy arse and finishes it.


Color correction is often used in video games to alter lighting and overall color of the scene to set a more intense atmosphere. In Source this is done through the color correction entity. To make use of this feature in SMOD, the entity can be easily added to and run by a mapadd script. Color correction in SMOD does add a 1-pixel size blur, but if used correctly can be a powerful tool.

Step 1: Making a .raw file.

First, a .raw file with color correction data must be created for the entity to call on. To do this, open up the console (~) and enter colorcorrectionui to bring up Source's in-game color correction menu. The tools here include curves, levels, selected HSV, lookup, and balance and work similarly to those found in common image editors. To find more information about these tools, please refer to the VDC article on color correction. Once the desired settings have been found, save the .raw file and move on to adding those settings to a map.

Step 2: Applying color correction

After a .raw file is saved and ready for use, the color_correction entity must be added into the mapadd. For more info on mapadd syntax and function, see Mapadds - Getting Started.

            "filename"        "(location of .raw file)" 
            "classname"    "color_correction"
            "maxweight"    "1.0"
            "maxfalloff"    "999"
            "minfalloff"        "999"
            "origin"        "0 0 0"
            "startdisabled"    "0"
  • Line 5 defines the relevant .raw file's path.
  • Line 6 sets the classname of the entity. In this case, it should always be color_correction since color_correction_volume is a brush entity.
  • Line 7 sets the intensity of the effect before falloff.
  • Lines 8-9 set the distance from the entity at which the effect should begin and end fading out.
  • Line 10 is the origin of the color_correction entity.
  • Line 11 is a boolean value that can tell the entity to stay dormant until activated with an Enable input.

If done correctly, the color correction settings in the .raw file will be applied to the map, like that in the screenshot below.



Generally speaking, SMOD's color correction is effective and optimised. There is, however, one important fault in its method. Due to texture filtering, color correction adds a single pixel blur. This may not be as noticeable on higher resolutions, but it is quite prominent on lower ones. This is because the entire scene is rendered and then drawn on the screen via a textured quad (polygon). Any post-processing effects are also drawn onto this quad and likewise filtered as if it were a texture.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License