Environment (XML)

ColorGrading

Estimated reading: 8 minutes 838 views Reviewed By AlfaMods
ColorGrading

Image by kesie91 from Pixabay

ColorGrading is an XML configuration file to control the lighting in the scene of a Farming Simulator map. It’s not about street lights or any assets placed, and will therefore affect the colours and lighting visible when the map is loaded in the GIANTS Engine. ColorGrading will also affect the scene when the map is loaded in GIANTS Editor.

The configuration file itself has to be modified manually using a text editor.

There are two XML files associated with ColorGrading. These are:

  • colorGrading.xml (daytime)
  • colorGradingNight.xml (nighttime)

Configuration File Declaration (XML)

Inside a configuration file named environment.xml, we’ll find these lines:

XML
<colorGrading>
            <key timeHours="0"  filename="maps/mapAS/config/colorGradingNight.xml" />
            <key timeHours="5"  filename="maps/mapAS/config/colorGradingNight.xml" />
            <key timeHours="6"  filename="maps/mapAS/config/colorGrading.xml" />
            <key timeHours="20" filename="maps/mapAS/config/colorGrading.xml" />
            <key timeHours="22" filename="maps/mapAS/config/colorGradingNight.xml" />
            <key timeHours="24" filename="maps/mapAS/config/colorGradingNight.xml" />
  </colorGrading>

These lines are used when a map modder wants to apply their own colour grading for their modded Farming Simulator map.
By default (vanilla), these lines will use $data (SDATA) to use colorGrading files from the game’s vanilla maps.

The key time hours are the timestamp when the colour grading is loaded into the game engine. And normally this is from hour 0 to 24 – or 00:00 and 24:00.

After that, the file path for the colorGradings is listed, along with the mod’s directories and configuration files, ending with the XML file name.

Information found inside colorGrading.xml

To break it down as simply as possible, these configuration files are very simple, but HIGHLY SENSITIVE. And why so in caps? It’s because the numerical values are very sensitive. You may easily end up looking at a scene when you load your map in GIANTS Editor and see that all the assets, the character, and the whole scenery have gone purple, pitch black, or any other colour if you’re not careful with these values.

So here’s how the XML looks, in this example:

XML
<?xml version="1.0" encoding="UTF-8" ?>
<colorGrading shadowsMaxLuminance = "0.08" highlightsMinLuminance = "0.95">
<global>
    <saturation rgb="0.9 0.9 1" scale="1.4"/>
    <contrast rgb="1 1 1" scale="1"/>
    <gamma rgb="1 1 1" scale="1"/>
    <gain rgb="1 1 1" scale="1"/>
</global>
<shadows>
    <saturation rgb="1 1 1" scale="1"/>
    <contrast rgb="1 1 1" scale="1"/>
    <gamma rgb="1 1 1" scale="1.1"/>
    <gain rgb="1 1 1" scale="1"/>
</shadows>
<midtones>
    <saturation rgb="1 0.8 1" scale="0.8"/>
    <contrast rgb="1 1 1" scale="0.9"/>
    <gamma rgb="1 1 1" scale="1"/>
    <gain rgb="1 1 1" scale="1"/>
</midtones>
<highlights>
    <saturation rgb="1 1 1" scale="1.3"/>
    <contrast rgb="1 1 1" scale="1.5"/>
    <gamma rgb="1 1 1" scale="1"/>
    <gain rgb="1 1 1" scale="1"/>
</highlights>
</colorGrading>

Let’s start with line number 2:

XML
<colorGrading shadowsMaxLuminance = "0.08" highlightsMinLuminance = "0.95">

Shadows Max Luminance

This is the peak value that GIANTS Engine considers to be deep shadows. It means that this value, 0.08, controls how bright the shadow cast by a tree in sunlight appears on the ground surface or on any scattered objects around the tree.
This applies to any outdoor assets placed on a Farming Simulator map by the modder, as well as to any other mods/assets placed on a map in real-time gameplay, including any vehicles or tools used during gameplay.
There are no indoor spaces in Farming Simulator where any indoor luminance is separate from the world luminance. So this isn’t a feature of GIANTS Engine (2026).

Highlights Min Luminance

This is the minimum value for highlights. When talking about highlights in computer graphics, we are referring to white light within the map’s scene. This can be anything from white seasonal snow, white-painted building textures, to tractors/vehicles/tools with bright/light colours and glossy surfaces.
Now it’s a bit funny that this one is about the minimum rather than the maximum. But think of shadow max and highlights minimum as greyscale, or what is also referred to as monochrome shades. And think of these values as boosters, which we use to increase or decrease how bright or dark we want our scenery to appear, since both of these are globally affecting the whole scene.

The other XML lines that follow aren’t particularly important, but may be somewhat useful for fine-tuning the scene.

Global Saturation – Contrast – Gamma – Gain

XML
<global>
    <saturation rgb="0.9 0.9 1" scale="1.4"/>
    <contrast rgb="1 1 1" scale="1"/>
    <gamma rgb="1 1 1" scale="1"/>
    <gain rgb="1 1 1" scale="1"/>
</global>

These are all gainers or boosters.

Typical vanilla values for the Red, Green, and Blue Channels (RGB) are 1, 1, 1 (one, one, and one).
These can be adjusted to like 0.9… 0.1 or greater than 1.0. We can see that saturation has these decimal values. Other than that, it’s typically 1 1 1. Just remember to hit the SPACE key to add a space between the values.

The scale is the one that is easier to adjust, since this one scales all three RGB values, like for saturation by 1.4.

All the other after global are, as mentioned, gainers and boosters, such as:

  • shadows
  • midtones
  • highlights

If you are familiar with using digital cameras, applications like Photoshop or other image editors, or even video game processing filters from NVIDIA, then the configuration files covered in this guide are mostly the same kind of thing.

Color Grading Night

This one has the same XML setup as the one mentioned above. This one is for the global lighting of the scene at night, especially under typical bright moonlight, since Farming Simulator (GIANTS Engine) doesn’t feature moon phases or occultations (meaning no moon is visible).

To control the lighting from the moon, we need to adjust some values in environment.xml, where we find these lines:

XML
<moonBrightnessScale>
            <key value="1" time="0" />
            <key value="0.3" time="7" />
            <key value="0.0" time="7.5" />
            <key value="0.0" time="18.5" />
            <key value="0.3" time="19" />
            <key value="1" time="24" />
        </moonBrightnessScale>

…where the value can be anything between 0 (zero) and one plus, with decimals.

That’s only if you want a brighter or dimmer moon at nighttime.

Other than that, the values added to the timestamps in both configuration files will also affect the transition between daylight and nighttime, specifically the shift from night to morning and from evening to night.
So you might see the sunlight suddenly switch on, and that’s somewhat of a vanilla problem, which is why I called these numerical values highly sensitive.
So this is a bit trial-and-error to get the day-to-night transition to work, but feel free to play with the values and back up the files so you can fall back on the vanilla values in case everything gets messed up.