Home Creators Posts Import Register Favorites Logout

Content

This tutorial aims to explain the densityMap_ground.gdm settings inside of your map i3d file. These can be set up a variety of ways and understanding what each section does, what you can do, and what you cannot should make things easier to figure out when things go wrong.

This process touches three things: the map .i3d file, the fieldGround.xml, and the densityMap_ground.gdm file itself. Each step must match the others exactly or the map will not work correctly.

Important Note:

At the time of this writing, densityMap_ground.gdm files cannot be 16384 x 16384 and more than 15 channels. This will cause GE to hang because of an engine limitation. The good news is, staying at 15 channels or less is still very easy to do without losing anything.

Part 1 — Understanding the terrainDetail DetailLayer

Open your map's .i3d file and find the DetailLayer element with name="terrainDetail".

The two values to pay attention to are numDensityMapChannels and compressionChannels. These must both equal the sum of all channel groups defined inside this element. For a densityMap_ground.gdm at 16384×16384 resolution, this total must be 15 or less.

You will update these numbers once you know the final channel total.

Part 2 — The four channel groups

Inside the terrainDetail section there are four Group elements. Each group has a firstChannel and a numChannels. The groups must chain sequentially — each one starts exactly where the previous one ends.

The default layout uses 3 channels for GroundAngle, starting at channel 4. This gives 8 possible ground angle values. Increasing it to 5 channels expands that to 32 ground angles, and shifts every group that follows it:

GroundType — firstChannel: 0, numChannels: 4 (unchanged)

GroundAngle — firstChannel: 4, numChannels: 5 (changed from 3 to 5)

Spraytype — firstChannel: 9, numChannels: 3 (shifted from 7 to 9)

Water — firstChannel: 12, numChannels: 1 (shifted from 10 to 12)

Total: 13 channels

Update numDensityMapChannels and compressionChannels on the DetailLayer line to match the new total.

Note: At the time of this writing, the GroundType and Spraytype groups cannot have additional option values added without a Lua script registering them with the game. Adding extra Option entries to either of those groups on its own does nothing and only wastes available channel slots.

Part 3 — Updating combinedValuesChannels

On the same terrainDetail line, scroll right until you find the combinedValuesChannels attribute.

This encodes the same group information as a semicolon-separated list. Each group is represented as three numbers: firstChannel, numChannels, and an unused value. Update it to reflect your new channel layout — the four groups in order, with their updated first channel and channel count values.

0 4 0 = GroundType: firstChannel = 0, numChannels = 44 5 0 = GroundAngle: firstChannel = 4, numChannels = 59 3 0 = Spraytype: firstChannel = 9, numChannels = 312 1 0 = Water: firstChannel = 12, numChannels = 1

Part 4 — Updating fieldGround.xml

The fieldGround.xml file contains its own copy of the channel settings for each group. These values must be identical to what you set in the .i3d.

Your map XML file contains a fieldGround entry that points to this file. It may already be there pointing to the base game default — if so, just update the path to point to a copy inside your own map mod folder.

Building the file from scratch

If your map does not already have its own fieldGround.xml, you need to build one by combining two base game files:

Copy fieldGround.xml from one of the base game map folders (e.g. game install data/maps/mapUS/config/) into your map mod. This file contains the infoLayer entries.

You must repoint your infoLayer entries to your map (do not leave them pointed at $data)

Open maps_fieldGround.xml from data/maps/ and copy its contents — the channel group definitions — into the file you just copied.

The result is a single combined file with both sections present. Update the channel values to match the .i3d, then point the map XML entry at this new file.

Part 5 — Regenerating the densityMap_ground

With the XML edits done, the density map itself needs to be rebuilt to use the new channel layout.

Step 1: In the map .i3d, find the File entry for densityMap_ground and change the extension from .gdm to .png.

Step 2: Use Giants' grleConverter tool to convert densityMap_ground.gdm to PNG. Once the PNG is created, delete the original .gdm file.

Step 3: Open the map in Giants Editor. Check the console for any red errors before proceeding. If there are none, save the map. Giants Editor will generate a new .gdm from the PNG using your updated channel settings.

Critical: The map's .zip file must not be in the same folder as your unzipped map. If it is, Giants Editor will pull the old .gdm out of the zip instead of generating a new one from the PNG — and your channel changes will have no effect.

That covers the full process. If you run into issues, double-check that the channel numbers are consistent across all three places: the .i3d groups, the combinedValuesChannels attribute, and the fieldGround.xml. A mismatch in any one of them is usually the culprit.

For further instructions, consider joining the Discord. Opening a ticket here will allow myself or my support team to look at your files and address these issues real time.

This is by far the issue I see the most when people have problems with crashing, GE hanging, or the ground just not looking right. Hope it helps!

Files

Comments

No comments found for this post.