Skip to content

Export/Load Terrain

Terrain consists of different components: height, color, wetness, material, extruison, sand, etc. Each of these components is represented with a texture map. When you open a scene in the Mod Editor, the editor loads the base texture map of each component and then loads the changes that were made to this component.

An example of a height texture map:

How are the user changes stored?

The user changes made with terrain brushes are stored in the  C:\Users\<user_name>\Documents\Saber\IntegrationStudio\mods_source\xscenes\mods\<scene_name>\terrains\terrain folder in the terrain component subfolder:

Each file stores the changes made by the user in one of the terrain chunks. You can use the Visualize tool to see the numbers of the terrain chunks in the Mod Editor.

You can export each of the terrain components as a texture map to save it as a backup, use in other maps as the base texture map, or to modify in any third-party software (such as World Machine, Houdini, etc.).

Export

To export the texture map of a terrain component :

  1. Open the scene in the Editor mode.
  2. Open the Debug UI (press F5) and navigate to Engine > Terrain > Manage Masks:
  3. In the Terrain window, select which texture map to export:

    • Export Regular Texture — one of the built-in texture maps:

      • height_map — a grayscale height map of the terrain. 0 corresponds to the minimal terrain height and 255 — to the maximum. 
      • color — see the Colorize brush. The texture uses regular colors and is applied as a multiply layer to the terrain.
      • wetness — see the Wetness brush. A grayscale texture where 0 corresponds to dry terrain and 255 to completely wet.
      • material_1, material_2 — see the Paint brush. Each texture stores information about 4 materials, each channel of a texture stores information about one material:

        When materials' textures are loaded, the values in every channel are treated as weights for materials:

        (For simplicity, we ignore the real alpha channel in this diagram, otherwise most of the colors would not be visible.)

        Warning

        The sum of values in every channel in both textures for a single pixel must not exceed 255. Built-in terrain brushes do this automatically, but if you are using third-party software to paint the terrain, make sure to normalize the channels' values.

    • Export Mask — one of the user created masks.

    • Create mask — the same functionality as the Create Mask window for the Grass/Masks brush.

You can modify the exported files in any third-party software (such as World Machine, Houdini, etc.).

Load

To load the terrain texture map in your Editor map, open the C:\Users\<user_name>\Documents\Saber\IntegrationStudio\mods_source\xscenes\mods\<scene_name>\terrains\terrain folder in Explorer and place the .tga/.tiff file there:

Reopen the map in the Mod Editor to load the new base texture maps.

I've loaded a new texture map, but my terrain didn't change...

Check the C:\Users\<user_name>\Documents\Saber\IntegrationStudio\mods_source\xscenes\mods\<scene_name>\terrains\terrain\<terrain_component_name> folder which stores the user changes to a terrain component. User changes have a higher priority over the base texture map and will override the base texture map values.
You can delete these files, however, this will also erase any changes you've made to this terrain component in the Mod Editor.